transpose aa data frame in R code example Example: r transpose dataframe iris_transpose <- as.data.frame(t(as.matrix(iris_df))) iris_transpose