Re: [Rd] time_t handling in R

From: Thomas Lumley <>
Date: Wed 27 Sep 2006 - 14:24:42 GMT

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 mailing list Received on Thu Sep 28 00:27:04 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 27 Sep 2006 - 15:30:10 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.