Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

package ‘diamonds’ is not available (for R version 3.0.0) [duplicate]

Tags:

r

packages

what is the easy way to have diamonds package/dataset in my R environment. I am newbie using RStudio (3.0)

> install.packages("diamonds")
Warning in install.packages :
package ‘diamonds’ is not available (for R version 3.0.0)
Warning in install.packages :
package ‘diamonds’ is not available (for R version 3.0.0)

I donot want to download and rebuild R as discussed in the following thread Cannot install R-forge package using install.packages

like image 647
kashili kashili Avatar asked Nov 21 '13 03:11

kashili kashili


1 Answers

The diamonds data set is actually part of the excellent ggplot2 package (incidentally, you can find this out with ??diamonds). The following should get you started:

install.packages('ggplot2')
library('ggplot2')
diamonds
like image 149
colcarroll Avatar answered Sep 19 '22 13:09

colcarroll