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@gmail.com] 
Enviada: terça-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@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@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]]

