I have a list named mylist like:
mylist = list(
a = c("35","45","56",..., "67", "66", "89"),
b = c("67"),
c = c("55")
)
$a
[1] "35" "45" "56" ...
[19] "67" "66" "89"
$b
[1] "67"
$c
[1] "55"
And I would like to add at the beginning of each list rows the list names. To be like this:
$a
[1] "a" "35" "45" "56" ... "67" "66" "89"
$b
[1] "b" "67"
$c
[1] "c" "55"
How can I do that? Thanks!
I could not find a solution yet.
I edited the list how it should be. Actually, my aim to export this later on as a text file in which each row starts with list names. So I want the output to be like:
a 35 45 56 ... 67 66 89
b 67
c 55