[datatable-help] print.data.table's digits argument
Arunkumar Srinivasan
aragorn168b at gmail.com
Sat May 24 23:15:03 CEST 2014
Fixed this in commit #1275 (v1.9.3). Thanks Frank and Matthew Beckers for
filing it here<https://r-forge.r-project.org/tracker/index.php?func=detail&aid=5435&group_id=240&atid=975>
.
Arun
On Tue, Jun 18, 2013 at 1:39 AM, Frank Erickson <FErickson at psu.edu> wrote:
> Ah, that did the trick! I'll use this quite a lot, I expect. Thanks, Arun.
> --Frank
>
>
> On Mon, Jun 17, 2013 at 6:19 PM, Arunkumar Srinivasan <
> aragorn168b at gmail.com> wrote:
>
>> Dear Frank,
>>
>> Thanks for forwarding to the list. I always seem to forget to
>> "reply-all". Apologies. Managed this time! :)
>>
>> Try this on your data:
>>
>> as.data.table(do.call("cbind", lapply(DT, function(x) {
>> if (is.list(x)) {
>> lapply(x, function(y) as.numeric(format(y, digits=2)))
>> } else
>> as.numeric(format(x, digits=2))
>> })))
>>
>>
>>
>> Arun
>>
>>
>>
>> _______________________________________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140524/ac70db3c/attachment.html>
More information about the datatable-help
mailing list