Skip to content
Prev 2396 / 398506 Next

character vector as input to function?

Well, somebody else will probably respond, but for example:

paca:ben> cat >~/R/test
1 2 3 4
+    path <- "~/R/"  
+    x <- scan(paste(path,filename,sep=""))
+    mean(x)
+ }
Read 4 items
[1] 2.5
On Wed, 14 Apr 1999, Bill Simpson wrote:

            
Benjamin Bolker          Dep't of Ecology and Evolutionary Biology,
ben at eno.princeton.edu    Princeton University
tel: (609) 258-6886,     fax: (609) 258-1334

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._