annual_recruitment {secuTrialR} | R Documentation |
Returns a data.frame showing the annual recruitment per center
Description
secuTrial exports inherently contain the information on which participant was registered at which point in time. This function makes use of this property to show annual recruitment.
Usage
annual_recruitment(x, rm_regex = "")
Arguments
x |
a |
rm_regex |
character - specifies a regular expression to be removed from the centre names in the legend. e.g. rm_regex = "\\(.*\\)$" will remove trailing brackets and their contents. |
Value
a data.frame showing the annual recruitment counts per center
Note
This function wraps plot_recruitment to retrieve the data.
Examples
# export location
expot_loc <- system.file("extdata", "sT_exports", "lnames",
"s_export_CSV-xls_CTU05_long_ref_miss_en_utf8.zip",
package = "secuTrialR")
# read export
sT_export <- read_secuTrial(expot_loc)
# plot recruitment
annual_recruitment(sT_export)
# show without trailing bracket
annual_recruitment(sT_export, rm_regex = "\\(.*\\)$")
[Package secuTrialR version 1.3.3 Index]