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

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 8 19:43:03 CET 2010


Users of R 2.11.1 (let alone 2.11.0) x64 Windows were asked to update 
in August, and we switched off the last remnants of support when 
2.12.0 was released.

Please do as the posting guide asked you to do before posting: update 
to R 2.12.0 (or 2.12.0 patched), and update all your packages.

lattics is 0.19-13
raster is 1.6-15
sp is 0.9-72

On Mon, 8 Nov 2010, Monica Pisica wrote:

>
> Hi Joshua,
>
> OK, my session info is this:
>
> R version 2.11.0 (2010-04-22)
> x86_64-pc-mingw32
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] raster_1.5-16 sp_0.9-64

These are not the same versions as below.

>
> loaded via a namespace (and not attached):
> [1] grid_2.11.0    lattice_0.18-8
>
> I also have installed the 32 bit version of R under windows 64 bit 
> and there the raster package has the function extract and session 
> info is:
>
> R version 2.11.0 (2010-04-22)
> i386-pc-mingw32
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] raster_1.6-10 sp_0.9-62
>
> loaded via a namespace (and not attached):
> [1] grid_2.11.0    lattice_0.18-5
>
> Obviously i would like to work with the R64 bit because i have more 
> memory available. It is not clear to me why the function extract 
> exists in the package raster for 32 bit but not for 64 bit. Is there 
> any reason?
>
> Thanks,
>
> Monica
>
>> Date: Mon, 8 Nov 2010 08:17:48 -0800
>> Subject: Re: [R] Error: could not find function "extract" in package raster
>> From: jwiley.psych at gmail.com
>> To: pisicandru at hotmail.com
>> CC: r-help at r-project.org
>>
>> 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/
>
> 	[[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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list