From edd at debian.org  Mon Mar 17 12:39:57 2014
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 17 Mar 2014 06:39:57 -0500
Subject: [Rd] How to convert time_t to R date object
In-Reply-To: <CACY4ALhbhtvNR7CNj7efEeSgXbhJRCH325OOW=0AhrbDETsoLQ@mail.gmail.com>
References: <CACY4ALiS73rxKVNwuW8W_0zsE35NcZh==JiSPUv1VZ+7E4P4Kg@mail.gmail.com>
	<21285.47984.318336.174502@max.nulle.part>
	<CACY4ALhbhtvNR7CNj7efEeSgXbhJRCH325OOW=0AhrbDETsoLQ@mail.gmail.com>
Message-ID: <21286.57101.842877.461798@max.nulle.part>


Bill,

On 17 March 2014 at 12:54, Bill Wang wrote:
| Thanks for your reply, I neede convert time_t to R type in C code, can not use
| Rcpp. Maybe Rcpp source code could help me.

Start by reading 'Writing R Extensions' and figure out how to send an int
back and forth.  Then cast between int and time_t.  Then set the class of the
int variable to Date type.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



[Rd] How to convert time_t to R date object
Dirk Eddelbuettel