2008/8/25 Henrique Dallazuanna <[EMAIL PROTECTED]>: > Is there the rimage package: > > > if(!require(rimage))install.packages("rimage") > x <- read.jpeg(system.file("data", "cat.jpg", package="rimage"))
Nice, but if the require() fails and the package installs via install.packages, you still have to do the require() (or 'library()'), so you need something like: if(!require(rimage)){ install.packages("rimage") ; require(rimage) } maybe we need a requireOrGet() function that goes and gets it from CRAN if it can't find it :) Barry ______________________________________________ R-help@r-project.org mailing list 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.