[R-br] Formatação de summary table no RStudio apresentando &nbsp

Elias Carvalho ecacarva em gmail.com
Sábado Agosto 4 18:36:15 -03 2018


*Estou testando o pacote "qwraps2", então estou rodando o exemplo
em: https://github.com/r-lib/xml2/issues/151
<https://github.com/r-lib/xml2/issues/151>, conforme abaixo.*

set.seed(42)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
##     filter, lag
## The following objects are masked from 'package:base':
##
##     intersect, setdiff, setequal, union
library(qwraps2)

# define the markup language we are working in.
# options(qwraps2_markup = "latex") is also supported.
options(qwraps2_markup = "markdown")

data(mtcars)
mtcars2 <-dplyr::mutate(mtcars, cyl_factor = factor(cyl,levels = c(6, 4,
8), labels = paste(c(6, 4, 8), "cylinders")),
                        cyl_character = paste(cyl, "cylinders"))
our_summary1 <-
  list("Miles Per Gallon" =
         list("min" = ~ min(mpg),
              "max" = ~ max(mpg),
              "mean (sd)" = ~ qwraps2::mean_sd(mpg)),
       "Displacement" =
         list("min" = ~ min(disp),
              "max" = ~ max(disp),
              "mean (sd)" = ~ qwraps2::mean_sd(disp)),
       "Weight (1000 lbs)" =
         list("min" = ~ min(wt),
              "max" = ~ max(wt),
              "mean (sd)" = ~ qwraps2::mean_sd(wt)),
       "Forward Gears" =
         list("Three" = ~ qwraps2::n_perc0(gear == 3),
              "Four"  = ~ qwraps2::n_perc0(gear == 4),
              "Five"  = ~ qwraps2::n_perc0(gear == 5))
  )
our_summary1

### Overall
summary_table(mtcars2, our_summary1)

*O código foi executado com sucesso no RStudio, porém a tabela aparece
como:*
[image: Screenshot from 2018-08-04 18-29-38.png]
*Como faço para aparecer a tabela formatada como no exemplo:*
[image: Screenshot from 2018-08-04 18-31-38.png]

-- 


*In Jesu et Maria*
*Obrigado*
*Prof. Elias Carvalho*

*"Felix, qui potuit rerum cognoscere causas" (Virgil 29 BC)"Blessed is he
who has been able to understand the cause of things"*
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20180804/46171636/attachment.html>
-------------- Próxima Parte ----------
Um anexo não-texto foi limpo...
Nome: Screenshot from 2018-08-04 18-29-38.png
Tipo: image/png
Tamanho: 33422 bytes
Descrição: não disponível
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20180804/46171636/attachment.png>
-------------- Próxima Parte ----------
Um anexo não-texto foi limpo...
Nome: Screenshot from 2018-08-04 18-31-38.png
Tipo: image/png
Tamanho: 39716 bytes
Descrição: não disponível
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20180804/46171636/attachment-0001.png>


Mais detalhes sobre a lista de discussão R-br