Dear all I am using r (2.15.2) under windows 7 32bit. I want to use system command to execute an external program inside a for loop. this program needs the input and output names. since the names will change in the for loop I am not able to use the programs on all the files
for (k in 1:10){ x=read.table ("data.txt") xx=x[1:5, ] xxx=paste0("data_",k,"txt") write.table (xx,xxx,quote =FALSE, sep = "\t",row.names = FALSE, col.names = FALSE) system ('dssp.exe -i xxx -o xxx.out) } Best Regards, ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.