Sto tentando di pubblicare un tavolo con 1000 separatori e non ho alcuna fortuna con esso. Ho seguito il link qui: Set global thousand separator on knitr ma non sto avendo molto successo.R Markdown Table 1000 separator
mio set di dati campione è qui: https://goo.gl/G7sZhr
Il codice RMarkdown è qui:
---
title: "Table Example"
author: "Krishnan Viswanathan"
date: "August 4, 2015"
output: html_document
---
caricare i dati
{r, results='asis', message = FALSE, tidy=TRUE} load("i75_from_flow.RData") library(data.table)
{r, results='asis', echo=FALSE,message = FALSE, tidy=TRUE} i75_from_flow <- i75_from_flow[order(-Tons),] knitr::kable(i75_from_flow)
Tuttavia, quando includo questo blocco di codice (knit_hook $ set) nel documento RMarkdown, ottengo errori.
```{r, results='asis', echo=FALSE,message = FALSE, tidy=TRUE}
i75_from_flow <- i75_from_flow[order(-Tons),]
knit_hooks$set(inline = function(x) {
prettyNum(x, big.mark=",")
})
knitr::kable(i75_from_flow)
```
Errore:
# object knit_hooks not found.
Eventuali approfondimenti su quello che sto facendo male e come risolvere questo problema è molto apprezzato.
Grazie,
Krishnan
Grazie per l'intuizione. Questo ha funzionato. – Krishnan