PCA to Table ?

Issue #512 resolved
Talha Malik created an issue

How can i save my pca components built in R using bio3d library in table ? i want to export my pca result to xmgrace ?

Comments (6)

  1. Xinqiu Yao

    Please describe your questions in more detail: What exactly do you mean 'pca components'? Also, this is not a bug...

  2. Talha Malik reporter

    i have ploted a pca in R, now i want to export that to txt or .dat format so that i can open it in xmgrace.. when i write that plot to table its give me an error. if u could help me on that.

  3. Barry Grant

    If you want to export or write out the scores along the PCs for example you can use some code like the following:

    ## Assuming your PCA result is stored in an object called 'pc.xray' and you want the first 3 only
    write.csv(pc.xray$z[,1:3], file="MyOutputFile.csv", quote=FALSE)
    

    There are lots of other output functions for writing to excel format etc. Use google to find there standard R functions.

    Side-note: I am not sure why you would want to use xmgrace when you have the power of R graphics at your fingertips.

  4. Log in to comment