# load example data
sr_data <- load_clean(import= "no", file.cat = "SI_cat", sr= "yes",
format.cat = "wide")$sr_data
# \donttest{
# run function (takes only a few seconds)
sr_fn()$sr_graph
# to import an excel spreadsheet (modify using local path,
# file and sheet name, range, and format):
# get path for example files
path <- system.file("extdata", "reappraised_examples.xlsx", package = "reappraised",
mustWork = TRUE)
# delete file name from path
path <- sub("/[^/]+$", "", path)
# load data
sr_data <- load_clean(import= "yes", sr = "yes", dir = path,
file.name.cat = "reappraised_examples.xlsx", sheet.name.cat = "SI_cat",
range.name.cat = "A:D", format.cat = "wide")$sr_data
# function has an additional option for block randomisation.
# If studies are block randomised and the final block size is known,
# the number of participants in the final block can be determined.
# The distribution of differences between groups for the final block
# can be compared to the expected distribution
#
# Few studies provide all these details so it seems unlikely this function
# would get used often
# Example takes only a few seconds to run
sr_fn(br = "yes", block = data.frame(study = c(1,2,3,4,5,6,7,8,9,10),
fb_sz= c(2,4,6,8,10,12,8,8,6,14), n_fb = c(1,1,4,5,7,8,4,6,2,10),
df=c(1,1,0,1,3,4,2,2,0,0)))$sr_graph# }
Run the code above in your browser using DataLab