pca.project {bio3d} | R Documentation |
Projects data onto principal components.
pca.project(data, pca, angular = FALSE) pca.z2xyz(z.coord, pca) pca.xyz2z(xyz.coord, pca)
data |
a numeric vector or row-wise matrix of data to be projected. |
pca |
an object of class "pca" as obtained from
functions pca.xyz or pca.tor . |
angular |
logical, if TRUE the data to be projected is treated as torsion angle data. |
xyz.coord |
a numeric vector or row-wise matrix of data to be projected. |
z.coord |
a numeric vector or row-wise matrix of PC scores (i.e. the z-scores which are centered and rotated versions of the origional data projected onto the PCs) for conversion to xyz coordinates. |
A numeric vector or matrix of projected PC scores.
Karim ElSawy and Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
## Not run: data(kinesin) gaps.pos <- gap.inspect(pdbs$xyz) #-- Do PCA without structures 1 and 2 pc.xray <- pca.xyz(xyz[-c(1:2), gaps.pos$f.inds]) d <- pca.project(xyz[1:2, gaps.pos$f.inds], pc.xray) plot(pc.xray$z[,1], pc.xray$z[,2],col="gray") points(d[,1],d[,2], col="red") ## End(Not run)