• We are pleased to announce that the winner of our Feedback Prize Draw for the Winter 2024-25 session and winning £150 of gift vouchers is Zhao Liang Tay. Congratulations to Zhao Liang. If you fancy winning £150 worth of gift vouchers (from a major UK store) for the Summer 2025 exam sitting for just a few minutes of your time throughout the session, please see our website at https://www.acted.co.uk/further-info.html?pat=feedback#feedback-prize for more information on how you can make sure your name is included in the draw at the end of the session.
  • Please be advised that the SP1, SP5 and SP7 X1 deadline is the 14th July and not the 17th June as first stated. Please accept out apologies for any confusion caused.

CS2 Paper B - packages not downloading in R Studio

  • Thread starter alexandra jayne birkett
  • Start date
A

alexandra jayne birkett

Member
Hello Everyone,
I am having some trouble with R Studio and installing the packages I need. I had these installed not even one month ago so I'm not sure why they're not available now. I have tried, for example installing the markovchain package and these are the error messages I get:

> install.packages("markovchain")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/AlexandraBirkett/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/markovchain_0.9.1.zip'
Content type 'application/zip' length 1894237 bytes (1.8 MB)
downloaded 1.8 MB

package ‘markovchain’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\AlexandraBirkett\AppData\Local\Temp\Rtmp8Qu79v\downloaded_packages
> library(markovchain)
Package: markovchain
Version: 0.9.1
Date: 2023-01-20
BugReport: https://github.com/spedygiorgio/markovchain/issues

Warning message:
package ‘markovchain’ was built under R version 4.2.3



I have tried uninstalling and reinstalling R studio, updating R studio and also downloading 'R Tools' as mentioned in the error message. As another example, when I try to install the glmnet package, this is the error message I receive:

> install.packages("glmnet")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/AlexandraBirkett/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/glmnet_4.1-7.zip'
Content type 'application/zip' length 2446887 bytes (2.3 MB)
downloaded 2.3 MB

package ‘glmnet’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\AlexandraBirkett\AppData\Local\Temp\RtmpKYCK0S\downloaded_packages

I'd really appreciate some help from somebody so I can continue with my Paper B prep for Wednesday.

Alex
 
Hi Alex

Although you're getting warning messages, it does seem to say that the packages were installed. What happens if you run:

library(markovchain)

and try to use the functionality?

All the best

Andy
 
Hi, I am facing the same issue with being unable to download the markov chain package.

Error in library(markovchain) : there is no package called ‘markovchain’

Could anyone please assist. Thanks.
 
Hello

If you run the library command and it can't find the package, then it hasn't been installed.

What happens when you try to run:

install.packages("markovchain")

Andy
 
Back
Top