[datatable-help] print.data.table's digits argument
Arunkumar Srinivasan
aragorn168b at gmail.com
Tue Jun 18 01:19:49 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20130618/6fcac22a/attachment-0001.html>
More information about the datatable-help
mailing list