2009-12-25 66 views

回答

3

as.*功能已經矢量化:

R> txt <- c("123456", "7890123") 
R> as.numeric(txt) 
[1] 123456 789
R> sum(as.numeric(txt)) 
[1] 8013579 
R> 

一般情況下,「思想矢量」是去有R的方式,但它需要一些練習。

相關問題