Cannot install package markovchain in Rstudio, but I can in R

I checked available.packages in RStudio but its not there. I tried to install in R and it installed fine.
But in RStudio I get this error message
Warning in install.packages :
package ‘markovchain’ is not available (for R version 3.5.3).
I've tried updating my RStudio and R, but no luck still.

I wonder what's the R version that shows up in Rstudio? There are some startup messages in the R console.

R version 3.5.3 is rather old, and you are likely to experience compatibility issues. I highly suggest updating.

The CRAN record for {markovchain} package - https://cran.r-project.org/package=markovchain - states that the package depends on R version 3.6 or higher (it is translated from the package DESCRIPTION file).

If you absolutely positively require R 3.5.3 you might be able to install an older version of the package, but an R update should be your first choice.

1 Like

Have in mind that if you update R in your system but you don't change the defaul version, RStudio is going to use the default even if it is older. If you are on Windows you can change the default version by holding the Ctrl key while opening RStudio, then you should see this menu.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.