Unable to leverage R packages in JSLAll,
I had a perfectly working JMP code which was invoking R to access an API. However, I uninstalled R Studio and installed Microsoft Visual Studio Community last night and ever since I am having trouble with my scripts.
As you may see below – I have the httr package installed in R . However, when I call it from JMP, I receive the error shown in 3rd screenshot below.



Re: Unable to leverage R packages in JSLUday was working with Support on this issue.
He was able to resolve the behavior by rebooting his PC. Seems your suspicions of the registry issues being altered after the removal of R Studio were probably valid.
Re: Unable to leverage R packages in JSLHmm, that is odd Uday.
If the scripts I shared run within JMP then JMP can connect with R and run R code.
I am guessing that it must have something to do with Microsoft Visual Studio Community and httr package which was contributed by RStudio.
What happens if you uninstall Microsoft Visual Studio Community and try running your code within JMP?
Re: Unable to leverage R packages in JSL@chris_kirchberg,
I uninstalled and re-installed R but I still receive the same error .
Re: Unable to leverage R packages in JSL@chris_kirchberg,
When I run the following code to initiate the R Connection , here is what I see:
R Init();

I also ran the rest of the code you shared - and I was able to retreive the plot.
I will try re-installing R
Warning: Attaching package: 'boot'
Warning: The following object is masked from 'package:lattice':
Warning: melanoma
0
Re: Unable to leverage R packages in JSLFirst, I would run this from a JMP Script window:
R init();
You should see in the log this:
TKIntRJMP.R version 5.05
0
You can then run a simple bit of code as well and watch the log to see what happens. Try this
R Init();
R Submit("\[
library(boot)
samplemedian <- function(x, d) {
return(median(x[d]))
}
data <- rnorm(50) # Generate a dataset with 50 obs
b <- boot(data, samplemedian, R=2000) # 2000 bootstrap replications
plot(b)
]\");
//Return the graphic from the R graphic device to JMP as a picture;
JMP_plot = R Get Graphics(png);
New Window("R Bootstrap Plot", Picture Box(JMP_Plot));
R Term();
Let me know what happens in the log.
The issues might be due to the fact that you uninstalled R Studio which may have messed with the registry. You might have to reinstall R.
Chris