What is the best way to melt a list into a vector?

I would like to melt this:

test = list( one = "joe" , two = c( "john" , "jane" ) )

In character vector:

c( "joe" , "john" , "jane" )

I tried melt () in the reshape package, but the result is data.frame, where the rows are treated as factors, so I will need to do something like:

as.character( melt( test )$value )

Is there a shorter / faster way?

+5
source share
1 answer
unlist(test)

(my answer must be more than 30 characters!)

+15
source

All Articles