Questions tagged [qwraps2]

34 questions
2
votes
1 answer

How can I calculated the weighted mean in the qwraps2 library in R?

I am using the qwraps2 library to produce a summary table. When writing my list of summary statistics, I have: summary1 <- list("Wage" = list("min" = ~ min(WAGE), "max" = ~ max(WAGE), "mean (sd)" =…
2
votes
0 answers

Cross-referencing summary tables by qwraps2::summary_table()

I was trying to cross-reference a summary table created using qwraps2::summary_table() in my R Markdown Word report, but it did not work with my .Rmd file below. --- title: "Summary table in R Markdown" output: bookdown::word_document2 --- ```{r…
elarry
  • 521
  • 2
  • 7
  • 20
2
votes
2 answers

How to order the output columns for qwrap2 summary_table

How can I order the output columns of a qwraps2 summary_table in R? When running the code underneath the first column of the table presents the output for 6 cylinders, then 4 cylinders, then 8 cylinders. I tried ordering the data but this has no…
LB_NL
  • 41
  • 3
2
votes
3 answers

R kable won't print in Markdown document

I have recently tried to use the kable package for tables, and while I'm quite satisfied of the results I'm getting in R scripts, I can't figure out how to use them in an R Markdown file. Here is a short example of a table that does work in a R…
Mathieu -
  • 53
  • 1
  • 5
1
vote
2 answers

Why does my table_summary looks weird in r

total beginner and very hopeful someone can help me(: Wrote the following code to create a statistics summary table grouped by city, but my table turned out weird looking (instead of looking like a table, it displayed the table spacers). What should…
Net_D
  • 33
  • 4
1
vote
2 answers

Calculating upper and lower confidence intervals by group in dplyr summarise()

I am trying to make a table that shows N (number of observations), percent frequency (of answers > 0), and the lower and upper confidence intervals for percent frequency, and I want to group this by type. Example of data dat <- data.frame( "type"…
cgxytf
  • 421
  • 4
  • 11
1
vote
1 answer

Table R Markdown qwraps2 and knitr::kable. Column missing

I have the following dummy data.frame set.seed(12345) df<-data.frame(var1=floor(runif(10,1000000,5000000)), group=rep(c("A","B"),5), event=rep(c("Yes","No"),5)) And would like to create a summary table of it. I tried to use qwraps2 As…
Juan
  • 171
  • 1
  • 12
1
vote
1 answer

getting error stating "Error: `x` must be a formula"

I am using the qwraps2 package that has the summary_table function. For some reason I am getting the error "Error: x must be a formula" when I run the code below. args(summary_table) summary_table(death_vs_gender, summaries =…
1
vote
2 answers

Apply `qwraps2` on nested groups

With the package qwraps2 we can create nice summary tables in HTML and Latex. Grouped data.frames with one group are supported as well but what about nested groups? Is there a way to directly pass a data.frame with nested groups to…
Frederick
  • 810
  • 8
  • 28
1
vote
1 answer

Why does summary_table function produces a different table in markdown to when its knitted as HTML

Beginner question here so sorry if it's an obvious mistake. I've produced a table of summary statistics using the summary_table function from the R package qwraps2. When I run the code in markdown it produces the table as expected but when I try and…
1
vote
2 answers

How to create subheadings using summary_table R qwraps2?

I want to produce a table of summary stats with summary_table. This needs to have subheadings. I have been following this example: https://cran.r-project.org/web/packages/qwraps2/vignettes/summary-statistics.html stats_summary1 <- list("Sex…
sar
  • 182
  • 6
  • 26
1
vote
2 answers

Qwraps2- row group label not showing up in summary table

Built a summary table, but the labels of the row groups are not showing up. args(data) summary1 <- list("Gender"= list("Female" =~qwraps2::n_perc0(Sex==0, na_rm=TRUE)) table1 <- summary_table(data, summary1) My table looks like this:…
Annabelle
  • 23
  • 7
1
vote
1 answer

R shiny summary_table out does not render in html

I have simple application to calculate summary , the summary part works fine. how ever i want output the results back to the UI as html. I cant get it to work with renderUI and htmloutput. if i use rendertable and tableoutput i get a partial output…
Ashr
  • 33
  • 4
0
votes
0 answers

Cannot install qwraps2

I have tried everything I can think of to install qwraps2 but it consistently fails to install at the end of the download. Any ideas? R version 4.1.2 (2021-11-01) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS 13.3.1 Matrix…
0
votes
0 answers

An error while trying to generate a summary table using qwraps2

I am working in R markdown and using qwraps2 to generate a summary table. I get an error message but I can not spot where is the errors in my code. Any one can help, please Library (tidyverse) Library (readxl) Library…
1
2 3