[R] how do I plot a regression curve with the data?

2009-10-27 Thread Ken Ervin
I have a data set of 6 or so ordered pairs, and I've been able to graph them and have decided to use a high-order polynomial regression. I've used the following piece of code: regression <- function(x,y) { x <- c(insert_numbers_here) y <- c(insert_other_numbers_here) fit <- lm(y ~ x +

[R] how do I name data frames and files according to the index of a for loop?

2009-10-07 Thread Ken Ervin
o like to produce the .csv files: ~/file/goes/here1.csv ~/file/goes/here2.csv ~/file/goes/here3.csv ... ~/file/goes/here2858.csv I've been noodling over this for a while and have looked all over but I can't seem to get the syntax right. Any help at all would be appreciated. Thanks again!