I solved my problem. I had to delete stop() It doesn't make sense to have a stop() in if. stop() is to stop the execution of the code once the condition is met. the else does the job of stop() in this case.
mysimbaa wrote: > > Hello, > I have an error since I run my R code. This error is : > Fehler in eval.with.vis(expr, envir, enclos) : >> > > My code is: > > #CONDITION1 : check if the right logfile is chosen > c1=log(z[,3],n) > if (c1==FALSE) { > plot(0:1,0:1,type = "n", axes=FALSE,xlab="",ylab="") > text(0.4,0.8,adj=0,paste("FEHLER"),col="red") > text(0.4,0.6,adj=0,paste("Falsche Logfile gewählt")) > stop()} else > {...} > > z[,3] is a vector of n values. And log is a function which returns > TRUE/FALSE > #Detection whether the Right Logfile was chosen > log<-function(col,Len){ > vLog=ifelse(sum(col)>(5000*Len),TRUE,FALSE)} > > > I think the error comes from stop(), but not sure. > Can anyone help to avoid this error? > > Thanks. > Adel > > > > -- View this message in context: http://www.nabble.com/eval.wih.vis-tp18439974p18480900.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.