Learn R Programming

qreport (version 1.0-1)

sampleFrac: Compute Sample Fractions

Description

Uses denominators stored with setqreportOption along with counts specified to SampleFrac to compute fractions of subjects in current analysis

Usage

sampleFrac(n, nobsY = NULL, table = TRUE, study = " ")

Value

named vector of relative sample sizes with an attribute table with frequency counts

Arguments

n

integer vector, named with "enrolled","randomized" and optionally also including treatment levels.

nobsY

a result of the the nobsY Hmisc function

table

set to TRUE to return as an attribute "table" a character string containing an HTML table showing the pertinent frequencies created from n and the denom option, and if nobsY is present, adding another table with response variable-specific counts.

study

character string with study ID

Examples

Run this code
setqreportOption(tx.var='treatment', denom=c(enrolled=1000, randomized=800, a=398, b=402))
sampleFrac(getqreportOption('denom'))

Run the code above in your browser using DataLab