R字符转为向量

a<-‘11,12,13,14,15’
b<-as.numeric(unlist(strsplit(a,split=",")))
b即为:
11 12 13 14 15

你可能感兴趣的:(R字符转为向量)