[R] Error: could not find function "extract" in package raster

Joshua Wiley jwiley.psych at gmail.com
Mon Nov 8 17:17:48 CET 2010


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/



More information about the R-help mailing list