Displaying 1 result from an estimated 1 matches for "toy_set".
Did you mean:
to_set
2010 Dec 09
4
lapply getting names of the list
...ists in infile.split as I understand it. Correct me if I am wrong.
lapply(infile.split,function(x){
filename <- names(x) #### here I expect to see A1 or B1, I didn’t, I tried (names(x)[1]) and that gave me “Name” and not A1 or B1.
final_filename <- paste(filename,”toy_set.txt”,sep=”_”)
write.table(x, file = paste(path, final_filename,sep=”/”, row.names=FALSE, quote=FALSE,sep=”\t”)
} )
In lapply I wanted to give a unique filename to all the split Sample Ids, i.e. name them here as A1_toy_set.txt, B1_toy_set_txt.
How do I get those names, i.e. A1, B1...