Hi all user R, My simple question is...I have a vector of names of predictors, text<-c("datem","cola","eslom")...I try to plot the model with this predictor in sequence loop...., for(i in 1:3){ png(paste("fig_",i,sep="")) plot(preplot.gam(mod9)[[i]],se=T,rug=F,main="",xaxt="n",ylab="",xlab="") axis(1,as.numeric(text[i]),as.character(text[i]),cex.axis=.9) dev.off() } But the line with function axis get error Error in axis(side, at, labels, tick, line, pos, outer, font, vfont, lty, : no locations are finite I put in shell text[i] give "datem", I try to erase the "", can not search what is the function to erase this character (""). Samebody can help me to erase "", when put the predictor without "", datem, there not problem.... Thank for all Fernando Espindola R. Division Investigacion Pesquera Instituto de Fomento Pesquero Blanco 839 Valparaiso - CHILE [[alternative HTML version deleted]]
See ?get. Andy> From: Fernando Esp??ndola > > > Hi all user R, > > My simple question is...I have a vector of names of predictors, > > text<-c("datem","cola","eslom")...I try to plot the model > with this predictor in sequence loop...., > for(i in 1:3){ > png(paste("fig_",i,sep="")) > plot(preplot.gam(mod9)[[i]],se=T,rug=F,main="",xaxt="n",ylab=" > ",xlab="") > axis(1,as.numeric(text[i]),as.character(text[i]),cex.axis=.9) > dev.off() > } > > But the line with function axis get error > > Error in axis(side, at, labels, tick, line, pos, outer, font, > vfont, lty, : > no locations are finite > > I put in shell text[i] give "datem", I try to erase the "", > can not search what is the function to erase this character > (""). Samebody can help me to erase "", when put the > predictor without "", datem, there not problem.... > > Thank for all > > > Fernando Espindola R. > Division Investigacion Pesquera > Instituto de Fomento Pesquero > Blanco 839 > Valparaiso - CHILE > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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 > >