How to transfer dataframe raw_df
to list
row by row ? The result as wished_list
library(tidyverse)
raw_df <- data.frame(cat=c('a','b','c'),value=c('high','mid','low'))
wished_list <- list(a='high',b='mid',c='low')
How to transfer dataframe raw_df
to list
row by row ? The result as wished_list
library(tidyverse)
raw_df <- data.frame(cat=c('a','b','c'),value=c('high','mid','low'))
wished_list <- list(a='high',b='mid',c='low')