1
votes

I get a

warning: package ‘grid’ is not available (for R version 3.1.2)

but I am using R studio Version 1.0.153? I do have R 3.1.1 on my computer.

There are two warnings about,

warning:package ‘gridExtra’ was built under R version 3.1.3
warning: package ‘ggplot2’ was built under R version 3.1.3

I have checked the most viewed question, learned a lot, but still not solving my issue here..

--update--the detailed console is--

install.packages("grid")

Installing package into ‘C:/Users/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified)

Warning in install.packages : package ‘grid’ is not available (for R version 3.1.2)

1
R and Rstudio are different. RStudio is really just an interface for running R code. Your computer is likely using your R 3.1.1 version "behind the scenes". You could check R.Version()$version.string. This answer might also be helpful: stackoverflow.com/questions/13656699/update-r-using-rstudioMike H.
When are you getting this warnings/error? What commands are you actually running?MrFlick

1 Answers

1
votes

grid is a built-in package (when I do help(package="grid") it tells me Priority: base), which means it is included in every installation of R automatically. It doesn't exist on CRAN (the "Centralized R Archive Network", I think?), and can't be installed via install.packages().

When I run install.packages("grid") I get

install.packages("grid") Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) Warning messages:
1: package ‘grid’ is not available (for R Under development)
2: package ‘grid’ is a base package, and should not be updated

which is entirely as expected ...

If you run library("grid"), it should just work. (If it doesn't you have a badly screwed-up R installation and should probably re-install ...)