How to transpose data objects in R
We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! Tabular data objects in R can be easily transposed with t() function. In the following example, we create a matrix of 2 rows and 3 columns, then transpose it, and the rows and columns are interchanged. In the next example, we create a data frame first, then rows and columns are interchanged with t() Read more…