You probably want to wrap the nls(...) in a 'try' or 'tryCatch' function.
Scott
Scott Sherrill-Mix
Department of Microbiology
University of Pennsylvania
402B Johnson Pavilion
3610 Hamilton Walk
Philadelphia, PA 19104-6076
Phone: 215-573-3141
On Thu, Jul 30, 2009 at 1:14 PM, Liao, Hongsheng
I am trying to fit a logistic model to my 10 year data (1999-2008) by year.
Codes like below:
Year <- c(1999: 2008)
for(y in 1:length(year)) {
file.input <- paste("C:\\", year[y], "\\data.csv", sep="")
table <- read.csv(file=fileinput, header=TRUE, as.is=TRUE, na.strings=c(""))
i
2 matches
Mail list logo