Re: [R] for loop with if statment problem

2010-02-04 Thread Peter Ehlers
Stephen, You probably should name your dataframe 'dat' and replace the line x <- subset(x, Creek=="fbms" & station==i) with x <- subset(dat, Creek=="fbms" & station==i) -Peter Ehlers stephen sefick wrote: Both of the approx functions work correctly individually, but they are not being

[R] for loop with if statment problem

2010-02-04 Thread stephen sefick
Both of the approx functions work correctly individually, but they are not being distinguished in the for loop by the if statments. Any help would be appreciated. for loop of interest is below x <- (structure(list(Site = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,