[R-sig-Geo] problem with Expression in a Plot

2010-11-25 Thread gianni lavaredo
Dear researchers, I spent several times to resolve this problem. Sorry I know is easy. in a plot a need to write RMSE [m3/ha] i am using but I can close the last "]" ylab=expression(paste("RMSE [m")^3/ha), my final result is RMSE [m3/ha but i need RMSE [m3\ha] thanks for yout time Gianni

[R-sig-Geo] Help to know a function to count how many elemant repeat in a data.farme

2010-11-22 Thread gianni lavaredo
Dear Researchers I am looking for a function to count how many elements repeats inside my data.frame and create a new data.frame as the following example. thanks and sorry for desturbing example mydata <- data.frame(myfield=c("A","A","A","A","A","A","B","B","B","B","C","C","C","D","D")) #result

[R-sig-Geo] NOT easy ID selection and split data.frame

2010-11-10 Thread gianni lavaredo
Dear Researcher, I have a problem and I don't know is possible to resolve with R mydata <- data.frame(ID=c(1015344101,1015344102,1015344103,1015344104,1015344105,1015344106,1015344107,1015344108,1015344109,1015344110, 1015344201,1015344202,1015344203,1015344204,1015344205,1015344206,1015344207,

[R-sig-Geo] help to select a data.frame in fuction of ID

2010-10-21 Thread gianni lavaredo
Dear Researchers, sorry If I ask a simple question, but this night I have no idea to resolv this question. I have a data.frame (just a simple example) mydata <- data.frame(id=c(1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,5), H=c(1,30,43,67,33,78,90,45,4,8,34,3,82,94,12,15,62,89,3,56,96,3), limit=c

[R-sig-Geo] problem to read ASCII file in Raster or readAsciiGrid (different stretched value and classified value)

2010-10-08 Thread gianni lavaredo
dear Researchers, I have a ASCII file with classified value (ex: 0-28) and stretched value (0-29871) in Arcmap. When I try to read read with Raster or readAsciiGrid the final result is with stretched value. Some people know some solution? thanks in advance Gianni [[alternative HTML vers

[R-sig-Geo] problem with smooth.spline

2010-10-04 Thread gianni lavaredo
Dear Reasearchers I am try to use "smooth.spline" with a X,Y,Z points file smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE, all.knots = FALSE, nknots = NULL, keep.data = TRUE, df.offset = 0, penalty = 1, control.spar = list()) where: xa

[R-sig-Geo] Help find a package with "Modifed Quadratic Shepard", "Spline with tension", "inverse quadratic"

2010-10-04 Thread gianni lavaredo
Dear Researchers, for my work I need to test several interoplation tec.. I found these: 1. Inverse Distance Weighted (IDW) interpolation: gstat 2. Multilevel B-spline Approximation: MBA 3. Thin Plate Spline: fileds 4. Bivariate Linear Interpolation: Akima 5. Bivariate cubic spline interpolation:

Re: [R-sig-Geo] help with "Tps" function to create a surface

2010-10-03 Thread gianni lavaredo
could > contact the author(s) of the fields package, I believe they're not > listening to this list. > -- > Edzer > > > On 10/03/2010 05:51 PM, gianni lavaredo wrote: > > Dear Researchers, > > > > > > I have a problem with Tps function. I tried several days

[R-sig-Geo] help with "Tps" function to create a surface

2010-10-03 Thread gianni lavaredo
Dear Researchers, I have a problem with Tps function. I tried several days and I am worked saturday night and I am working sunday, but I have always the same Error. I didn't find a solution in the web sorry. I have a "SpatialPointsDataFrame" with X, Y and H value > class( input.train) [1] "Spat

[R-sig-Geo] best shape sub-area to testing several interpolate techniques

2010-09-29 Thread gianni lavaredo
Dear Researchers, I have a polygon area (1 km by 1 km) with point values and I wish to test in 3 sub-areas several intepolation techniques. My question is what the best shape to create a sub-area? circle or square? thanks Gianni [[alternative HTML version deleted]] _

[R-sig-Geo] using \tab in Rd files

2010-09-28 Thread gianni lavaredo
Dear Reaseachers, Same people know I can use TAB(\tab) comand in in Rd files to have this form in the final PDF? easy example plot(mydata$X,maydata$Y, main="my data plot", col="chocolate4",pch=19,cex = 0.01) thanks and sorry for desturb Gianni [[alternative HTML vers

[R-sig-Geo] help to find a link how to write syntax the package manual

2010-09-27 Thread gianni lavaredo
Dear Researchers, is there a link where i can study the syntax of latex to write the manual in R? ex: i wish to have in the final pdf and html my sample: sample1 sample2 sample3 sample4 sample5 but i have mysample:sample1sample2sample3sample4sample5 gianni [[alternative HTML version de

[R-sig-Geo] problem to create a R library

2010-09-23 Thread gianni lavaredo
dear Researches, I am try to create my library but in "R CMD check" comand i have this message * using log directory 'C:/MyR_library/SLULidar.Rcheck' * using R version 2.11.1 (2010-05-31) * using session charset: ISO8859-1 * checking for file 'SLULidar/DESCRIPTION' ... OK * checking extension typ

[R-sig-Geo] help to save a "SpatialPixelsDataFrame" in several image format via writeGDAL

2010-09-21 Thread gianni lavaredo
Dear Reseachers, I wish to save a "SpatialPixelsDataFrame" in several format (ascii, tiff, jpg, ect ect) using writeGDAL, but I don't understand my error (it's the first time I use this function) str(grid.aggr) Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data :'

[R-sig-Geo] create an Hexagonal grid

2010-09-15 Thread gianni lavaredo
Dear reseacher, is there a way to create an Hexagonal grid with R? thanks Gianni [[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] suggestion to write a function

2010-09-13 Thread gianni lavaredo
dear Researchers, I am writing a function to improve my skills in R and make more elegant code but I need a simple suggestion, because I am looking libraries to learn the right syntax. Is It correct to name the input file "Input" (with uppercase i) and Output file "Output" or "filename"? thanks G

[R-sig-Geo] trunk columns name in a data.frame to convert in a shape-file

2010-09-09 Thread gianni lavaredo
Dear Researchers, I have a data frame with several column with the name letters more of 8 characters. I wish to convert in a shape-file but there is a problem because the names of the columns are more the 8 letters limit. Is there a function to trunk the names is a data.frame? this is a easy exam

[R-sig-Geo] elegant way to processing several loops in the same time

2010-09-02 Thread gianni lavaredo
Dear Researchers, i am analyzing statistics of several grids image (i.e. 3 patch: A1, A2, A3) for my work with 4 resolution scale (0.5,1.0,1.5,2.0). This take a lot of time. I am asking about reference and web link to learn how I can run in the same time the same loop for the patch A1, A2 and A3.

[R-sig-Geo] Problem to Save a SpatialPolygonsDataFrame in a shape-file (GDAL Error 1: Invalid index : -1)

2010-08-31 Thread gianni lavaredo
Dear reseearchers, I have a problem to save a SpatialPolygonsDataFrame in a shape file my SpatialPolygonsDataFrame = sub.area.SPDF thanks in Advance Gianni > writeOGR(sub.area.SPDF,".", paste("Sub_Area",rand.patch[[i]],sep=""), driver="ESRI Shapefile") Error in writeOGR(sub.area.SPDF, ".", paste

[R-sig-Geo] Help to Evaluation Digital Terrain Model (DTM)

2010-08-30 Thread gianni lavaredo
Dear Researchers, sorry for the first email but i have connection problem I am writing a code to evaluate several interpolation methods to create a DEM from LiDAR points. I read in bibliography several papers and methods, but same methods I didn't find inside the library: Methods Inverse distanc

[R-sig-Geo] Help to Evaluation Digital Terrain Model (DTM)

2010-08-30 Thread gianni lavaredo
Dear Researchers, I am writing a code to evaluate several interpolation methods to create a DEM from LiDAR points. I read in bibliograghy several papers and methods, but same methods I didn't find inside the library: Methods Inverse distance weighted/ [[alternative HTML version deleted]]

[R-sig-Geo] Help to convert a Polygon in SpatialPolygonsDataFrame

2010-08-27 Thread gianni lavaredo
dear Researcher, it's friday afternoon i am starting to be tired. I don't rememeber the method to convert a polygon class in a SpatialPolygonsDataFrame to use overlay later. Sorry for destrub with this simple question. thanks in advance Gianni mywindow <- owin(myd...@bbox[1,],myd...@bbox[2,])

[R-sig-Geo] Help to know Swedish projection (proj4string(myfile) <- CRS(""))

2010-08-26 Thread gianni lavaredo
Dear Resercher, i am working on data from Sweden in RT 90 system and SWEREF 99 (TM) system. I wish to use the proj4string but I can not find the right CRS. Thanks for helping me and suggestion website to have a list Gianni proj4string(mydata) <- CRS("?") [[alternative HTML version d

[R-sig-Geo] Suggestion to build a Special Filter for a Raster classification

2010-04-13 Thread gianni lavaredo
Dear Researchers, Sorry if I use your time with this email, but I wish to ask a suggestion to build-up a special filter in a forest/no forest classification. In the end of my methodology I have a raster image with Forest (pixel with 0 value) and No forest area (pixel with 1 value). But when plot t

[R-sig-Geo] Fill hole in a spatialdpolygon

2010-04-12 Thread gianni lavaredo
Dear Researcher I have a spatialdataframepolygon with 2 holes (area 1° hole = 5 m2 and area 2°hole = 10 m2). I ask some suggestion (function or library) How I can close only the hole with area < 5 m2. thanks always for help Gianni [[alternative HTML version deleted]] _

[R-sig-Geo] suggestion to sum value inside a row in a data.frame

2010-04-08 Thread gianni lavaredo
Dear Reseachers, I need a suggestion to know How I can sum value inside the same row in function of the same ID p <- data.frame(ID=c(1,2,3,4,5,6,1,2,3,4,6),x=c(10,10,10,10,10,10,10,10,10,10,10)) > p ID x 1 1 10 2 2 10 3 3 10 4 4 10 5 5 10 6 6 10 7 1 10 8 2 10 9 3 10 10 4 1

[R-sig-Geo] create a regular grid from a given point

2010-04-08 Thread gianni lavaredo
Dear researcher, is there a function in "spatstat" to create a regular grid (in all direction) from a given point? thanks for all suggestion Gianni [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch ht

[R-sig-Geo] problem to plot in 3D in raster library

2010-04-06 Thread gianni lavaredo
dear All, I have a problem to use polt3d in raster, and I don't understand where is the set-up problem > plot3D(IDW_DEM,maxpixels=10,asRaster = TRUE) Errore in sampleRegular(x, n = maxpixels, asRaster = TRUE) : unused argument(s) (n = maxpixels) thanks Gianni [[alternative HTML v

[R-sig-Geo] create a asymmetric ellipse

2010-03-22 Thread gianni lavaredo
Dear Researchers, nobody know same fuction to draw an asymmetric ellipse as the fig starting from a data.frame cc <- data.frame(ID = 1, xx= 4256300, yy= 336235, N = 5.3, S= 2.1, W = 3.5, E= 0.3) or cc <- data.frame(ID = 1, xx= 4256300, yy= 336235, y = 7.4, x=3.8) where xx and yy are the coordi

[R-sig-Geo] plot a ellispe in R

2010-03-22 Thread gianni lavaredo
dear reseacher, I have a data as: cc <- data.frame(ID = 1, xx= 4256300, yy= 336235, N = 5.3, S= 2.1, W = 3.5, E= 0.3) and I wish to plot a ellispe in R. I am studing ellipse package but is there a easy way to do this? thanks Gianni [[alternative HTML version deleted]]

[R-sig-Geo] create square buffer

2010-03-22 Thread gianni lavaredo
dear researcher is Ii possible to create square buffer with disc function? when I use npoly=4 I have a rhombus and when I use rotate I have a square but change the coordinates. thanks and sorry for this short email, but It's late in Italy and my english is gone Thanks Gianni [[alternati

[R-sig-Geo] get attribute from line to points

2010-02-26 Thread gianni lavaredo
Dear Researcher, I have a line a one point on this line (in spatstat format and shapefile format). I am searching a method (or package) to give information from the line to the point. Thanks for help. I am seraching but I didn't find nothing and I have no idea Thanks Gianni [[alternati

[R-sig-Geo] select number in a filter matrix

2010-02-26 Thread gianni lavaredo
Dear Researchers, I wish to ask and help to write a good and elegant method to select a right sequence in a matrix that i need to do a Remote Sensing Filter prova <- t(matrix(seq(1:16), nrow=4,ncol=4)) > prova [,1] [,2] [,3] [,4] [1,]1234 [2,]5678 [3,]9

[R-sig-Geo] selection a right number in a sequance for a RS filter sampling

2010-02-25 Thread gianni lavaredo
dear Researcher Sorry that I know this is not the right email-list and this is a basic help but I am doing a remotesensing filter and I am honest, I have no idea how I can do this. I have a sequance form 1 to 16 > seq(1:16) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 and I wish to sele

[R-sig-Geo] Convert a random point in a CROSS Invetory tools for line elements in a ground: Helps and suggestion

2010-02-23 Thread gianni lavaredo
Dear Researchers, I am doing a Cross Invetory from random point. I wish to convert from points in a cross (this is a forestry inventory tools) for calculate the linera elements in my study area. I did all part but I am reading how I can convert my list in a Line shapefile. Every line is in the lis

[R-sig-Geo] suggestion to imrpove: Generating Random Transects of Same Length (by marcelino de la cruz)

2010-02-18 Thread gianni lavaredo
Dear Researchers, I wish to improve the code of "Generating Random Transects of Same Length", by Marcellino De la Cruz to do a forest invetory analysis I am trying to use with "Stratified Random Point" inside a grid. the problem is: sometimes the transect line enter inside another square (if You

[R-sig-Geo] compute buffer from point shapefile to have shapefile

2010-02-15 Thread gianni lavaredo
Dear Researchers, I am looking for a library to compute buffer (Ex: 10 m radius) around a shapefile point file. I find buffer {adehabitat} but I wish to know if there is another library to compute buffer. Thanks for helps gianni [[alternative HTML version deleted]] _

[R-sig-Geo] suggestion to creating LIS (Line Intersect Sampling ) for Dead Wood

2010-02-11 Thread gianni lavaredo
Dear Researchers, thanks for attention and patience I generated with "spsample" a x number of random points and my next step is change the the point to line (ex: 30-40 m) to have LIS (*Line Intersect Sampling SEE REFERENCE **Van Wagner CE (1968). *The line intersect method in forest fuel sampling

[R-sig-Geo] Export IDRISI vector format

2010-02-11 Thread gianni lavaredo
Dear reseachers is there a pck to export (and import) vector and raster with IDRISI format? Thanks Gianni [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-g

[R-sig-Geo] create a polygon shape file from a points shape file

2010-02-10 Thread gianni lavaredo
dear R users, there is same possibility to convert a points shape file in a polygon shape file? where the corner are the last points thanks gianni [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch http

[R-sig-Geo] get X and Y form point shapefile

2010-02-10 Thread gianni lavaredo
dear Rearchers I know this is easy but after 5 hours on R, I am honest and I don't rememeber to get X, Y coordinate from point shapefile sample.shp <- readShapeSpatial("sample.shp") proj4string(sample.shp) <- CRS("+init=epsg:26911") str(sample.shp) str(sample.shp) Formal class 'SpatialPointsDa

[R-sig-Geo] problem with Maptools pack

2010-02-10 Thread gianni lavaredo
Dear Reseachers I have a problem to read the Help file of maptools and now I see I have a problem to read.shape fucntion. I download the new version of R (2.10.1) library(maptools) x <- read.shape("sample.shp", package="maptools") Error: I don't find the function "read.shape" it's the first ti

[R-sig-Geo] Problem to Read maptools Help

2010-02-10 Thread gianni lavaredo
Dear researchers I download the new version of R 2.10.1 and I have a problem to read maptools Help as the older version thanks for attention Gianni > library(maptools) Carico il pacchetto richiesto: foreign Carico il pacchetto richiesto: sp Carico il pacchetto richiesto: lattice > ?maptools No do

[R-sig-Geo] ratio 1:1 of dimension X and Y axes in a plot

2009-11-05 Thread gianni lavaredo
Dear R resercher, I have a plot x and y with X equal of Y. I wish to have a ratio 1:1 of dimension of x axe and y axe, but I am reading the help (1 hour) and web in general but I didn't find nothing. thanks Gianni [[alternative HTML version deleted]] ___

[R-sig-Geo] select a row in a data.frame

2009-10-13 Thread gianni lavaredo
thanks for help, I have a data.frame "newData" with 7 columns and 91 rows. i wish to find the row in the second column "X" with the max value and save all 7 values (=all columns) in a new data.frame # max value result for row Max.Result <- max(newData$result) select the row with the max value

[R-sig-Geo] problem to set-up RANDOMFOREST

2009-10-12 Thread gianni lavaredo
thanks for help I have the following expression log(Y) ~ log(a) + log(b)+log(c)+log(d)+log(e)..+log(z) I wish to apply the Randomforest method (in regression) with this expression RF.model <- randomForest(log(Y)~ ., data=RF.train, ntree=100,importance=TRUE, na.action=na.omit) but I have

[R-sig-Geo] split random a data.frame to create two data.frame

2009-10-08 Thread gianni lavaredo
thanks for help I have a data.frame with 121 rows. I wish to split random in two data.frames (first = 80 rows and second = 41 rows). I try this code dat1 <- AnalysisDF_clean[sample(1:nrow(AnalysisDF_clean), 80,replace=FALSE),] dat2 <- AnalysisDF_clean[sample(1:nrow(AnalysisDF_clean), 41,replace=F

[R-sig-Geo] RandomForest predictor coefficient to create a MAP

2009-08-05 Thread gianni lavaredo
Dear R users, I have several map of temperature, rain, etc etc and I wish to use randomforest to create a map. I have my variable and the predictors value. The R^2 in randomforest is high but I don't know the right code to calculate the coefficient (B) of each predictor, like in the multi regressi

[R-sig-Geo] Merge several shape File with RSAGA

2009-04-25 Thread gianni lavaredo
Dear R USERS, I am writing a code in R+RSAGA to merge several shapefile (ex: shape1.shp, shape2.shp, shape.3. shp, shape4.shp, etc )with "rsaga.geoprocessor(lib="shapes_tools", module=2)", but I don't understand the right form of the code. Is there same Users that he used that code in a loop? tha

[R-sig-Geo] Help to OVERLAY (in sp) a "SpatialPointsDataFrame" with a 'SpatialPolygonsDataFrame"

2009-04-23 Thread gianni lavaredo
Dear R User , Sorry for this email, but i have a problem with overlay in sp. I have to shape file one is a points shape file (clip_point, with "pH" value) the second is a Polygons shapefile (plots, with ID number of plot) clip_point <- readOGR(".", "clip_point") proj4string(clip_point) <- CRS("+

[R-sig-Geo] calculate distance node inside polygon

2009-04-22 Thread gianni lavaredo
Dear R user, is there a function to calculate the distance of node inside a polygon shapefile (ex: major distance) ? I am looking on web and R help bay I didn't find nothing of helpfull thanks Gianni [[alternative HTML version deleted]] ___ R-

[R-sig-Geo] calculate major axe inside a polygon

2009-04-16 Thread gianni lavaredo
Dear R user, is there a function to calculate the major (or/and minor) axe inside a Shapefile polygon? thanks Gianni [[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] Help to save the value of "Multiple R-Squared" in a a simple regression model

2009-04-12 Thread gianni lavaredo
Dear R User, "Buona Pasqua". I have a simple regression model myModel <- lm( y ~ x) Summary(myModel) I wish to save the value of "Multiple R-Squared" in a list or data.frame format. Thanks Gianni [[alternative HTML version deleted]] ___ R-s

[R-sig-Geo] caclulate "root mean square error"

2009-04-10 Thread gianni lavaredo
Dear User, is there a package to caclulate the root mean square error from two data-serie (real value vs predicted value)? thanks and "BUONA PASQUA" Gianni [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.et

Re: [R-sig-Geo] problem to module MERGE GRID in RSAGA

2009-04-08 Thread gianni lavaredo
. Thanks for help Gianni 2009/4/7 Tomislav Hengl > > > -Original Message- > > From: r-sig-geo-boun...@stat.math.ethz.ch [mailto: > r-sig-geo-boun...@stat.math.ethz.ch] On Behalf > > Of gianni lavaredo > > Sent: Tuesday, April 07, 2009 4:44 PM > > To:

[R-sig-Geo] problem to module MERGE GRID in RSAGA

2009-04-07 Thread gianni lavaredo
Dear R Users I have a problem to understand the loop merge in RSAGA I have this file (not order name) DEM2644147 DEM2644148 DEM2644149 DEM2744150 DEM2744155 DEM2744168 I did a file list in CSV: path<- ("C:/mydata/") temp <- paste(path,"input.csv", sep="") input <- read.csv(temp, header = TRUE

[R-sig-Geo] raster package and "?focal" FUN

2009-04-06 Thread gianni lavaredo
I am seeing RASTER package and "focal". I have a raster ascii grid format with a Z value. I am trying to do a mobile window with a specific radius (es: 10 m) to find the pixel with the max value of Z inside the window. I need to do this operation for each pixel and save a a new grid with only the

[R-sig-Geo] merge ascii grid file format with "RASTER" package

2009-04-05 Thread gianni lavaredo
dear R user, I am trying to merge three raster ascii grid format (raster1.asc, raster2.asc, raster3.asc) and save a new ascii grid with merge(x, y, ..., tolerance=0.05, filename="", overwrite=FALSE, filetype='raster', track=-1 ) of raster package but I am a very brand new of this package. could

[R-sig-Geo] select a pixel with the right value respect the pixel around

2009-04-04 Thread gianni lavaredo
Dear R user, I am trying several methods to find the right solution. I have a raster DEM grid. Is it possible to select all pixel where the pixel value around (8 pixel or 24 or more) is >2/3 of value my pixel x? Gianni [[alternative HTML version deleted]] ___

[R-sig-Geo] extract value from grid and calculate weighted.mean of pixel

2009-04-04 Thread gianni lavaredo
Dear R user I ask some suggestio about this code that I wish to write. I have a raster grid a polygons shape files. I need to extract the pixel value inside the shape polygon and calculate the weight.mean and associate that value to polygon raster. Is there a package useful to do this that I could

[R-sig-Geo] I NEED Help with this spatial polygon problems (REALLY) Thanks really thanks

2009-03-31 Thread gianni lavaredo
Hey All, I have this problem and I need really help to understand (my limit) . I have a polygon shape file and I need to calculate some index and select the polygon with correct index value. I DID this with library(PBSmapping), but I need to obtain new polygon shapefile singleGap <- readOGR(".",

[R-sig-Geo] calculate max and min distance vertex in a polygon shape

2009-03-31 Thread gianni lavaredo
Dear R User, I am serching a method to calcolate the max e min distance from the vertex for each Polygons (in shape format) Thanks for every suggestion Gianni [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.

[R-sig-Geo] problem with readOGR

2009-03-30 Thread gianni lavaredo
thanks for help. I have a polygon shapefile but I have a problem to read with readOGR sample <- readOGR(".", "sample") OGR data source with driver: ESRI Shapefile Source: ".", layer: "sample" with 766 rows and 4 columns Feature type: wkbPolygon with 2 dimensions Errore in validityMethod(objec

[R-sig-Geo] import ASCII file via RGDAL to SpatialPixelsDataFrame'

2009-03-30 Thread gianni lavaredo
Dear R user, I have an ascii file (It's a raster in Arcmap) and I wish to import in R to do some analisys. I am using like help Zone_2644149 = readGDAL("Zone_2644149.asc")$band1 Zone_2644149.asc has GDAL driver AAIGrid and has 246 rows and 381 columns str(Zone_2644149) num [1:93726] 35.1 34.7 3

Re: [R-sig-Geo] help to find this function

2009-03-29 Thread gianni lavaredo
ID=rep(c(1:4),each=4), > count=abs(ceiling(rnorm(16,8,4 > > > hope this helps, > > baptiste > > > On 29 Mar 2009, at 17:54, gianni lavaredo wrote: > > Dear R user, >> >> Thanks for this sunday attention about my problem. I have a data.frame >>

[R-sig-Geo] help to find this function

2009-03-29 Thread gianni lavaredo
Dear R user, Thanks for this sunday attention about my problem. I have a data.frame like this example: count_myData ID: 1,1,1,1,2,2,2,3,3,3,3,3,4,4,4,4,4,4 count: 4,4,4,4,3,3,3,5,5,5,5,5,6,6,6,6,6,6 this data.frame derived from this code count_myData <- ddply(sample, .(ID), transform, sum = su

[R-sig-Geo] delete shapefile in the directory

2009-03-20 Thread gianni lavaredo
Hi all is there a code to delete shapefie in a directory? thanks Gianni [[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] HELP please with a "list" to change column name

2009-03-20 Thread gianni lavaredo
Thanks for your time, I have several shape-files to processing and I did a list. In one step I need to eliminate all value -9 and obtain a new data.frame This is the part of loop with problem #library(rgdal) soil_pollution <- readOGR(".", paste("soil_pollution", file.list[[i]],sep="")) s

[R-sig-Geo] direct operation with two data.frame in elegant code

2009-03-16 Thread gianni lavaredo
Dear Researcher, I have two data.frame and I wish to find a method to do mathematical operation and obtain a new data.frame with a elegant code. I use a "long" code and It runs but I want improve and I am searching a one string to do my operation: exp1 <- data.frame( ID = c(1,1,1,1,2,2,3,2,1,2

[R-sig-Geo] help to obtain the list of the ID

2009-03-14 Thread gianni lavaredo
Thanks in advice for your time, Sorry for this simple question I am searching a function or a method to obtain the list of the ID. I tryed sever combination like manual or in R wiki mfDF <- data.frame( ID =c(1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3), value =c(2,12,25,50,100,200,6,12,50,25,50,50,6,8

Re: [R-sig-Geo] Help to count in apply(...)

2009-03-13 Thread gianni lavaredo
ch.max might be more elegant. > > ID <- rep(1:10, each=10) > K <- runif(100) > areaFe <- as.data.frame(cbind(ID, K)) > fer.conc.max <- tapply(areaFe$K, areaFe$ID, max, na.rm=TRUE) > fermax <- rep (fer.conc.max, each=10) > tapply(areaFe$K > 0.9 * fermax, areaFe$

Re: [R-sig-Geo] Help to count in apply(...)

2009-03-13 Thread gianni lavaredo
> ID <- rep(1:10, each=10) > K <- runif(100) > areaFe <- as.data.frame(cbind(ID, K)) > fer.conc.max <- 0.5 > tapply(areaFe$K <= fer.conc.max, areaFe$ID, sum, na.rm=TRUE) > > > Robert > > > On Fri, Mar 13, 2009 at 9:58 AM, gianni lavaredo > wrote: > >

[R-sig-Geo] Help to count in apply(...)

2009-03-12 Thread gianni lavaredo
dear User I'm quite new to R and trying to learn the basic and sorry for the email. I don't wish abuse of mail-list. I had read manual and Help online about tapply (...). I have a data frame and I need "count" the Fe value with sum for every ID sample area fer.conc.max <- tapply(areaFe$K, areaFe$

[R-sig-Geo] problem to caclulate in a data frame

2009-03-10 Thread gianni lavaredo
Thanks for attention. I am reading the manual of R to work inside the dataframe. I write this code to subtract the value 2 at the column x values I import the data, see the structures of my data frame > str(Soil_pollution) 'data.frame': 912 obs. of 2 variables: $ ID: Factor w/ 912 levels "1",

[R-sig-Geo] simple help to calculate max statistic in data.frame

2009-03-06 Thread gianni lavaredo
Thanks for help and attention I have a data.frame "sample" in shape-file like this ID; pH 1;3.4 1;3.8 1;3.9 4;5.5 4;5.9 4;5.8 5;7.1 5;7.5 5;7.6 5;7.7 5;7.8 5;7.9 I wish to extract the max(pH) of ID = 1, after max(pH) of ID = 2, etc. etc. I tryed the code sample <- readOGR(".", "sample") max(sa

[R-sig-Geo] help for select two columns in a data frame

2009-03-05 Thread gianni lavaredo
sorry for the easy questions but I have this problem. I had read Help but I didn't find this question. Sorry for desturbing but I am a brand new in R, sorry again # I have a shape file with 4 column (soil, ID, country, pH) sample <- readOGR(".", "sample") summary("sample") # I wish select only th

[R-sig-Geo] RPyGeo: merge geoprocessing problems with "field_mappings" option

2009-03-03 Thread gianni lavaredo
Hi All I am testing RPyGeo (old version) developed to Prof. Alexander Brenning. I wish to merge three points shapefile each with this database: ID, X, Y, V. The Scripting syntax in Python is "Merge_management (inputs, output, field_mappings)", where with "field_mappings" (Optional) I can chose t

[R-sig-Geo] testing DEM geoprocessing in RSAGA, SAGA GIS and ARCGIS: different of results in value range

2009-03-02 Thread gianni lavaredo
Dear Professor, Thanks for your competence and your work in RSAGA and Rypgeo. This packages are very useful and interesting. I am testing different geoprocessing code in RSAGA, SAGA, Phyton and Rypgeo to see the results, but I noticed a singular situation. I am using this code to create SLOPE and

[R-sig-Geo] Help with RPyGeo and RSAGA to SLOPE code

2009-03-02 Thread gianni lavaredo
Hi All, I am using Alexander Brenning RPyGeo. I have a DEM.asc (ASCII File format) and I wish to obtaion SLOPE (possible always in ascii formta) in percent. But I have this problem: rpygeo.Slope.sa ("C:/work/DEM.asc","C:/work/SLOPE.asc",unit=c("PERCENT_RISE"), z.factor =

[R-sig-Geo] HELP with RPyGeo and RSAGA slope function

2009-03-02 Thread gianni lavaredo
Hi All, I am using Alexander Brenning RPyGeo. I have a DEM.asc (ASCII File format) and I wish to obtaion SLOPE (possible always in ascii formta) in percent. But I have this problem: rpygeo.Slope.sa("C:/work/DEM.asc","C:/work/SLOPE.asc",unit=c("PERCENT_RISE"), z.factor = 1) [1] "Executing: Slope

[R-sig-Geo] georeferenc problem export envi files with gdal (R+SAGA)---help

2008-12-16 Thread gianni lavaredo
Dear R users, i have a problem to export in R (via gdal) raster grid because they miss the georeference. I use this code (it's loop): #A# convert in ENVI format name.list <- as.list(c(1, 2, 3, 4, 5, 6)) for (i in 1:length(name.list)){ rsaga.geoprocessor(lib="io_grid_gdal", module=1, param=list(