[R-sig-Debian] littler usage
Sebastian P. Luque
spluque at gmail.com
Sat Nov 17 22:16:19 CET 2007
Hi,
I've been using r (the little, but sweet one!), and recently found out
about the magic argv vector of the rest of arguments passed to it. How
can we process an argument that represents elements of a vector:
$ r littler_ex.R 14 '3, 2'
Error in ff * ss : non-numeric argument to binary operator
where:
,-----[ cat ~/scripts/R/littler_ex.R ]
| ff <- as.numeric(argv[1])
| ss <- c(argv[2])
| print(ff * ss)
`-----
Cheers,
--
Seb
More information about the R-SIG-Debian
mailing list