0

This is the output I have currently

[[1]]
[1] "chr2    11296660    11296700    AT2G2656011"

[[2]]
[1] "chr2    11249456    11249491    AT2G2644011"

[[3]]
[1] "chr2    9899738    9899756    AT2G2326010"

[[4]]
[1] "chr1    25428966    25428999    AT1G6781014"

[[5]]
[1] "chr4    8880515    8880553    AT4G155505"

[[6]]
[1] "chr4    9739572    9739608    AT4G174605"

I wish to remove the quotes and row numbers with the brackets around them and simply have something to this effect

chr2    11296660    11296700    AT2G2656011
chr2    11249456    11249491    AT2G2644011

how would I go about it? When I use unlist for some reason it combines rows together into a single line.

A D
  • 195
  • 5
  • 20
  • Possible duplicate of [R: Print list to a text file](http://stackoverflow.com/questions/3044794/r-print-list-to-a-text-file) ... for future reference, please spend a few minutes searching SO and Google before posting. – Tim Biegeleisen Oct 12 '15 at 00:23
  • You want just to print to STDOUT? E.g. something like `write(do.call(rbind, l), "")`? Or you want to convert to a `data.frame`, e.g. `read.table(text = do.call(rbind, l))`? – David Arenburg Oct 12 '15 at 00:27
  • 2
    Wouldn't this just be `lapply( yourlist, cat, file = "myfile.txt", append=TRUE)` – IRTFM Oct 12 '15 at 00:30
  • 1
    Or even more fun to the console `invisible(lapply(x, cat, "\n"))` – Rich Scriven Oct 12 '15 at 00:40

0 Answers0