[R-sig-Geo] FW: Factor Analysis using R and grass

Tomislav Hengl T.Hengl at uva.nl
Wed Mar 25 18:44:57 CET 2009



Hi Brian,

The PCA you can also run without GRASS e.g.:

> gridmaps <- readGDAL("NED1.asc")  
> names(gridmaps)[1] <- "DEM"
> proj4string(gridmaps) <- CRS("+init=epsg:32618")
> gridmaps$twi <- readGDAL("twi.asc")$band1
> gridmaps$achan <- readGDAL("achan.asc")$band1
> gridmaps$insolat <- readGDAL("insolat.asc")$band1
> pc.dem <- prcomp(~DEM+twi+achan+insolat, scale=TRUE, gridmaps at data)
> biplot(pc.dem, arrow.len=0.1, xlabs=rep(".", length(pc.dem$x[,1])), main="PCA biplot")

If you have missing pixels or if you use a max, then you will need to select the generated
components before you can reproduce the maps.

See also: http://spatial-analyst.net/wiki/index.php?title=Analysis_of_DEMs_in_R%2BILWIS/SAGA 

HTH

Tom Hengl
http://spatial-analyst.net 



-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of
Brian Cooper
Sent: Wednesday, March 25, 2009 2:27 PM
To: r-sig-geo at stat.math.ethz.ch
Subject: [R-sig-Geo] Factor Analysis using R and grass

I am new to both R and Grass. I need to duplicate the Principal Component
Analysis approach used in SPSS with GRASS and R. Is this possible?
 
brian Cooper

	[[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



More information about the R-sig-Geo mailing list