save output as txt file

Issue #541 resolved
Sajad created an issue

Hello Dears

I am not expert with R and used the "torsion.pdb(pdb)" tool of bio3d to calculate torsion angles of a protein. Now I am wondering how I can save the output as a text file for further use.

Thank you,

Comments (3)

  1. Xinqiu Yao

    torsion.pdb() returns multiple results. Which one do you want to output? Normally cat() will do the job but check write.table() also for matrix or data.frame. For example,

    a <- torsion.pdb(pdb)
    cat(a$psi, sep='\n', file='psi.txt')
    write.table(a$tbl, row.names=FALSE, file='tbl.txt')
    
  2. Log in to comment