On Thu, 14 Apr 2005, Miha Razinger wrote:
> Hi,
>
> I was trying like to print out data frame with POSIXct column
> in html format using xtable package, but I got error message
> when trying to print the table. Here is example:
>
> aaa<-data.frame(as.POSIXct(strptime('03 2005', '%d
%Y')),0)
> aaa.tab<-xtable(aaa)
> print(aaa.tab)
>
> Error in Math.POSIXt(x + ifelse(x == 0, 1, 0)) :
> abs not defined for POSIXt objects
>
> I was able to get around the problem with converting column
> back to string but still I would like to know is it a bug or
> I was doing something wrong.
It's not a bug in R.
It seems to be a docmentation error or infelicity in xtable: it clearly
does not work with all data frames, and the restrictions are neither clear
to me nor enforced. Please take it up with the xtable maintainer.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595