replace(a, c(1, 3, 5), "xxx") ## 替换指定索引的字符串为特定的字符串 [1] "xxx" "b" "xxx" "d" "xxx" "f" "g" "h" "i" "j"  " />

当前位置 : 主页 > 网络编程 > 其它编程 >

R语言中replace函数的用法

来源:互联网 收集:自由互联 发布时间:2023-07-02
1、aa[1]abcdefghijreplace(a,c(1,3,   1、 > a a [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"> replace(a, c(1, 3, 5), "xxx") ## 替换指定索引的字符串为特定的字符串 [1] "xxx" "b" "xxx" "d" "xxx" "f" "g" "h" "i" "j"  
1、aa[1]abcdefghijreplace(a,c(1,3,

 

1、

> a <- letters[1:10]> a [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"> replace(a, c(1, 3, 5), "xxx") ## 替换指定索引的字符串为特定的字符串 [1] "xxx" "b" "xxx" "d" "xxx" "f" "g" "h" "i" "j"

 

上一篇:车道线检测-模式识别综合实验
下一篇:没有了
网友评论