我有一个这种格式的数据框:
A <- c("John Smith", "Red Shirt", "Family values are better")
B <- c("John is a very highly smart guy", "We tried the tea but didn't enjoy it at all", "Family is very important as it gives you values")
df <- as.data.frame(A, B)
Run Code Online (Sandbox Code Playgroud)
我的目的是将结果恢复为:
ID A B
1 John Smith is a very highly smart guy
2 Red Shirt We tried the tea but didn't enjoy it at all
3 Family values are better is very important as it gives …Run Code Online (Sandbox Code Playgroud)