• 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.

randomForest package in R

J

j98

Member
The randomForest package (from the Ch21 core reading/PBOR) does not load in my version of R, and I get the error below. Is there any way around this? Also is there any chance it even comes up in the exam given that it's in the core reading but not in the list of packages here: here https://www.actuaries.org.uk/system/files/field/document/CS1 and CS2 Guide 2022 FINAL_2.pdf

> install.packages("randomForest")
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/64211/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘randomForest’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> library(randomForest)
Error in library(randomForest) :
there is no package called ‘randomForest’
 
Hi j98

I can't completely guarantee what will be on the exam though I would be surprised if the exam required use of a package not on the list of required packages.

Which version of R are you running? The guide specifies that you should be using any version of 4.0 or above.

Andy
 
Hi j98

Packages are regularly updated and are then sometimes no longer supported on older versions of R. It's possible that randomForest is no longer supported on 4.0.5. You could try downloading a later version of R.

All the best

Andy
 
  • Like
Reactions: j98
Back
Top