[R-sig-Geo] Help to select the raw in a data.frame with the max value

2009-04-26 Thread Alessandro
Dear User, thank for the attention. I have a data.frame with 5 columns (ex:ID, a1,a2,a3,a4) and 1000 rows. I wish to find the absolute max value for all data.frame and save a new data.frame with the row where is that value. Ex: ID: 1,2,3,4,5,6,7,8,9,10 a1:1,2,3,4,5,6,7,8,9,10 a2:11,12,13,

[R-sig-Geo] HELP to cbind several data.frame with a LOOP

2009-04-09 Thread Alessandro
Dear R users, thank for help. SORRY I am seeing in google a maillist but I didn't find a solution for my problem I have several txt file (with the same number of column and HEADER) to merge together, this is an example: Tableanalysis_firenze_10.txt Tableanalysis_firenze_20.txt Tablean

[R-sig-Geo] R: Inverse distance weighting

2009-03-20 Thread Alessandro Montaghi
Hey Jiyoung, I use RSAGA package to do interpolation with IDW. You need to install SAGA GIS and library(RSAGA). The command is rsaga.geoprocessor(lib="grid_gridding", module=0, I hope this is help you Ale -Messaggio originale- Da: r-sig-geo-boun...@stat.math.ethz

[R-sig-Geo] Help with suggestion to finish to write a "layer/bins density index"

2009-03-10 Thread Alessandro
layer/bins "Hbins=(H max - 2)/10" # create a copy of "canopy2644147max.H" because we need after Hbins_canopy2644147 <- canopy2644147max.H Hbins_canopy2644147$x <- (Hbins_canopy2644147$x -2)/10 Here start my limit. I tried two day several solution with obtain the

[R-sig-Geo] help to creating a points subset with R: Cut points shapefaile with a buffer polygon shapefile

2009-02-25 Thread Alessandro
Hi All Researcher, Thanks for help and suggestions. I have a points shapefile (soil) with one column [H] and a circular buffer polygons (plots) with a column [ID identify. Ex: 1,2,3 etc etc]. I wish to clip the points shapefile with the buffer and obtain a new points shape file (only the

[R-sig-Geo] R: substract two columns in a shapefile (but SAGA+R has an bug error)

2009-02-24 Thread Alessandro
uot;) because maptool go out of memory, with rgdal the third column appears empty (value: 0.) I attached a small file of my data set. Thanks again for your help and time Ale -Messaggio originale- Da: Roger Bivand [mailto:roger.biv...@nhh.no] Inviato: martedì 24 febbraio 2009 10.

[R-sig-Geo] substract two columns in a shapefile (but SAGA+R has an bug error)

2009-02-24 Thread Alessandro
Dear Researcher, I have a shapefile with two columns "a" and "b" and I wish to subtract a-b to obtain a new column of difference. I tried in SAGA + R with the module "Table calculator for shapes". This worked without an error, but it didn't save the results either. I suspect that this is a bug

[R-sig-Geo] R+SAGA: Table calculator for shapes

2009-02-23 Thread Alessandro
Hi all and thanks for help, I have a shapefile "canopy_height.shp" with two column "a" and "b". I wish to do a-b and to obtain a third column ("a-b"). I am using the R+SAGA module: "Table calculator for shapes", and all run good, but when I open the shape-file after (in ARCMAP) I don't see the

[R-sig-Geo] how create grid raster with 0.5 size of resolution

2008-12-03 Thread Alessandro
Hi R- Reserchers To improve my analysis i need a raster with 0.5 x 0.5 of resolution. I use this code but I tried several solution to find the right command to obtain 0.5x0.5 resolution Thanks Ale > dem.area <- ([EMAIL PROTECTED],[EMAIL PROTECTED],1])*([EMAIL PROTECTED],[EMAIL

[R-sig-Geo] R: GSTAT: Optimize power value for IDW (Paul Hiemstra approach)

2008-12-02 Thread Alessandro
Hi Normally I use the R+SAGA to calculate the IDW and create a raster, with this follow code. I change the radius input with a loop formula to create several raster and after check the best result (I am studying a oak forest with low density) radii.list <- as.list(c(5, 10, 15, 20, 25, 30)) for

[R-sig-Geo] problem with loop formula in my analysis

2008-11-19 Thread Alessandro
Hi All, I read a lot about loop formula but this morning I tried to applied the loop for the following formulas I know it's easy for an expertise, but sorry I am working with R in this mounts and I change completely my GIS philosophy. Thanks for help give a coordinates attribution

[R-sig-Geo] calculate geometric mean of mass of points

2008-11-19 Thread Alessandro
Hi all, I have a points shape and I wish to calculate the geometric centre of this points shape and create a new points with R. But It's over my knowledge. Is there suggestions? Thanks Ale [[alternative HTML version deleted]] ___ R

[R-sig-Geo] Bug report in Merged module di R+SAGA

2008-11-14 Thread Alessandro
Hi All, There is a bug in the SAGA merged module in R. I tried it with SAGA 2.0.3 from within R, with different grids, and It's ran forever. This must be a bug in the Merged module, specifically in the command line version of SAGA (saga_cmd). It's been a problem in some other problems too t

[R-sig-Geo] problem with merge grids in R+SAGA

2008-11-13 Thread alessandro . montaghi
Hi All when I use this function with R and SAGA: rsaga.get.usage("grid_tools", 3) rsaga.geoprocessor(lib="grid_tools", module=3, param=list(GRIDS="DSM1.sgrd,DSM2.sgrd,DSM3.sgrd",GRID_TARGET="DSM.sgrd",TYPE=7, INTERPOL=2, OVERLAP=0)) I have this problem SAGA CMD 2.0.3 library path: C:\Wi

[R-sig-Geo] Improve memory in Windows Vista

2008-11-10 Thread Alessandro
HI Users, I must processing a large data set in R and I wish improve my PC memory. I have a Windows Vista with 4 Gb di RAM and Intel centrino In ordinary modality my memory is this > memory.size(TRUE) [1] 13.4375 > memory.size() [1] 11.01423 If I use the command line "C:\program fi

[R-sig-Geo] R: merge 2 txt file (PROBLEM OF MEMORY)

2008-11-07 Thread Alessandro
268980 ... $ Y: num 4148981 4149013 4149090 4149097 4149110 ... $ Z: num 1628 1640 1668 1670 1673 ... > THE result is: ground1 (=2356617) ground2 (=3235340) But the ground is only 89819 I think there is a problem of memory Ale -Messaggio originale- Da: Ashton Shortridge [mailto:[E

[R-sig-Geo] merge 2 txt file

2008-11-04 Thread Alessandro
Hi all, I have two txt file with X,Y,Z column and I need to merge together I tried file_all <- merge("file1.txt","file2.txt") but I don't sure about the result. Is It this code correct? Thanks Ale [[alternative HTML version deleted]] _

[R-sig-Geo] Help with "Zonal Grid Statistics" (R+SAGA)

2008-10-29 Thread Alessandro
Hi All, I have two raster (plots.sgrd the "Zone Grid" and DCM_1_power10.sgrd the "Grids to analyse") In SAGA the "Zonal Grid Statistics" run very well but not in R. Could you help and suggestion me please? rsaga.geoprocessor(lib="geostatistics_grid", module=6)

[R-sig-Geo] get coordinates to multi file

2008-10-28 Thread Alessandro
Hi All, I need to understand How I could to get coordinate to multi-files in a some code: I import X,Y,Z txt files (=vegetation_2.txt, vegetation_3.txt, vegetation_4.txt, etc etc.) with for(i in 2:4) assign(paste('vegetation',i,sep='_'),read.delim(paste('vegetation_',i,'.txt' ,sep='')))

[R-sig-Geo] import sever txt files with one code in (R+SAGA)

2008-10-27 Thread Alessandro
Hi All, I have several txt files for a forest structures analysis and I wish to import, get coordinates and convert in shape. I need eventually if this code is correct: (files name: vegetation_2.txt, vegetation_3.txt, etc.etc.) #import 4 files txt for (i in 2:4){read.delim (file=paste(

[R-sig-Geo] help to union two code in one

2008-10-24 Thread Alessandro
Hi All, Is it possible union two code in one (R+SAGA) like this to export from .sgrd to ascii files? (file: DCM_1_power10.sgrd, DCM_1_power11.sgrd, DCM_1_power12.sgrd, DCM_1_power40.sgrd and DCM_2_power10.sgrd, DCM_2_power11.sgrd, DCM_2_power12.sgrd, DCM_2_power40.sgrd) for(method

[R-sig-Geo] export .sgrd in tif with R+SAGA

2008-10-23 Thread Alessandro
Hi All, Is It possible export a .sgrd grid in .tif image with R+SAGA? Thanks Ale [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] Create a 30 grid .asc with name in loop formula

2008-10-23 Thread Alessandro
Hi All, I wish to create a 30 grid .asc with name DCM_1_power10.asc, DCM_1_power11.asc, DCM_1_power12.asc, etc etc, but I tried different possibility (in ??? area) but always I have only one raster . Sorry and thanks for suggestion #A# export .sgrd grid to .asc grid for(method in 1:3

[R-sig-Geo] export multi grids from .sgrd to asc fils in one simple code

2008-10-23 Thread Alessandro
Hi all, I don't understand the formula to export multigrid from .sgrd to asc fillies. With one grid is es: grid_1.sgrd e grid_2.sgrd rsaga.sgrd.to.esri(in.sgrds=c("gird_1.sgrd","grid_2.sgrd"), out.grids=c("grid_1.asc","grid_2.asc"), prec=1) but I have 40 files L I tried with my (l

[R-sig-Geo] R+SAGA library=SHAPE_GRID

2008-10-22 Thread Alessandro
Hi All, Is there a resercher to know the code to use the module "Shape_grid" in R+SAGA Thanks for help Ale [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/lis

[R-sig-Geo] summary pixel inside the shape-file polygon with R+SAGA

2008-10-21 Thread Alessandro
Hi All, I have 10 raster (DCM_1_power10.sgrd, DCM_1-power11.sgrd, etc etc) and 1 polygon shape-file (sierraplots.shp) with several plots (circular) with one field data [V]. I have the following question. I wish to sum the value of pixel inside the polygon with R+SAGA and correlate the plots val

[R-sig-Geo] error in my code

2008-10-21 Thread Alessandro
Hi all and thanks for attention. I have to raster DCM_1.sgrd and DCM_2.sgrd. I wish to elevate to power of 1.5 to 4 both rasters. When I use this code I have this problem: for(method in 1:2) { power<- seq(1.5, 4.0, by=0.1) for (i in 1:length(power)){ rsaga.grid.calculus(i

[R-sig-Geo] help to Improve "elegant" code

2008-10-20 Thread Alessandro
Hi all, I wish improve this code. I have 3 raster DCM_1, DCM_2, and DCM_3 (where: DCM= Digital Crown Model) obtained from three methodology. To apply my analysis I wish to elevate every raster to power of 1.5 to 4.0 by 0.1. Respect to write three times the below formula I wish to understatin

[R-sig-Geo] R: R: suggestion to write a more elegant code

2008-10-16 Thread Alessandro
t;")) } BUT... the only fix is create files with name DCM_1_power15.sgrd, DCM_1_power1.6.sgrd, etc. etc. because the code creates files like this: DCM_1_power1.sgrd, DCM_1_power2.sgrd, etc. etc. Alex -Messaggio originale- Da: Alexander Brenning [mailto:[EMAIL PROTECTED]

[R-sig-Geo] R: suggestion to write a more elegant code

2008-10-16 Thread Alessandro
ol in: "for (i in 1:length(power)){ rsaga.grid.calculus(in.grids = c("DCM_1.sgrd"),out.grid =paste("DCM_1_power"power" > } Errore: unexpected '}' in "}" > > -Messaggio originale- Da: Alexander Brenning [mailto:[EMAIL PROTECTED] Inviato

[R-sig-Geo] suggestion to write a more elegant code

2008-10-16 Thread Alessandro
Hi all, I need a suggestion to write this code in R more elegant . I have a DSM grid and I need to create a different grid raisin to different power. Thanx Ale rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid = "DCM_1_power15.sgrd", formula = ~^1.5) rsaga.grid.calculus(in.gr

[R-sig-Geo] R+SAGA formula to subtract two raster

2008-10-15 Thread Alessandro
Hi All, I need help to write a code in R to subtract two raster in SAGA. I have "DEM_1_f.sgrd" and "DSM_1_f.sgrd" in SAGA format and I wish to subtract (DSM_1_f.sgrd - DEM_1_f.sgrd) to obtain a new layer A part of the code is this: #A# DEM - 1) Shapes to Grid rsaga.get.usage("grid

[R-sig-Geo] Points density in R

2008-10-14 Thread Alessandro
Hi all, I have a txt file with X,Y,Z value. I wish to create a density points Map in R but sorry I didn't find a right code in R. Part of my code is this. I have a another question. With many data files to import, Is It possible don't write 10 lines like my not beautiful code? Thanks

[R-sig-Geo] stationary test

2008-08-07 Thread Alessandro
Hi All, is there un code to do a stationary test in R? because I have a data-base and I wish to know there is or not a stationary in my data-set. Alessandro [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo

[R-sig-Geo] eliminate outlays

2008-08-06 Thread Alessandro
Hi All, After a normalization of my data-set with: testground$Z<-qnorm((rank(testground$Z)-0.375)/(sum(!is.na(testground$Z))+0. 25)) #normalize In boxplot appear outlays value (see fig). After this I wish eliminate this outlays to processing the data with kriging model. There is sugges

[R-sig-Geo] errata correge fig - eliminate outlays

2008-08-06 Thread Alessandro
Sorry this is the corret fig Ale <>___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

[R-sig-Geo] R: R: LIDAR Problem in R (THANKS for HELP)

2008-08-05 Thread Alessandro
Thanks But No this is the problem, I don’t ditch VISTA (the nightmare) in this moment Da: Adam Terando [mailto:[EMAIL PROTECTED] Inviato: martedì 5 agosto 2008 13.00 A: Alessandro Cc: 'Matt Oliver'; r-sig-geo@stat.math.ethz.ch Oggetto: Re: [R-sig-Geo] R: LIDAR Pr

[R-sig-Geo] R: LIDAR Problem in R (THANKS for HELP)

2008-08-05 Thread Alessandro
My notebook is: Hp Pavilion dv6700 notebook PC Intel() Core ™2 Duo CPU T9300 °2.50gHz 2,50GHz RAM: 4.00 GB OS: 32bit Windows (TERRIBLE!) VISTA Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Matt Oliver Inviato: martedì 5 agosto 2008 12.02 A: Alessandro Cc