# RCall and problems installing R-packages

**URL:** https://discourse.julialang.org/t/rcall-and-problems-installing-r-packages/86135
**Category:** General Usage
**Created:** [August 22, 2022, 1:42pm UTC](https://discourse.julialang.org/t/rcall-and-problems-installing-r-packages/86135 "2022-08-22T13:42:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)
#### Post date: [August 22, 2022, 1:42pm UTC](https://discourse.julialang.org/t/rcall-and-problems-installing-r-packages/86135/1 "2022-08-22T13:42:10Z")

</div>

I have installed R to use RCall within Julia. Unfortunately, I am having trouble installing the R-packages that I need to use.

I have installed R at the directory C:\Users\12345\AppData\Local\Programs\R\

But when I try to install the package “ggplot2” I get the following message (Note: I get simillar messages for other packages):

install.packages(“ggplot2”)  
┌ Warning: RCall.jl: Installing package into ‘C:/Users/12345/AppData/Local/R/win-library/4.2’  
│ (as ‘lib’ is unspecified)  
│ Warning in gzfile(file, “rb”) :  
│ cannot open compressed file ‘C:\Users\12345\AppData\Local\Temp\RtmpCiAafS/repos\_https%3A%2F%[2Fmirrors.dotsrc.org](http://2Fmirrors.dotsrc.org)%2Fcran%2Fsrc%2Fcontrib.rds’, probable reason ‘No such file or directory’  
│ Warning in read.dcf(file = tmpf) :  
│ cannot open compressed file ‘C:\Users\12345\AppData\Local\Temp\RtmpCiAafS\file1b8428ee6889’, probable reason ‘No such file or directory’  
│ Warning: unable to access index for repository [https://mirrors.dotsrc.org/cran/src/contrib:](https://mirrors.dotsrc.org/cran/src/contrib:)  
│ cannot open the connection  
│ Warning: package ‘ggplot2’ is not available for this version of R

I appears I need to specify a library. If that is what is wrong, how do I do that to make RCall work?

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [August 22, 2022, 1:44pm UTC](https://discourse.julialang.org/t/rcall-and-problems-installing-r-packages/86135/2 "2022-08-22T13:44:40Z")

</div>

I remember running into similar issues. What I did was to fire up R and install the packages that I needed from R. Then RCall worked mostly flawlessly.
