Answers for "gather function in r"

C
0

gather function in r

df %>%
  gather('a','b',key='whatever',value='whatever')
  
  
#df: the data frame you want to gather
#a and b: the columns of the old data frame that you want to turn into variables
#key: what to call the column of the new data frame that stores the variables
#value: what to call the column of the new data frame that stores the values
Posted by: Guest on February-27-2021

Code answers related to "C"

Browse Popular Code Answers by Language