Skip to content
Prev 70592 / 398525 Next

"text"-function: adding text in an x,y-plot

Dear Helmut,

The problem is that you're implicitly coercing the entire data frame lab to
character, producing
[1] "c(1, 3, 4, 5, 6, 7, 8, 9, 10, 2)"

The numbers themselves come from the numeric coding of the factor V1 in this
data frame; as.numeric(lab$V1) shows you what's going on.

Instead you could specify labels=lab$V1 in the text() command. But why put
the row names in a data frame in the first place; why not simply use
labels=rownames(out.pca)?

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------