# how to put labels on ggplot2 graph

#### Marwah Soliman

##### New Member
I have a data and I did PCA on that data
I used the following code

Code:
i.pca=prcomp(tmydf)
scores <- as.data.frame(i.pca\$x)
qplot(x = PC1, y = PC2, data = scores, geom = "point",col=race)
I need to put the rownames of tmydf as labels on the graph

how can I do that ?

#### trinker

##### ggplot2orBust
On my machine I get:

Code:
Error in prcomp(tmydf) : object 'tmydf' not found
Please make this a minimal working example including data that works.

#### Marwah Soliman

##### New Member
The thing is I tried to upload the file but it is too large
so if I attached small part of it will it do the PCA correctly

thanks,