[R-sig-eco] Create a grid and extract species and climate data
Adam Zeilinger
arz at berkeley.edu
Wed Feb 3 21:40:02 CET 2016
Hi Buddhi,
Assuming your climate data are represented as a series of rasters and
your species occurrences have latitude and longitude coordinates, you
can accomplish both of these things with the raster package. Using one
of the climate rasters as a reference raster, you can use the function
cellFromXY() to determine species presence/absence in your cells. And
the extract() function in raster can be used to get the climate values
from climate data rasters.
Hope this helps.
Adam
On 2/3/2016 2:32 AM, Frederico V. Faleiro wrote:
> Hi Buddhi,
>
> You can do it easily with the package letsR (
> http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12401/abstract).
>
> Cheers,
>
> Frederico
>
> On Wed, Feb 3, 2016 at 6:16 AM, Buddhi Dayananda [via r-sig-ecology] <
> ml-node+s471788n7579687h53 at n2.nabble.com> wrote:
>
>> Dear friends,
>>
>> I am looking for R support to arrange my dataset which I tried and failed
>> in Arc GIS.
>>
>> I have 6 bioclimatic variables and 14 species. I want to create a
>> 10kmX10Km
>> grid to Australia (like a fishnet in Arc GIS) and extract presence/absence
>> ( 1/0) of species in each grid and mean/ or values for each variable (
>> like
>> a matrix).
>>
>> Eg
>>
>> Grid number or centroid coordinates Sp1 Sp2 Sp3 Sp4 Bio1 Bio2
>>
>> 1 1 1 0 1 25 15
>>
>> 2 0 0 1 0 19 20
>>
>> 3 1 0 0 0 25 30
>>
>> 4 0 0 1 1 18 25
>>
>>
>> Any assistance would help.
>>
>> Buddhi
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=7579687&i=0>
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://r-sig-ecology.471788.n2.nabble.com/Create-a-grid-and-extract-species-and-climate-data-tp7579687.html
>> To unsubscribe from r-sig-ecology, click here
>> <http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=471788&code=ZnZmYWxlaXJvQGdtYWlsLmNvbXw0NzE3ODh8LTE1Nzc2NjMyMjM=>
>> .
>> NAML
>> <http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://r-sig-ecology.471788.n2.nabble.com/Create-a-grid-and-extract-species-and-climate-data-tp7579687p7579688.html
> Sent from the r-sig-ecology mailing list archive at Nabble.com.
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
--
Adam Zeilinger
Postdoctoral scholar
Berkeley Initiative for Global Change Biology
University of California Berkeley
http://adamzeilinger.weebly.com/
More information about the R-sig-ecology
mailing list