Reputation: 345
I try to write a report using rmarkdown, but I have tried all the methods to download the lastest version rmarkdown package. When I try to open up the rmarkdown script, it shows that
Required version package could not be found: rmarkdown 1.2 is required but 1.1 is available Check that getOption("repos") refers to CRAN repository that contains the needed package versions.
Some of the code I have tried:
install.packages("rmarkdown")
update.packages("rmarkdown")
install_github("rstudio/rmarkdown")
And my R version is 3.3.2 and my rstudio is already the lastest version now, which I think might be the problem coming from.
Upvotes: 1
Views: 3263
Reputation: 345
I am glad the problem being solved! Instead of keep trying installing packages, I updated my cran URL to cran.project. And learnt some function of adding repos, thank you all! The code follows as :
local({r <- getOption("repos"); r["CRAN"] <- "https://cran.r-project.org/"; options(repos = r)})
Upvotes: 4
Reputation: 106
This is a total reach, but I've been teaching R and RStudio and have seen this happen a lot!
Make sure the Markdown file you're creating has extension ".Rmd"
Many of my students have named their Markdown files something like "Foo.Rproj".
Upvotes: 0