[R] 'Fitting' a model at predefined points

2007-01-25 Thread akintayo holder
Hi,
 I have a linear model (mod1 - lm(V3~V1+V2) and I would like to get the
model's prediction at values of V1 and V2 not included in the original
sample.

samp - read.table(data.dat,nrows=100)
attach(samp)
out.poly - lm(V3 ~ V1 + V2)

If I try to use out.poly to predict values for the function I run into
problems. It seems that it isn't possible to use a new data frame for the
predict() or fitted() functions.

predict(out.poly, data.frame(x=V1, y=V2)) uses the original data
predict(out.poly, data.frame(x=V1, y=V2), newdata=gene.dat)
- uses the original data also, complaining of the decrease in rows.

If any one could point me in the correct direction, it would be appreciated.

Thanks

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Passing command line parameters to a script

2007-03-06 Thread akintayo holder
Hi,
 Does any one know if it is possible to create an R script that can use
command line parameters. I can execute an R script from the command line,
but I  cannot figure out how to pass parameters to the script. The only
resources I have found seem somewhat involved or incomplete.

Any help is appreciated.
Akintayo

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.