I am wondering what is wrong with my code. Its simulates an ecological growth rate model. It keeps telling me I have an unexpected symbol and I am not sure where. Here is the code. All the varibles were defined in another line of code so thats not the issue. Some help would be awesome. Thanks!
for (i in 1:length(samples)) { sub_data = subset(lemna, as.character(lemna$Sample.ID) == samples[i]) dN = c(dN, sub_data$N[2:nrow(sub_data)] - sub_data$N[1:(nrow(sub_data)-1)], NA) dt = c(dt, sub_data$t[2:nrow(sub_data)] - sub_data$t[1:(nrow(sub_data)-1)], NA) }