summdat: Summarise dataframe by counting number of rows

Description Usage Arguments Value Examples

View source: R/summdat.R

Description

Counts the number of rows across up to three variables of interest.

Usage

1
summdat(data, col1, col2, col3)

Arguments

data

Dataframe containing individuals rows corresponding to studies in a systematic map, for example.

col1

String corresponding to the column name of one of up to three factors (categorical variables) for which counts will be made of the number of rows corresponding to each level of the factor.

col2

String corresponding to the column name of one of up to three factors (categorical variables) for which counts will be made of the number of rows corresponding to each level of the factor.

col3

String corresponding to the column name of one of up to three factors (categorical variables) for which counts will be made of the number of rows corresponding to each level of the factor.

Value

A dataframe containing the summary counts of the number of rows across each level of each of up to three variables.

Examples

1
2
3
4
5
6
7
col1 <- 'outcome'
col2 <- 'inst'
col3 <- 'loc'
text <- RCurl::getURL("https://raw.githubusercontent.com/Cuan-crypto/EGM_RCT/main/EDRCT.csv")
data <- read.csv(text = text)
summary <- summdat(data, col1, col2, col3)
summary;

nealhaddaway/evimappr documentation built on Jan. 1, 2021, 11:36 a.m.