On 11/10/2014 22:16, David Winsemius wrote:
On Oct 11, 2014, at 1:04 PM, Richard M. Heiberger wrote:
It looks like a terminology issue. R has names for elements of a
vector and for rows and
columns of a matrix or data.frame, and more generally for all
dimensions of multi-dimensional array.
I think your next step is to read the introductory document.
Start with either of these (they are the same content)
system.file("../../doc/manual/R-intro.html")
system.file("../../doc/manual/R-intro.pdf")
For the specific situations you described, here are examples.
aa <- 1:5
names(aa) <- letters[1:5]
aa
names(aa) <- c("ABC","DEF","GHI","LMN","OPQ")
aa
bb <- matrix(1:12, 3, 4, dimnames=list(letters[1:3], LETTERS[1:4]))
bb
## install.packages("Hmisc") ## if you don't have it yet
library(Hmisc)
latex(bb)
Hmisc also has a labeling facility and mechanisms for importing SAS labels.
(I don't know if importation of SPSS labels is supported.)
It is, in package foreign.
Hmisc::label uses the capacity of R to attach attributes to data-objects.
So pay particular attention to the introductory material that Richard
(and Bert Gunther) refer you to in the area of "attributes", and read
?Hmisc::label (after installing that package.)
--
Brian D. Ripley, rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.