Check out example codes for "turn matrix into dataframe r". It will help you in understanding the concepts better.

Code Example 1

> baskets.df <- as.data.frame(t(baskets.team))

Learn ReactJs, React Native from akashmittal.com