I would like to be able to create a Knitr Markdown document calling different versions of R (2.15.3 and 3.0.2) from within R studio.Is this possible? The reason for this is that some packages that have been discontinued may only work in an older version of R
For example:
Title
========================================================
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I would like to run a package from
R version 2.15.3 (2013-03-01) -- "Security Blanket"
here:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```{r}
summary(cars)
```
embed plots:
```{r fig.width=7, fig.height=6}
plot(cars)
```
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I would like to run a package from
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
here:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
``{r}
summary(cars)
```
embed plots:
```{r fig.width=7, fig.height=6}
plot(cars)
I added my output here as too large for the comment box Rscript,exe is in: C:\Program Files\R\R-2.15.3\bin
```{r,engine='Rscript', engine.path='C/Program Files/R/R-2.15.3/bin/Rscript'} version
```
on running KNIT HTML I get the following error
Error in system(cmd, intern = TRUE) : '"C/Program Files/R/R-2.15.3/bin/Rscript"' not found
Use engine
tag:
```{r,engine='Rscript', engine.path='PATH_TO/R/R-3.0.2/bin/Rscript'}
version
```
```{r,engine='Rscript', engine.path='PATH_TO/R/R-2.15.3/bin/Rscript'}
version
```
EDIT add a picture of the knitr preview:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With