Checking the result on the readRAST6, I noticed that the number of bytes are 2, and I need 4 bits to store values greather than 32565, I suppose. -------------- > mapa <- readRAST6(varint, cat=FALSE) Creating BIL support files... Header File = C:/Data/Tibagi/vegPR_probio_proatlan_abr2009/tibagi_Probio_grass_sdb_apr2009/newLocation/PERMANENT/.tmp/uso_tibagi_fundo_soflor_ero30m_dila030m_mata_clump.hdr World File = C:/Data/Tibagi/vegPR_probio_proatlan_abr2009/tibagi_Probio_grass_sdb_apr2009/newLocation/PERMANENT/.tmp/uso_tibagi_fundo_soflor_ero30m_dila030m_mata_clump.wld Exporting raster as integer values (bytes=2) Using the current region settings... -------------------- But how can I chance the number of bytes, if it is not an argument on readRAST6? Best wishes
miltinho On Sun, Mar 29, 2009 at 12:43 AM, milton ruser <[email protected]>wrote: > Hi there, > > I have a set of maps on GRASS 6.5 and I need to compute some basic stats > on R 2.7.1. For some maps I get the desired results, but for other I am > getting different values. My raster are integer values >= 1 (with some NAs > where not mapped). > > I start R from GRASS session without problem, and can read the rasters > on R: > > require(spgrass6) > varint<-"uso_tibagi_fundo_soflor_ero30m_dila030m_mata_clump_AreaHA" > mapa <- readRAST6(varint, cat=FALSE) > mapa.valores<-m...@data[1] > mapa.valores<-mapa.valores[!is.na(mapa.valores)] > quantile(mapa.valores, probs=c(0.20,0.40,0.60,0.80)) > summary(mapa.valores) > rm(mapa, mapa.valores,varint) > But for one of my map I get different range of value between R and GRASS > ON GRASS - r.univar > n: 8336636 > minimum: 1 > maximum: 303396 > range: 303395 > mean: 125949 > > ON R > > summary(m...@data[1]) > uso_tibagi_fundo_soflor_dila030m_clump_mata_limpa_AreaHA > Min. : -24284 > 1st Qu.: -24284 > Median : 31 > Mean : -6551 > 3rd Qu.: 2225 > Max. : 27846 > NA's :59217475 > > -----> sessionInfo() > R version 2.7.1 (2008-06-23) > i386-pc-mingw32 > locale: > > LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252 > attached base packages: > [1] stats graphics grDevices utils datasets methods base > other attached packages: > [1] spgrass6_0.5-10 rgdal_0.5-25 sp_0.9-26 > loaded via a namespace (and not attached): > [1] grid_2.7.1 lattice_0.17-8 > Any help are welcome. > > Regards > > miltinho > Toronto, CA > > [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
