[R] Problems with a function warning
Joshua Wiley
jwiley.psych at gmail.com
Fri Mar 4 04:30:06 CET 2011
Dear Felipe,
I did not have any difficulty with it using:
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] tcltk stats graphics grDevices utils datasets methods
[8] base
I am wondering if possibly you did not load package tcltk before
trying to use your function?
Cheers,
Josh
On Thu, Mar 3, 2011 at 7:18 PM, Luis Felipe Parra
<felipe.parra at quantil.com.co> wrote:
> 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 at 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.
>
>
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/
More information about the R-help
mailing list