Skip to content
Prev 360218 / 398503 Next

lists and rownames

They aren't being stored, they are being generated on the fly. You can
create the same names using make.names()

example.names <- c("con1-1-masked-bottom-green.tsv",
"con1-1-masked-bottom-red.tsv", "con1-1-masked-top-green.tsv",
"con1-1-masked-top-red.tsv")

example.list <- strsplit(example.names, "-")

as.data.frame(example.list)
[1] "c..con1....1....masked....bottom....green.tsv.."
"c..con1....1....masked....bottom....red.tsv.."
[3] "c..con1....1....masked....top....green.tsv.."
"c..con1....1....masked....top....red.tsv.."


But you'll probably get a more usable result if you set names
explicitly, for instance:

names(example.list) <- example.names
as.data.frame(example.list)

Note that the characters that are not legal in column names are
changed for you. You can disable that behavior with check.names=FALSE
if you use data.frame() rather than as.data.frame().

Sarah
On Mon, Apr 18, 2016 at 4:21 PM, Ed Siefker <ebs15242 at gmail.com> wrote: