[R-sig-Geo] STIDF subsetting problem
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Mon Jun 17 10:46:24 CEST 2013
I think this is a fair request, and changed the code accordingly. The
updated code is on r-forge; the next CRAN version will support this.
Also, this version has an stplot method for STIDF that shows attributes
per time (slice), e.g. point pattern marks, the same way spplot does for
multiple attributes.
Thanks for the suggestion,
On 06/15/2013 04:35 PM, scizmeli wrote:
> I am trying rearrange the rows of a STIDF object using a numerical variable
> idx containing the row indexes having some repeated indexes :
>
> data(air)
> rural = as(rural,"STIDF")
> rural[c(1,1,1)]
>
> gives me only a 1-row STIDF object. I would rather expect a 3-rows STIDF
> object, with the replicates of the 1st row.
>
> The general behavior of R in such a case, however, would be to replicate the
> rows. I give below two examples with data.frame and list objects ;
>
> a=data.frame(a=c(1,2,3,4),b=c(1,3,4,5))
> a[c(1,1,1),]
> or
> a=list(k=1,l=2,m=3)
> a[c(1,1,1)]
>
> Is this behavior of spacetime (namely the internal function subs.STIDF) can
> be modified in the future to provide a more compatible with the R standards?
> In its current way, it is not possible to use the subsetting in a
> traditional R-fashion.
> thanks
> Servet
>
>
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/STIDF-subsetting-problem-tp7583785.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
More information about the R-sig-Geo
mailing list