Right Barry, I forget. Thanks
On Mon, Aug 25, 2008 at 4:51 PM, Barry Rowlingson <[EMAIL PROTECTED]> wrote: > 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 > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ 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.