[R] Data format question for triangle.plot package ade4
Steve_Friedman at nps.gov
Steve_Friedman at nps.gov
Thu Jul 8 22:41:05 CEST 2010
hello,
I am trying to develop a triangle plot but am having difficultly assigning
the row.names to the 3 columns in the data.frame
Here is what I've done,
attach(SoilVegHydro)
dim(SoilVegHydro)
1292 39
# now take 3 variables from main data.frame for plotting
dat <- cbind.data.frame(TP, meanAnnualDepthAve, BulkDensity) # These are
variables held in the data frame SoilVegHydro
row.names(dat) <- paste(row.names(SoilVegHydro$Physiogomy), rep(c(1,2,3),
rep(1292, 3)), sep =" ") # following the syntax from the help
triangle.plot page
this is returned when the last line is submitted.
row.names(dat) <- paste(row.names(SoilVegHydro$Physiogomy), rep(c(1,2,3),
rep(1292,3)), sep="")
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1", "1", "1", "1", :
invalid 'row.names' length
I'm not certain how to define the row.names . If anyone can help I'd
appreciate it.
I'm using R 2.11.1 (2010-5-31) on Windows XP
Thanks
Steve
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034
Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax (305) 224 - 4147
More information about the R-help
mailing list