how to split a column in r
library(tidyverse)
df <- df %>% separate(old_col_name, c('new_col_1','new_col_2'), extra='drop')
how to split a column in r
library(tidyverse)
df <- df %>% separate(old_col_name, c('new_col_1','new_col_2'), extra='drop')
R split dataframe per column
data_list <- split(data, f = data$id) # Split data
data_list # Print list
# $A
# id x1 x2
# 1 A 1 11
# 2 A 2 12
#
# $B
# id x1 x2
# 3 B 3 13
# 4 B 4 14
# 5 B 5 15
#
# $C
# id x1 x2
# 6 C 6 16
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us