R 在取消列表过程中,提供列的数值而不是自动列表编号
在整个过程中:R 在取消列表过程中,提供列的数值而不是自动列表编号,r,R,在整个过程中: library("spacyr") library("dplyr", warn.conflicts = FALSE) mytext <- data.frame(text = c("test text", "section 2 sending"), id = c(32,41)) 易于使用tidyr库 mytext#一个tible:5 x 2 #>文本id #> #>1测试32 #>
library("spacyr")
library("dplyr", warn.conflicts = FALSE)
mytext <- data.frame(text = c("test text", "section 2 sending"), id = c(32,41))
易于使用
tidyr
库
mytext#一个tible:5 x 2
#>文本id
#>
#>1测试32
#>2文本32
#>3第41节
#> 4 2 41
#>5发送41
使用tidyr
库很容易
mytext#一个tible:5 x 2
#>文本id
#>
#>1测试32
#>2文本32
#>3第41节
#> 4 2 41
#>5发送41
我们可以使用cSplit
library(splitstackshape)
cSplit(mytext, "text", sep=" ", "long")
# text id
#1: test 32
#2: text 32
#3: section 41
#4: 2 41
#5: sending 41
我们可以使用
cSplit
library(splitstackshape)
cSplit(mytext, "text", sep=" ", "long")
# text id
#1: test 32
#2: text 32
#3: section 41
#4: 2 41
#5: sending 41