贊助

Donate

搜尋此網誌

贊助本站

Donate

2018年4月4日 星期三

R: print string character

R: print string character

stringi & stringr :

library(stringi)

x="apple"
library(stringr)

n=str_count(x)

for (i in 1:n ){print(str_sub(x,i,i))}
## [1] "a"
## [1] "p"
## [1] "p"
## [1] "l"
## [1] "e"

沒有留言:

張貼留言

C3 plot package

R:C3 plot Peter Lin 2018-06-02 library (ggplot2) x=c( "vs" , "cyl" , "carb" , "gear" ) for...

Donate-2

Donate-2