how to convert dataframe to matrix in r code example
Example 1: turn matrix into dataframe r
> baskets.df <- as.data.frame(t(baskets.team))
Example 2: change from matrix to a dataframe in r
as.data.frame(x, row.names = NULL, optional = FALSE,
make.names = TRUE, …,
stringsAsFactors = default.stringsAsFactors())
Example 3: data frame to matrix r
data.matrix(frame, rownames.force = NA)