Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-12 Thread Roth, M.
Hi, thanks a lot for the explanation. My motivation is to do some sort of space-time bootstrapping. Probably this is a big misuse of the spacetime package as I loose the correct time but I want to use the procedure I am using for the original sample also for the bootstrapped ones. And at the mo

Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Edzer Pebesma
ame. > > stfdf@data[,1] > > would get you the first column of the data frame. If you wanted to increase > the whole column by one: > > stfdf@data[,1] = stfdf@data[,1] + 1 > > aman > > -Original Message- > From: r-sig-geo-boun...@r-project.org > [m

Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Aman Verma
[1] + 1 would increase the "value" in the first row of the stfdf@data data frame. stfdf@data[,1] would get you the first column of the data frame. If you wanted to increase the whole column by one: stfdf@data[,1] = stfdf@data[,1] + 1 aman -Original Message----- From: r-sig-geo-

Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Aman Verma
roject.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Roth, M. Sent: March 11, 2011 10:00 AM To: r-sig-geo@r-project.org Subject: [R-sig-Geo] replace values in spacetime (STFDF) object Hello, I want to replace specific values in a STFDF object from the spacetime package. As example c

Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Roth, M.
y one: stfdf@data[,1] = stfdf@data[,1] + 1 aman -Original Message- From: r-sig-geo-boun...@r-project.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Roth, M. Sent: March 11, 2011 10:00 AM To: r-sig-geo@r-project.org Subject: [R-sig-Geo] replace values in spacetime (STFDF) obje

Re: [R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Aman Verma
r-project.org Subject: [R-sig-Geo] replace values in spacetime (STFDF) object Hello, I want to replace specific values in a STFDF object from the spacetime package. As example consider the following stfdf object out of the vignette. sp = cbind(x = c(0,0,1), y = c(0,1,1)) row.names(sp) = paste("

[R-sig-Geo] replace values in spacetime (STFDF) object

2011-03-11 Thread Roth, M.
Hello, I want to replace specific values in a STFDF object from the spacetime package. As example consider the following stfdf object out of the vignette. sp = cbind(x = c(0,0,1), y = c(0,1,1)) row.names(sp) = paste("point", 1:nrow(sp), sep="") sp = SpatialPoints(sp) time = xts(1:4, as.POSIXct("