[R] Beginners question
Koen Hufkens
koen.hufkens at pandora.be
Fri Mar 19 14:06:29 CET 2004
Dear list,
I've been messing around with coding functions in R and it just won't make
sense to me.
Running my analysis by hand on command line is fine and works but because
of the repetitive nature of the job I would like to code a function for it.
My problem:
I would like to read in data from a file in my current working dir.
so my code would look like:
myanalysis <- function(sample, samplenr){
sample.samplenr <- read.geodata("sample.samplenr", arg, arg etc.)
sample.samplenr.results <- someanalysis(sample.samplenr)
}
problem is that charater values aren't interpretated as they should. Any
tips and tricks? This should be fairly simple but I just can't find any
reference to it. Most input values in functions in R are numeric or are
strings to be interpretated with bolean statements but aren't handled as
input variable perse.
Suggestions and comments would be greatly appreciated,
Koen.
More information about the R-help
mailing list