Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

convert a row to a column in r

library(tidyverse)

starting_df %>% 
  rownames_to_column() %>% 
  gather(variable, value, -rowname) %>% 
  spread(rowname, value)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #row #column
ADD COMMENT
Topic
Name
9+7 =