Hello, Everyone, how to use "loop" to make the process automatic and fast? When compute each sample, the script type in R almost the same, just the input and output file's name is changed(chr1 change to chr2, chr3,chr4...).
The first sample's script like this: >chr1=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chr1",numrows= ) >chr1=MEDIPS.genomeVector(data=chr1, bin_size=50,extend=250) ... ... >write.table(frameschr1.frame500.step250, file="frames.chr1.meth.txt", sep="\T", quote=F, col.names=T, row.names=F) The second sample's script like this: >chr2=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chr2",numrows= ) >chr2=MEDIPS.genomeVector(data=chr2, bin_size=50,extend=250) ... ... >write.table(frameschr2.frame500.step250, file="frames.chr2.meth.txt", sep="\T", quote=F, col.names=T, row.names=F) so, how to make this process automatic and fast? Thanks~ -- View this message in context: http://r.789695.n4.nabble.com/Help-How-to-use-loop-to-achieve-this-aim-tp2819894p2819894.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.