Displaying 1 result from an estimated 1 matches for "sctruture".
2005 Apr 25
3
Data frames
I have two questions about data frames:
(1) How can one extract a simple matrix
from a data frame? I tried
Matrixfromdf = function (frame,without=1)
{a=frame[colnames(frame)[-without]]
v=unlist(a,use.names=F)
matrix(v,ncol=ncol(a))}
but it works well only for without=1,
perhaps also because the function in (2)
gives probably a different meaning to
the first column.
(2)