R is a programming language and environment used primarily for statistical data analysis.

Share tech news, updates, or what's on your mind.

Sign up to Post

I want to assign SSL Certificate to my exchagne server 2016 via certificate authority from active directory,
all of the steps, done in proper way,  it show " invalid"
please help me

R. Rahimi
Live webcast with Pinal Dave
Live webcast with Pinal Dave

Pinal Dave will teach you tricks to help identify the real root cause of database problems rather than red herrings. Attendees will learn scripts that they can use in their environment to immediately figure out their performance Blame Shifters and fix them quickly.

I need to know if there's a way in Excel to have only 3 colors for the "Conditional Formatting" > "3-Color Scale"
to be NOT a "Graded Color Scale".
I only need RED, YELLOW and GREEN, if values fall in between of R and Y, then they come as Orange (Graded Scale effect).
Screen shot with Conditional Formatting
Hi I am in a bit of a crunch on this SQL query here so I appreciate any help.

Lets say I have this part:


I need to find all parts that match above up to the F but then have an R after. For example one of the results that would match would look like this:

select * from inv_master (nolock) where part_no like 'HON787800R%'

I appreciate any help you might be able to offer

Thank you much.
Dear expert

Please help me with a query command you can find below, Now I got problem with variables @P4, @P5, @P6, problem is that I want to show result that minus the value of @P1, @P2, @P3, this  R.DatetimeSentToReceiver < DATEADD(MONTH, 2, @ReminderMonth) adds 2 months value, what i want is @P4 = @P4 - @P1 now I tried add this in query, and it return with error ofc. How to do this in the correct way? There are many way doing this, I need a great solution for it, what Im after is this, data in current months output, data in last month output.  @ReminderMonth will be every months day 1 so that will change too.
Any help would be great.

            @ReminderMonth date = '2018--01-01';

DECLARE @P1 int =  
        FROM Invoice.Reminder R
        R.DatetimeSentToReceiver >= @ReminderMonth
        AND R.DatetimeSentToReceiver < DATEADD(MONTH, 1, @ReminderMonth)
        AND R.ReminderNumber = 1
        @P2 int =  
        FROM Invoice.Reminder R
        R.DatetimeSentToReceiver >= @ReminderMonth
        AND R.DatetimeSentToReceiver < DATEADD(MONTH, 1, @ReminderMonth)
        AND R.ReminderNumber = 2
        @P3 int =  
        FROM Invoice.Reminder R
        R.DatetimeSentToReceiver >= @ReminderMonth
        AND R.DatetimeSentToReceiver < DATEADD(MONTH, 1, …
Dear expert

Please read the query below, I need first understand this:
R.DatetimeSentToReceiver < DATEADD(MONTH, 1, @ReminderMonth)
What does it do? And then I want to run query every months like Januari then Feb etc. And I dont want it to count everything from the date 2018-01-01 How to do it?


            @ReminderMonth date = '2018-01-01',
            @ReminderNumber1 int = 1,
                  @ReminderNumber2 int = 2;
            Invoice.Reminder R
            R.DatetimeSentToReceiver >= @ReminderMonth
            AND R.DatetimeSentToReceiver < DATEADD(MONTH, 1, @ReminderMonth)
            AND R.ReminderNumber = @ReminderNumber1
                  )As 'Reminder 1',
            Invoice.Reminder R
            R.DatetimeSentToReceiver >= @ReminderMonth
            AND R.DatetimeSentToReceiver < DATEADD(MONTH, 1, @ReminderMonth)
            AND R.ReminderNumber = @ReminderNumber2
                  )As 'Reminder 2'
The crstal reports were created with Crystal XI R1 on a Windows  7 machine. The user has upgraded to a windows 10 machine 64 bit. When they open a file either on the server or their C drive it will open the report but not let them edit a header field. They can most times edit a text field on the detail line. They cannot suppress a section or they get the error message I attach. I have removed Crystal and reinstall it. I can take the same report and edit it on my windows 10 machine 64 bit. I have Crystal XI R2. Has anyone seen this problem before? I appreciate any help.
This is a continuation and refinement of a previous question.

On a plain power on, my Mac Mini displays the apple symbol and never anything else.

On a power on while holding down the Option and R keys, it displays the apple and a progress bar.  When the progress bar completes, I get the log on dialog and can log on. It behaves completely normally through every process I've tried, even for days.  But if I log off (or restart) (I don't remember at the moment if the effects on logon of logoff and restart are the same) the only way to get it open again is with Option and R at power on.

Does this suggest to anyone what the specific cause might be?
I have a spreadsheet "attached" of "Ring Numbers"
The problem I'm having is the data starting with a "R4" and an "R5" need a "1" inserted in between the R and the 4 and also the R and the 5.
For example
"R4142" needs to be "R14142" & "R5507" needs to be "R15507" in order to be joined with another dataset
I am having issues isolating these specific fields only and entering the "1"
I have the following query on prior help and I added a column 'text1', change the Comp5 heading to Comp15 and I can't get 'text1' and Comp15 values on the result:
        PID INT ,
        TEXT1 VARCHAR(10),
Comp1 VARCHAR(10),
 Comp2 VARCHAR(10),
Comp3 VARCHAR(10),
Comp4 VARCHAR(10),
Comp15 VARCHAR(10)

VALUES ( 11122, '1212', NULL, NULL, NULL, NULL, NULL ) ,
         ( 12345, NULL, NULL, NULL, '123', NULL, NULL ) ,
       ( 23456, NULL, '234', NULL, 'ewr', NULL, NULL ) ,
       ( 34567, NULL, NULL, 'acc', NULL, NULL, 'def' ) ,
       ( 45678, NULL, NULL, NULL, 'jkl', NULL, NULL ) ,
       ( 56789, NULL, NULL, NULL, NULL, NULL, 'we1' ) ,
       ( 23450, NULL, 'abc', 'acc', 'exy', 'ert', 'def' );

WITH Unpivoted
     FROM   @TEMP4 T UNPIVOT(CompValue FOR CompType IN(Comp1, Comp2, Comp3, Comp4, Comp15)) U ) ,
            U.CompValue ,
                                              ORDER BY U.CompType ASC ) AS VARCHAR(255)) AS NewCompType
     FROM   Unpivoted U )
FROM   Reordered R
    PIVOT (   MIN(CompValue)
              FOR NewCompType IN ( Comp1, Comp2, Comp3, Comp4, Comp15 )) P;
I can upload a into RStudio server using shiny.  However, I cannot open the file for editing and saving for processing by the R code.  Apparently, the randsontable library function ransdontable() takes as input a dataframe.  I am using the code below: DF = as.data.frame(read.delim(inFile$datapath))
    rhandsontable(DF, width = 550, height = 300)

but I get the message:

Warning: Error in as.data.frame.default: cannot coerce class "c("rhandsontable", "htmlwidget")" to a data.frame

Is there a solution for this, or is there any other way to open and edit file using shiny?

My code was completely wrong. If anyone wants to find more about the R rhandsontable, please post a question. I will be happy to help.
Build your data science skills into a career
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

I have an excel spread sheet that has a column with either b, g or r
I would like to create a formula in a separate column which will convert this to either Blue, Green or red

Installing SQL 2017 we were asked to "Accept" on "Microsoft R Open".  We looked it up some sort of open source, but What is it to us Microsoft product users?, also  Why click "Accept" it in this SQL install? and How can we take advantage of this "Microsoft R Open"?
TABLEI have a table with data R. Virgo (3 Rows). I want to query the most recent only the frist row and not all the data with this code:

    Private Sub DISPLAY()
        Dim cmd2 As New MySqlCommand
        Dim myDA2 As New MySqlDataAdapter(cmd2)
        Dim myDT2 As New DataTable
        cmd2.Connection = conn
        cmd2.CommandText = "SELECT * FROM esd_reco where IDNumber = '" & txtG.Text & "' ORDER BY Date DESC"
        dghistory.DataSource = myDT2

Open in new window

txtG.text is the ID Number
Help please, thank you.
I had this question after viewing How to change this macro to find last column instead of A to J?.

Sub Commas2Rows()
  ' hiker95, 05/18/2017, ME1006027
  Dim lr As Long, lc As Long, r As Long, s, i As Long
  Application.ScreenUpdating = False
  With ActiveSheet
    lr = .Cells(Rows.Count, 1).End(xlUp).Row
    lc = .Cells(2, Columns.Count).End(xlToLeft).Column
    For r = lr To 2 Step -1
      If InStr(.Range("G" & r), ", ") Then
        s = Split(.Range("G" & r), ", ")
        .Rows(r + 1).Resize(UBound(s)).Insert
        .Range("G" & r).Resize(UBound(s) + 1) = Application.Transpose(s)
        .Range("A" & r + 1 & ":F" & r + 1).Resize(UBound(s)).Value = .Range("A" & r & ":F" & r).Value
'        .Range("H" & r + 1 & ":J" & r + 1).Resize(UBound(s)).Value = .Range("H" & r & ":J" & r).Value
        .Range("H" & r + 1 & ":" & Chr(64 + lc) & r + 1).Resize(UBound(s)).Value = .Range("H" & r & ":" & Chr(64 + lc) & r).Value
      End If
    Next r
  End With
  Application.ScreenUpdating = True
End Sub
I have to install an R program and several open source proteomics programs in a linux box.  The R program calls the open source proteomics programs.  The pipe line starts by one of the programs taking as input a raw data file and all the programs produce output files some of which may be input to the other programs in the pipe line.  The users will be able to run the R program online.
1. Is it possible to do this? I am using the open open source version of RStudio which s single threaded (users responses to program requests wait until the previous user in the chain finishes running the pipeline. This implies that the proteomics programs called by R will be called by a single user at a time.

2.  Is there any way of synchronizing the linux box and the users pcs so that the files can be created in both the linux server and the PCs, otherwise the users will have to send the raw data file to the Linux box and to import data files from the linux box to their PCs.
The R program that we have calls other proteomics open source software installed in the user PCs.  I am going to install RStudio server and the Sniny server in linux so that everyone can access the program remotely.  The idea is to keep the proteomics software in the user PCS and just install the R program in the server.  Is this possible? Will the server be able to locate the software installed in the user PCs?
Guys I have codes here that is working in Numeric only.
I need a code that whatever is the last number it will generate the next number.Whether I changed the last or not it will generate a next number. Here's my code for the numeric number but I need to generate a number  using alpha-numeric.

Dim Ws As Worksheet
    Dim r As Long
    Dim ReqNo As String
    Set Ws = Worksheets("MainRecord")
    r = Ws.Cells(Ws.Rows.Count, "D").End(xlUp)
    ReqNo = CODES.Text & "-" & r + 1
    If IsNumeric(Application.Match(ReqNo, Worksheets("MainRecord").Range("D:D"), False)) Then GoTo getNum
    On Error Resume Next
    Me.REQUESTNO.Value = ReqNo

I dont know what code to use.To generate an Alpha-Numeric number
In process of rebuilding...installed SSD...Win 7 / 64 Pro...new RAM...
All drivers installed...correctly...

HOWEVER...this bugger will NOT update BIOS...

According to Belarc which I ran before the rebuild...I have BIOS v2.7...
The latest BIOS on Toshiba download site is BIOS v4.10
Everytime I try to install the BIOS i get the error message......"This computer is not supported"...

Any suggestons appreciated...
We hv external consultants who will be stationed at our office to do
Data warehse statistical analysis using R & Python :
what are the risks to watch out for ?  We provide hardened PCs

Don't allow Internet access?
Any patches needed?
Secure Coding to adhere to?
KuppingerCole Reviews AlgoSec in Executive Report
KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

I have this query that returns the count within each dollar range of quotes. I would like to add the sum of the dollar value of those quotes as well. Is that possible within this one query? If so, how would you do it?

SELECT T.RANGE AS [Range_Value],COUNT(*) AS [Number_of_Quotes]
            WHEN CONT_AMNT >=0 AND CONT_AMNT <= 1000 THEN ' 1) $0-$1000'
            WHEN CONT_AMNT >1000   AND CONT_AMNT <= 5000 THEN ' 2) $1000-$5000'
            WHEN CONT_AMNT >5000   AND CONT_AMNT <= 10000 THEN ' 3) $5000-$10000'
            WHEN CONT_AMNT >10000  AND CONT_AMNT <= 50000 THEN ' 4) $10000-$50000'
            WHEN CONT_AMNT >50000  AND CONT_AMNT <= 100000 THEN ' 5) $50000-$100000'
            WHEN CONT_AMNT >100000 AND CONT_AMNT <= 150000 THEN ' 6) $100000-$150000'
            WHEN CONT_AMNT >150000 AND CONT_AMNT <= 200000 THEN ' 7) $150000-$200000'
            WHEN CONT_AMNT >200000 AND CONT_AMNT <= 500000 THEN ' 8) $200000-$500000'
            WHEN CONT_AMNT >500000 AND CONT_AMNT <= 1000000 THEN ' 9) $500000-$1000000'
            WHEN CONT_AMNT >1000000 THEN '10) $1000000+'
       FROM (
   WHERE DATE_OF_QUOTE>= '2016/01/01' AND DATE_OF_QUOTE<'2016/12/31'
I dont think SQL can store a table with 190,005 columns and 5000 Rows.

What I have now.
Right now what I have is a table with 5001 observations. Each observation has 190,005 possible scenarios.  That's 950,215,005 rows.

My objective.
I would like to pivot this table so my observations is the first column and all the possible outcomes are columns.
The observation is an int and the possible observations are bit (basically yes or no for outcome).

I am using Microsoft SQL server 2016.

My goal.
I am trying to create a matrix to do correlation analysis. I will be bring the data into R some how i am sure that's going to be a challenge as well.

If SQL cant do it that's fine but how then can I get this data into a Text file from SQL?

Basically Type becomes columns and isTrue flag is now going horizontal so there is 1 row per Key. Remember there are 190,005 different Types for each member. Yes I do know every possible Type value. For the sake of this example I didnt think it would be wise to list all 190,005.
Here are my columns
Key, Type, isTrue

Open in new window

Thank you in advance for your help.
I am getting the following error when running make while trying to cross-compile OpenSSL:

make[1]: mips-linuxar: Command not found
Makefile:652: recipe for target 'libcrypto.a' failed
make[1]: *** [libcrypto.a] Error 127
make[1]: Leaving directory '/home/dev/openwrt/package/openssl-1.1.0f'
Makefile:128: recipe for target 'all' failed
make: *** [all] Error 2

From the Makefile:

OPTIONS=--cross-compile-prefix=mips-linux no-asan no-crypto-mdebug no-crypto-mdebug-backtrace no-ec_nistp_64_gcc_128 no-egd no-fuzz-afl no-fuzz-libfuzzer no-heartbeats no-md2 no-msan no-rc5 no-sctp no-ssl-trace no-ssl3 no-ssl3-method no-ubsan no-unit-test no-weak-ssl-ciphers no-zlib no-zlib-dynamic
CONFIGURE_ARGS=("linux-generic32", "--cross-compile-prefix=mips-linux")


Line 652
      $(AR) $@ $?

I am new to this. Please tell me how I can make this question more useful.

Thank you.
How to find the returns of multiple, irregular inflows & outflows over a short period, lets say in 4 months?

I don't want to use the XIRR as it gives the compounded annualized return, which will be misleading. I want to calculate the returns for the duration of the investment only.

For eg., please refer to the attached excel sheet which lists out 5 transactions of Buy & Sell over 4 months period.

Thanks and regards

I received a new computer last week but cannot get Task Scheduler to successfully run a VBS script.  It says it is running but the spreadsheets are not updating.  I created a new script to open Notepad and type a few words and Task Scheduler says it is running, ran successfully, but it did not..Notepad never opened.

I can manually run both scripts and they work fine.  Spreadsheets get updated and Notepad opens, types a few words, and stays open until I close Notepad.

My company's computer support has not been able to help at this time and I am currently waiting for the next level of help.  However, that could be more than a week until someone contacts me.

Attached are some screen shots I hope will help, with some identifying text blacked out with a description of what info was there.

Would any of you have any ideas as to why the scripts work when I double click on them manually to get them to run but Task Scheduler will not successfully get them to run, even though it says they are running?

I run VMware 6.0 one of my ESXI hosts lose two datastores
This host has 4 datastores 3 are local ATA drives and one is NFS
Two 0f the ATA drives are Dead or Error.
If I restart the ESXI Host they come back.

I swapped the drives out with two other drives and the same thing happened Dead or Error after about 24 hours.

I was lucky to have Veeam B& R nd I was able to recover the VMs on those two datastores.

Is my ESXi host corrupted ? or do you guys think I have a hardware problem

I found this

And ran those commands but I had no VMS running on these datastores

Maybe if I put the original drives back in the results may be different I would rather keep the existing drives in now

If there some sort of cache or something I need to clear on this host?

Thanks Tom






R is a programming language and environment used primarily for statistical data analysis.

Top Experts In