Hello. I have the following funtion: fechasEntrega = function(FechasEntrega,fecha){ if(length(which(FechasEntrega<fecha))>0){ tkmessageBox(title = "Error en Fecha de Valoracion",message="Hay una fecha de entrega anterior a la fecha de valoracion. Todas las fechas de entrega deben ser posteriores a la fecha de valoración para el correcto funcionamiento del programa.", icon="error", type="ok") stop("Hay una fecha de entrega anterior a la fecha de valoracion. Todas las fechas de entrega deben ser \n posteriores a la fecha de valoración para el correcto funcionamiento del programa.") } }
which has two entries. The first one is a vector of dates and the second one is a date. It verifies a condition and gives a warning and an error message in the R gui if the condition is satisfied. I am having trouble because I have two run the function twice before the warning or the error message appear. I dont know why if I just run the function once none of them appear. Does any body know what can be going on? Thank you Felipe Parra [[alternative HTML version deleted]]
______________________________________________ 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.