Giter Site home page Giter Site logo

metalite.table1's Introduction

metalite.table1

CRAN status CRAN Downloads R-CMD-check status

Overview

A table for descriptive statistics is widely used in medical research and typically be the first table (i.e. table1) for a manuscript.

The metalite.table1 provide an interactive table1 to enhance the communication between statisticians and clinicians.

For use case in clinical trials, Chapter 4 of the R for clinical study reports and submission contains more details.

There are other R packages to create the table1:

Example:

library(metalite.table1)
metalite_table1(~ AGE + SEX + RACE + BMIBLGR1 | ARM, data = r2rtf::r2rtf_adsl, id = "USUBJID")

Installation

You can install the package via CRAN:

install.packages("metalite.table1")

Or, install from GitHub:

remotes::install_github("elong0527/metalite.table1")

Highlighted features

  • Drill down listings
  • Embedded histogram

metalite.table1's People

Contributors

elong0527 avatar

Stargazers

 avatar Katja Glaß avatar

Watchers

 avatar

metalite.table1's Issues

Output can not be displayed within an Rmarkdown for loop

Below is a reproducible Rmarkdown example.

Here is the current output structure

  htmltools::browsable(
    htmltools::tagList(metalite::meta_run(
      meta,
      var_listing = var_listing,
      download = download,
      type = type))
  )

title: "Untitled"
output: html_document
date: "2022-12-09"

knitr::opts_chunk$set(echo = TRUE)
devtools::load_all()

Not Working

for(i in 1:3){
  x <- metalite_table1(~ SEX | TRT01A, data = r2rtf::r2rtf_adsl, id = "USUBJID")
  print(x)
}

Working

x <- list()
for(i in 1:3){
  x[[i]] <- metalite_table1(~ SEX | TRT01A, data = r2rtf::r2rtf_adsl, id = "USUBJID")
}

htmltools::browsable(htmltools::tagList(x))

Working

x[[1]]
x[[2]]
x[[3]]

can we remove repeated row in loop of tables?

Hi Yilong,

Another thing is that if we can remove repeated rows from the loop of tables? for example in your code and results:
image

The underline red parts are repeated from table 1 and table 2 basically. It will be nice if there is an option to remove the second same thing from table 2. What do you think?

Thanks
Eric

font size adjustment and number of record to display like options in DT package?

Hi Yilong,

Is there a way to adjust the font size? The table has fixed width in QUARTO markdown HTML output. So, it will be nice if it can have the option to specify column width or font size to make it smaller. Also, you can see the table looks pretty busy when I have multiple visits under the same question.

image

Will an option for two level table be better layout?
image

Also, is there a way to limit the number of record to display when doing the frequency table? For date variable, I can only treat it as character. Then, it list 50 records in the first page in my QUARTO HTML output.

Thanks!

how to install development version?

how to install the development version? I could not find it in your introduction page.
can this option to be used: defaultColDef = list(style = list(fontSize = '10px')) to change font size? thanks

Handling missing value when `group` contain missing values

Code below will report error if there is missing values in the ARM variable.

library(metalite.table1)
metalite_table1(~ AGE + SEX + RACE + BMIBLGR1 | ARM, data = r2rtf::r2rtf_adsl, id = "USUBJID")

We need an argument missing_group to handle:

  1. `missing_group = "ignore": ignore missing value in group with proper message to user.
  2. allow user specify missing as a separate group, the option should allow
    - missing_group = "count": Missing group should be counted into the total column and placed before "Total" column
    - missing_group = "display": Missing group should not be counted into the total column and placed after "Total" column

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.