[R-sig-Geo] Error slot
Gaspar Reyes Póndigo
gos47 at hotmail.com
Mon Aug 22 06:59:03 CEST 2011
Hi, Dear R-SIG-GEO User
I am new user R 2.13 (spgrass6) from GRASS-GIS 6.4.1-5, under Mac OS X 10.68. I have the following problem, when preparing the data before run R's princomp() function in R from GRASS, there was an error. The line of code is copied below:
#########################################
library(spgrass6)
G <- gmeta6()
ATC <- readRAST6(c('Acrf_1993_b1','Acrf_1993_b2','Acrf_1993_b3','Acrf_1993_b4','Acrf_1993_b5','Acrf_1993_b7'))
ATC.nas <- which(is.na(ATC at data$Acrf_1993_b1) & is.na(ATC at data$Acrf_1993_b2) & is.na(ATC at data$Acrf_1993_b3) & is.na(ATC at data$Acrf_1993_b4) & is.na(ATC at data$Acrf_1993_b5) & is.na(ATC at data$Acrf_1993_b7))
ATC.ms.values <- which(!is.na(ATC at data$Acrf_1993_b1) & !is.na(ATC at data$Acrf_1993_b2) & !is.na(ATC at data$Acrf_1993_b3) & !is.na(ATC at data$Acrf_1993_b4) & !is.na(ATC at data$Acrf_1993_b5) & !is.na(ATC at data$Acrf_1993_b7))
#######################################
#### I got the following error message
#######################################
ATC.ms.nonas <- ATC.ms.values at data[ATC.ms.values, ]
Error: tentativa de obtener un slot "data" de un objeto de una clase básica ("integer") sin slots
#########################################
Can you please point my problem? and How do I fix my problem?
Thanks in advance for any help.
NOTE:I followed the guide of http://grass.osgeo.org/wiki/Principal_Components_Analysis # Using_R.27s_princomp.28.29_function for PRINCOMP() function.
NOTE: the images are LANDSAT 5 TM
Gaspar Reyes Póndigo
Universidad del Mar, Oaxaca, México
Campus Puerto-Ángel
Carretera principal Puerto Ángel Zipolite km 1.5
C.P. 70902
More information about the R-sig-Geo
mailing list