It's my first time using R, and I just need to input a package with some files and save the outputs in some other files. I have a directory in which there are some files with ".pdb" file extensions. I need to go through each of these files in a for loop, apply some functions, and save the output of each ,which is a matrix, in a file that I could later use in Matlab.
These are the functions that I wish to apply to each of the .pdb files.
p=extractPDB("1HXH.pdb")
cm<-build.contacts(n=p$lca,xyz=p$coords,cuts=169)$cm
cm is the output matrix which I want to save in a file to be later used in Matlab.