Monica Pisica
2010-Nov-08 16:08 UTC
[R] Error: could not find function "extract" in package raster
Hi, I would like to use the function "extract" from package raster and i get the following error: m01e <- extract(marsh01, p) Error: could not find function "extract" marsh01 is a raster object and p is an intersectExtent object that is not null. The package is installed and loaded, i use a Windows machine 64 bit and R x64 2.11.0. Do i really need to update my R to use this function? Thanks, Monica [[alternative HTML version deleted]]
Joshua Wiley
2010-Nov-08 16:17 UTC
[R] Error: could not find function "extract" in package raster
Hi Monica, Evidently, there is not an "extract" function in your search path (base R, loaded packages, etc.). Given that you are talking about a function from a package (rather than base R), it would probably help us more if you mentioned what version of raster you have installed. You can get this easily by loading it and reporting the results of sessionInfo() (per the posting guide). On my current system (see specs below), there is an extract function and it seems to work., Cheers, Josh> sessionInfo()R version 2.12.0 (2010-10-15) Platform: i486-pc-linux-gnu (32-bit) attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] raster_1.6-10 sp_0.9-72 loaded via a namespace (and not attached): [1] grid_2.12.0 lattice_0.19-13 tools_2.12.0 On Mon, Nov 8, 2010 at 8:08 AM, Monica Pisica <pisicandru at hotmail.com> wrote:> > Hi, > > I would like to use the function "extract" from package raster and i get the following error: > ?m01e <- extract(marsh01, p) > Error: could not find function "extract" > > marsh01 is a raster object and p is an intersectExtent object that is not null. > > The package is installed and loaded, i use a Windows machine 64 bit and R x64 2.11.0. Do i really need to update my R to use this function? > > Thanks, Monica > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
Roger Bivand
2010-Nov-09 12:00 UTC
[R] Error: could not find function "extract" in package raster
In addition to the good advice given earlier, you may note for the future that the raster authors reply actively on the R-sig-geo list, often within minutes. So questions about the raster package may best be directed to that list. Roger Monica Pisica wrote:> > > Hi, > > I would like to use the function "extract" from package raster and i get > the following error: > m01e <- extract(marsh01, p) > Error: could not find function "extract" > > marsh01 is a raster object and p is an intersectExtent object that is not > null. > > The package is installed and loaded, i use a Windows machine 64 bit and R > x64 2.11.0. Do i really need to update my R to use this function? > > Thanks, Monica > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. > >----- Roger Bivand Economic Geography Section Department of Economics Norwegian School of Economics and Business Administration Helleveien 30 N-5045 Bergen, Norway -- View this message in context: http://r.789695.n4.nabble.com/Error-could-not-find-function-extract-in-package-raster-tp3032175p3033580.html Sent from the R help mailing list archive at Nabble.com.