Hello,

I'm new to R and I'm trying to define new quite simple variable but I'm
struggling with R syntax (when coming to dates) for a while and still
getting <errors>  on it.

I would be very grateful if someone could help me with this, to be able to
move on.

I have the following variables:

 - Transplant.date
 - Faildate
 - Death.date

The new variable Time should do the following thing:

Time <-

 If Not IsNull(<Faildate>) Then DaysBetween(<transplant date> ,<Faildate>)
Else If IsNull(<Faildate>) And Not IsNull(<Death date>) Then
DaysBetween(<transplant date> ,<Death date>) Else If IsNull(<Faildate>) And
IsNull(<Death date>) Then DaysBetween(<transplant date> ,CurrentDate())



Thank you very much!!

Laura

        [[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.

Reply via email to