[R-sig-Geo] SpatialGridDataFrame and asc - Matrix inversion with as.asc(as.matrix(x))
Paulo E. Cardoso
pecardoso at netcabo.pt
Tue Jul 21 12:43:05 CEST 2009
Milton, It works just like you proposed. Solved
Thanks.
____________
Paulo E. Cardoso
> -----Mensagem original-----
> De: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-
> bounces at stat.math.ethz.ch] Em nome de Paulo E. Cardoso
> Enviada: terça-feira, 21 de Julho de 2009 11:30
> Para: 'milton ruser'
> Cc: 'R-sig-Geo'
> Assunto: Re: [R-sig-Geo] SpatialGridDataFrame and asc - Matrix
> inversion with as.asc(as.matrix(x))
>
> Hi Milton,
>
>
>
> This is flipping columns and I'd like to flip rows instead.
>
>
>
> x <- 1:12 ; dim(x) <- c(4,3)
>
> x
>
> x<-x[,dim(x)[2]:1]
>
> x
>
>
>
> Beside this, I'd like to know if this could be done with the
> SpatialGridDataFrame.
>
>
>
> Any idea?
>
> ____________
>
> Paulo E. Cardoso
>
>
>
> De: milton ruser [mailto:milton.ruser at gmail.com]
> Enviada: terga-feira, 21 de Julho de 2009 11:17
> Para: Paulo E. Cardoso
> Cc: R-sig-Geo
> Assunto: Re: [R-sig-Geo] SpatialGridDataFrame and asc - Matrix
> inversion with as.asc(as.matrix(x))
>
>
>
> Hi Paulo,
>
>
>
> try this:
>
>
>
> x<-x[,dim(x)[2]:1]
>
> cheers
>
>
>
> milton
>
> On Tue, Jul 21, 2009 at 5:53 AM, Paulo E. Cardoso
> <pecardoso at netcabo.pt>
> wrote:
>
> By converting a SpatialGridDataFrame into a asc object with
>
>
>
> asc.obj <- as.asc(as.matrix(x),xll = 0.5, yll = 0.5)
>
>
>
> the object created have inverted rows. It apparently starts reading
> from bellow, inverting row reading but keeping columns unchanged.
>
>
>
> The result is a flipped image.
>
>
>
> Can this be corrected and how?
>
> ____________
>
> Paulo E. Cardoso
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
> Checked by AVG - www.avg.com
>
> 06:16:00
>
>
> [[alternative HTML version deleted]]
>
>
> Checked by AVG - www.avg.com
> Version: 8.5.375 / Virus Database: 270.13.16/2241 - Release Date:
> 07/20/09 06:16:00
More information about the R-sig-Geo
mailing list