From tlumley at u.washington.edu  Wed Sep 27 16:24:42 2006
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Wed, 27 Sep 2006 07:24:42 -0700 (PDT)
Subject: [Rd] time_t handling in R
In-Reply-To: <op.tgi2on1mffxks9@norisk>
References: <op.tgi2on1mffxks9@norisk>
Message-ID: <Pine.LNX.4.64.0609270720400.10316@homer21.u.washington.edu>

On Wed, 27 Sep 2006, Tom McCallum wrote:

> Hello all,
>
> I am converting some C code into a package for R and wondered what the
> proper way of handling time_t types from C in R was.  time_t is a typedef
> for long, but R seems to only deal in Integers or Reals, so what is the
> proper way of handling time in an R to C conversion ( or visa versa )?
>

time_t is not portably a typedef for long, or even for an integer type 
(according to the C standard).  If it is an integer type on your system 
then you can pass it as a vector of integer (and on many systems long and 
int are the same so one integer will suffice)

 	-thomas




[Rd] time_t handling in R
Thomas Lumley