Dear useRs, Is there any more elegant way to convert dataframe to a vector of all its values than as.vector(as.matrix(x)) ? I did not have to do such conversion yet, so I am not sure... (of course as.vector() alone does not work). Regards, -- Lukasz Komsta Department of Medicinal Chemistry Medical University of Lublin Jaczewskiego 4, 20-090 Lublin, Poland Fax +48 81 7425165
Lukasz Komsta <luke at novum.am.lublin.pl> writes:> Dear useRs, > > Is there any more elegant way to convert dataframe to a vector of all > its values than as.vector(as.matrix(x)) ? I did not have to do such > conversion yet, so I am not sure... (of course as.vector() alone does > not work).unlist(x) should do it. It does spend a fair bit of effort in adding names, so it could be less efficient. -- O__ ---- Peter Dalgaard ??ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907