[R-sig-Geo] problem when cropping soil layers
Sarah Goslee
sarah.goslee at gmail.com
Wed Apr 4 19:35:14 CEST 2012
I think that should be:
On Wed, Apr 4, 2012 at 12:51 PM, Agus Camacho <agus.camacho at gmail.com> wrote:
> Dear list,
>
> For first time after using it several times, I had warnings using the crop
> function with a raster stack from soil layers in format geotiiff derived
> from the HWSD.
> http://spatial-analyst.net/wiki/index.php?title=Global_datasets#Soil.2Fgeology_maps
>
> specifically, when:
>
> soil=crop(soil, extent(-180,180,-56,83.5))
soil <- crop(soil, extent(c(-180,180,-56,83.5)))
See ?extent
>> warnings()Warning messages:
> 1: In if (!datatype %in% c("LOG1S", "INT1S", "INT2S", "INT4S", ... :
> the condition has length > 1 and only the first element will be used
> 2: In if (datatype == "LOGIC") { ... :
> the condition has length > 1 and only the first element will be used
> 3: In if (datatype == "BYTE") { ... :
> the condition has length > 1 and only the first element will be used
> 4: In if (datatype == "SMALL") { ... :
> the condition has length > 1 and only the first element will be used
> 5: In if (datatype == "INTEG") { ... :
>
>
> a so on for a number of datatypes.
>
> I am new to soil modeling and cant figure out any reason for this,
> specially because in other instances it did not appear such a messages.
> Anybody could tell me what happened and if the layers are still usable
> after these warnings?
>
> Thanks a lot! Think modelling would not be possible for a lot of people
> without this list..
>
>
> There it goes my session info.
>
>> sessionInfo()R version 2.14.1 (2011-12-22)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
> LC_MONETARY=English_Australia.1252
> [4] LC_NUMERIC=C LC_TIME=English_Australia.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] maptools_0.8-14 foreign_0.8-48 geosphere_1.2-26
> rgdal_0.7-8 outliers_0.14 XML_3.9-4.1
> [7] PBSmapping_2.62.34 dismo_0.7-14 raster_1.9-58
> sp_0.9-93 ggplot2_0.9.0 lattice_0.20-0
> [13] plyr_1.7.1
>
> loaded via a namespace (and not attached):
> [1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2
> grid_2.14.1 MASS_7.3-16 memoise_0.1
> [7] munsell_0.3 proto_0.3-9.2 RColorBrewer_1.0-5
> reshape2_1.2.1 scales_0.2.0 stringr_0.6
> [13] tools_2.14.1
>
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-sig-Geo
mailing list