Re: [R] Latex: Date Format conversion

From: Marc Schwartz <marc_schwartz_at_me.com>
Date: Thu, 10 Jun 2010 12:25:47 -0500

On Jun 10, 2010, at 12:19 PM, Marc Schwartz wrote:

> Felipe,
>
> I would not do the processing in TeX, but do it in R and then pass the results to the \Sexpr{}'s.

>
> If I am correctly understanding the process flow, put the following R code chunk before the point where you need to output the formatted dates:
>

> <<results=hide>>
>
> START <- format(as.Date(report[1, 1], "%m/%d/%y"), "%B %d, %Y")
> END <- format(as.Date(report[1, 15], "%m/%d/%y"), "%B %d, %Y")
>
> @
>
>
> Then have the following in the document body:
>
> Report from \Sexpr{START} & - & \Sexpr{END]}

Quick correction, just noted a typo with the ']' in the second \Sexpr{}. That should be:

  Report from \Sexpr{START} & - & \Sexpr{END}

Marc



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. Received on Thu 10 Jun 2010 - 17:28:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jun 2010 - 17:40:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive