[R] PCA factominer package, question about changing labels in individuals factor map

David Carlson dcarlson at tamu.edu
Tue Jan 21 22:35:37 CET 2014


rownames(dat) <- dat[,1]

before running PCA.

David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of Andy.P
Sent: Tuesday, January 21, 2014 12:18 PM
To: r-help at r-project.org
Subject: [R] PCA factominer package, question about changing
labels in individuals factor map

I am looking to do a PCA with the factominer package on a
dataset of mine,
named dat. The individuals in my dataset have character names,
in the first column of my dataset, but since they aren't
quantitative I
can't include that column in my PCA analysis. Leading to the
command >
res.pca = PCA(dat[,3:8], scale.unit=TRUE, ncp=5, graph=T)

This is all well and good, except when my individuals factor map
shows up,
each data point is labeled as a number and not as their actual

 How do I go about getting the map to display the character
names? If I
include the column with the names I get an error because it's
quantitative. I know it can be done because I've seen it on the
dataset, I just don't know what they're doing differently to get
character names on the map.

View this message in context:
Sent from the R help mailing list archive at Nabble.com.

R-help at r-project.org mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible

More information about the R-help mailing list