I have a dataset data$cell_line.sva, which has dim of 313 11875.
cc.pca <- prcomp(data$cell_line.sva, center = TRUE, scale. = TRUE, retx = TRUE)
g <- ggbiplot(cc.pca, obs.scale = 1, var.scale = 1, groups = as.factor(cgpResponse), ellipse = TRUE, circle = FALSE)
How can I get rid of the feature names? (the red text)
You need to use the varname.size argument to do that.
Using the example from the documentation:
and then add the varname.size argument:
And you have what you want!
I can't just comment because I don't have the necessary reputation points yet, but removing the arrows and the names works quite easily by setting
var.axes
to false:I cannot quite figure out how this would yield a useful result, but here goes anyway. The names are not something that the function lets you suppress via parameter settings, at least to my reading of the code and help page. So looking at the code it looks as though the labels for the factors are pulled from the $rotations element of the prcomp object. Trying to set those names all to a blank character created an error so I succeeded by setting to the a value of varying lengths of blanks.
Ok, so I do this in a very brute way that does the job.
It simply sets the offset for variable names beyond the plot limits.