Re: [R-sig-Geo] Soil as predictor in SDM

2017-09-27 Thread Maurizio Marchi
Dear Narayani and Ben,
thank you very much for your replies. Actually I'm working with biomod2,
not dismo neither other models outside biomod2 (i.e. I use maxent but
inside the biomod2 package) but I did it, I saw that biomod2 is able to
handle categorical (factorial) raster too :)
Thanks

-- 
Maurizio Marchi
Skype ID: maurizioxyz
linux user 552742

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] WorldClim Version2

2017-09-27 Thread Bacou, Melanie

  
  
I would assume `raster::getData("worldclim", ...)` uses WorldClim
  version 2?
--Mel.


On 09/25/2017 05:14 PM, Andy Bunn
  wrote:


  Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised that
there isn't a dedicated package for worldclim yet ‹ making one that ties
in with packages like BIEN would be great. Perhaps I'll work on it someday.

-A

On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
 wrote:


  
Hello Andy,

I've been using raster to play with WordlClim 2.0 and it works fine. For
example:

# Download 2.5' arc P data of worldclim 2.0
# The file is 68.5 MB so it takes some time to download
P_url<- 
"http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi
p"
download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
unzip("wc2.0_2.5m_prec.zip")

#  Generate a stack object  with all monthly precipitation layers
P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
".tif",sep="")

prec2.5<- stack(P_filenames)

# Compute annual precipitation as a raster layer
P2.5<- sum(prec2.5)

# etc.

Cheers,

Marcelino


El 25/09/2017 a las 19:42, Andy Bunn escribió:


  Hello all, is anybody aware of a R package that gracefully works with
version 2 of the WorldClim data?

http://worldclim.org/version2


I have all the data extracted locally but I'm wondering if there is
something akin to getData in raster that will work with version 2 and
not
1.4 as (the brilliant) raster package currently does.

Many thanks, Andy

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
.




-- 
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España


  
  
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



  


___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Soil as predictor in SDM

2017-09-27 Thread Patrick Schratz

Hi Maurizio,

I do not really understand what exactly your problem is.
Getting the soil information stored in a raster file into a data.frame?
General use of factor variables in a model?
I also do not see the link between a factor variable and model bias.

Happy to help after clarification.

Regards, Patrick

On 09/27/2017 04:59 PM, Maurizio Marchi wrote:

Dear R users,
I would like to include soil as predictor in my model and in addition to
climatic variables. Anyway I have some doubts concerning the usd of
categorical values such as the format of my raster file. Actually, my soil
type data are categorical codes, should these codes be described as
categories prior to be used? Or shoul I reclassify my raster into numeric
values? My main concern is if I would create directional influence and bias
in the results.
Thanks


___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] Soil as predictor in SDM

2017-09-27 Thread Narayani Barve
You can use categorical variable as categorical even with number. If you
are using Maxent, then you can specify that this variable as categorical.
And maxent will take care of it. On the safer side instead of specifying
the categories as numbers, change categories to characters.

Regards,
Narayani

On Wed, Sep 27, 2017 at 10:59 AM, Maurizio Marchi <
mauriziomarch...@gmail.com> wrote:

> Dear R users,
> I would like to include soil as predictor in my model and in addition to
> climatic variables. Anyway I have some doubts concerning the usd of
> categorical values such as the format of my raster file. Actually, my soil
> type data are categorical codes, should these codes be described as
> categories prior to be used? Or shoul I reclassify my raster into numeric
> values? My main concern is if I would create directional influence and bias
> in the results.
> Thanks
> --
> Maurizio Marchi
> Skype ID: maurizioxyz
> linux user 552742
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] Soil as predictor in SDM

2017-09-27 Thread Ben Tupper
Hi,

This is addressed briefly in section 4.2 of the dismo package vignette.

https://cran.r-project.org/web/packages/dismo/vignettes/sdm.pdf 


Does that answer your question?

Ben

> On Sep 27, 2017, at 10:59 AM, Maurizio Marchi  
> wrote:
> 
> Dear R users,
> I would like to include soil as predictor in my model and in addition to
> climatic variables. Anyway I have some doubts concerning the usd of
> categorical values such as the format of my raster file. Actually, my soil
> type data are categorical codes, should these codes be described as
> categories prior to be used? Or shoul I reclassify my raster into numeric
> values? My main concern is if I would create directional influence and bias
> in the results.
> Thanks
> -- 
> Maurizio Marchi
> Skype ID: maurizioxyz
> linux user 552742
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecocast Reports: http://seascapemodeling.org/ecocast.html
Tick Reports: https://report.bigelow.org/tick/
Jellyfish Reports: https://jellyfish.bigelow.org/jellyfish/




[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


[R-sig-Geo] Soil as predictor in SDM

2017-09-27 Thread Maurizio Marchi
Dear R users,
I would like to include soil as predictor in my model and in addition to
climatic variables. Anyway I have some doubts concerning the usd of
categorical values such as the format of my raster file. Actually, my soil
type data are categorical codes, should these codes be described as
categories prior to be used? Or shoul I reclassify my raster into numeric
values? My main concern is if I would create directional influence and bias
in the results.
Thanks
-- 
Maurizio Marchi
Skype ID: maurizioxyz
linux user 552742

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo