how to convert a matrix to dataframe in r code example Example: turn matrix into dataframe r > baskets.df <- as.data.frame(t(baskets.team))