[R] How to install pkg when "not found" ?

Prof. Dr. Matthias Kohl Matthias.Kohl at stamats.de
Wed Dec 30 16:34:03 CET 2015


use quotes!
install.packages("ggplot2")

Am 30.12.2015 um 06:41 schrieb Judson:
>
> Using "Install Packages" from CRAN, in RStudio on Windows 7,
> I downloaded (and supposedly installed)  ggplot2 package to here:
>
> C:\Program Files\R\R-3.1.0\library\ggplot2_2.0.0\ggplot2
>
>
> .... when I try this:
>> require(ggplot2)
> .... I get the following:
> Loading required package: ggplot2
> Warning message:
> In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
>
>    there is no package called 'ggplot2'
>
>
> .... I also tried this:
>> install.packages(ggplot2)
> Error in install.packages : object 'ggplot2' not found
>
> ......
>
>
> The above library has the usual things like MASS, stats, base, utils, graphics and so on....
> ..... and if I do this:
>> require(MASS)
> .... I get this:
> Loading required package: MASS
>
> .... so that works....
>
>
> ..... Any idea what I'm doing wrong with ggplot2?
> ................... judson blake
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Prof. Dr. Matthias Kohl
www.stamats.de



More information about the R-help mailing list