Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
Expand Down
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: repfun
Title: Create TLFs using Functions Styled after SAS™ Macros
Title: Create Tables, Listings and Figures using Functions Styled after SAS™ Macros
Version: 0.1.0
Authors@R:
c(person("Chris", "Rook", , "cr883296@gmail.com", role = c("aut", "cre")),
person("Yongwei", "Wang", , "yongwei.x.wang@viivhealthcare.com", role = c("aut")),
person("GlaxoSmithKline Research & Development Limited", role = c("cph", "fnd")))
Description: Mimic the style of traditional reporting macros for clinical trials. The purpose is to generate TLFs (tables, listings and figures) that support clinical research.
This package is well suited for firms or individuals who wish to incorporate R without changing their
ways of working as it follows a traditional clinical research workflow. Invoke functions (instead of macros) to
summarize data and produce formatted reports. This package differs from others in that it includes
tools (wrappers) for both analyzing and reporting data.
Description: Mimic the style of traditional reporting macros for clinical trials. The purpose is to generate tables, listings
and figures that support clinical research. This package is well suited for firms or individuals who wish to
incorporate R without changing their ways of working as it follows a traditional clinical research workflow.
Invoke functions (instead of macros) to summarize data and produce formatted reports. This package differs from
others in that it includes tools (wrappers) for both analyzing and reporting data.
License: Apache License (== 2.0)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export(ru_setdata)
export(ru_stackvar)
export(ru_sumstats)
export(ru_width_rtf)
export(setpath)
import(dplyr)
import(haven)
import(r2rtf)
Expand Down
4 changes: 2 additions & 2 deletions R/ru_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
#' @param flowvars Variables with flow option
#' @param widths Column widths
#' @param defaultwidths List of default column widths
#' @param skipvars similar to SAS statement skipvars Break after <var> / skip
#' @param pagevars similar to SAS statement pagevars Break after <var> / page
#' @param skipvars similar to SAS statement skipvars Break after skip
#' @param pagevars similar to SAS statement pagevars Break after page
#' @param idvars ID variables
#' @param linevars Order variable printed with line statements.
#' @param centrevars Centre justify variables
Expand Down
32 changes: 0 additions & 32 deletions R/setpath.R

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## R Reporting Functions Repository

This repository contains an R package of reporting functions that mimic (HARP) traditional macros for clinical reporting. The package can be used to generate TLFs (Tables, Listings, Figures). See several examples in the <a href="https://gsk-biostatistics.github.io/repfun/">Vignettes/Articles</a>.
This repository contains an R package of reporting functions that mimic (HARP) traditional macros for clinical reporting. The package can be used to generate Tables, Listings and Figures. See several examples in the <a href="https://gsk-biostatistics.github.io/repfun/">Vignettes/Articles</a>.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down Expand Up @@ -72,7 +72,7 @@ install.packages(c("tidyr","dplyr","ggplot2","magrittr","Hmisc","haven","stringr

## License

This project is released under the Apache-2.0 license. See the **[LICENSE](LICENSE.md)** file for details.
This project is released under the Apache-2.0 license.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
1 change: 0 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ reference:
- ru_setdata
- ru_stackvar
- ru_width_rtf
- setpath
- rem_pg_nums
- copydata
- title: Data
Expand Down
4 changes: 2 additions & 2 deletions man/repfun-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ru_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions man/setpath.Rd

This file was deleted.

15 changes: 0 additions & 15 deletions tests/testthat/test-rs_setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ test_that("environment setup works", {
suppressMessages(library(tibble))
suppressMessages(library(testthat))

#globs <- paste0(tempdir(),'/GLOBALS2.txt')
#write(getwd(),file=globs,append=TRUE)
#write(testthat::test_path(),file=globs,append=TRUE)
#write(paste0(getwd(),'/',testthat::test_path()),file=globs,append=TRUE)
#Sys.sleep(300)

#repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))
repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))
#print(getwd())
#Sys.sleep(20)

#======================
# Invoke setup macro.
#======================
Expand Down Expand Up @@ -51,13 +40,9 @@ test_that("environment setup works", {
D_DEBUG=0)
)

#print(getwd())
#print(adamdata)

#=========================================================
# Read ADSL directly, subset and compare with G_POPDATA.
#=========================================================
#indata <- adamdata$adsl.rda()
indata <- do.call(rfenv$adamdata$adsl.rda,list())
indata <- tibble::as_tibble(indata)
indata %>% dplyr::filter(SAFFL=='Y') -> C_POPDATA
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_addbignvar.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ test_that("adding big N works", {
suppressMessages(library(testthat))
suppressMessages(library(tibble))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#=======
# SETUP
#=======
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_addpage.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ test_that("adding page numbers works", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#==================================================
# Setup reporting environment and read in AE data.
#==================================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_addsupp.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ test_that("combining SDTM with its supplemental data works", {
suppressMessages(library(tidyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

######
# DM #
######
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_align.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ test_that("aligning columns works", {
suppressMessages(library(tidyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#=================
# Adverse Events
#=================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_contents.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ test_that("proc contents works", {
suppressMessages(library(repfun))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#=============================================
# Put contents of mtcars into temporary file.
#=============================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_data2codelist.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ test_that("converting data to codelist works", {
suppressMessages(library(repfun))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#==============================================================================
# Build a codelist style format off of a SAS data set containing a SAS format.
#==============================================================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_datacompare.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ test_that("proc compare works", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

iris1 <- iris %>% dplyr::mutate(ID=dplyr::row_number())
iris2 <- iris %>% dplyr::mutate(ID=dplyr::row_number()) %>% dplyr::mutate(Petal.Length=Petal.Length+1)
irisdiffs <- repfun::ru_datacompare(iris1, iris2, idvars=c('Species','ID'))
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ test_that("adding formatted datetimes works", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#=================================================
# Read SDTM.AE and add time values to the dates.
#=================================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_denorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ test_that("transposing a dataframe works", {
suppressMessages(library(tidyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#======================
#======================
# Adverse Events Test
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_expvarlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ test_that("expanding variable list works", {
suppressMessages(library(repfun))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#========
# Test 1
#========
Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-ru_fillcodedcode.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ test_that("populating a decode variable works", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))
#rfenv$G_DEBUG <<- 0

#========================================
# Create decode for SEX using function.
#========================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_freq.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ test_that("generating counts and percents works", {
suppressMessages(library(tidyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#===============================
# Set up reporting environment.
#===============================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_getdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ test_that("get data function works", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#=========================
# Set up the environment.
#=========================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_groupbyvars.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ test_that("multiplication works", {
suppressMessages(library(repfun))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#===================================
# Add decode variables to the list.
#===================================
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ru_libname.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ test_that("ru_libname works for rds and rda files", {
suppressMessages(library(dplyr))
suppressMessages(library(testthat))

repfun::setpath(paste0(rfenv$PATH,'/tests/testthat'))

#==================================================
# Read ADSL RDA file, restrict to SAFETY subjects.
#==================================================
Expand Down
Loading