safety_summary {eudract} | R Documentation |
Calculate frequency tables from a rectangular data frame with one row per subject-event
Description
Calculate frequency tables from a rectangular data frame with one row per subject-event
Usage
safety_summary(
data,
exposed,
excess_deaths = 0,
freq_threshold = 0,
soc_index = c("meddra", "soc_term"),
na.action = na.fail
)
Arguments
data |
a data set containing the following columns: |
exposed |
a numeric vector giving the numbers of subjects exposed in each group.
This needs to be supplied directly by the user, and cannot be inferred from the input |
excess_deaths |
a numeric vector giving the number of extra deaths not reported within |
freq_threshold |
a value on a percentage scale at which to remove events if the incidence falls below. Defaults to 0 |
soc_index |
a character vector either "meddra" or "soc_term", which is used to identify if the soc variable in data gives the numerical meddra code or the description in English. |
na.action |
a function that indicates what should happen if the data contain missing values. The default is |
Value
a list of three dataframes: GROUP, SERIOUS, NON_SERIOUS. Each contains the summary statistics required by EudraCT, and is suitable for export.
See Also
eudract_convert
simple_safety_xml
Examples
safety_statistics <- safety_summary(safety,
exposed=c("Experimental"=60,"Control"=67))
simple <- tempfile(fileext = ".xml")
eudract <- tempfile(fileext = ".xml")
ct <- tempfile(fileext = ".xml")
simple_safety_xml(safety_statistics, simple)
eudract_convert(input=simple,
output=eudract)
clintrials_gov_convert(input=simple,
original=system.file("extdata", "1234.xml", package ="eudract"),
output=ct)
## Not run:
# This needs a real user account to work
clintrials_gov_upload(
input=simple,
orgname="CTU",
username="Student",
password="Guinness",
studyid="1234"
)
## End(Not run)