View source: R/general_help_functions.R
add_entries_sameuse_timepoint | R Documentation |
Function to get sum of entries of resource per individual at diff timepoints if same cateogry has listed multiple time for same id of participant , this method comes in handy to get the sum
add_entries_sameuse_timepoint(
use_data,
timepointcol,
timepointval,
idcolumn,
result_col
)
use_data |
the data where the observations are held |
timepointcol |
columnname in the data where the timepoints are noted |
timepointval |
which time point is considered now at which the descriptive analysis is done |
idcolumn |
id for each participant |
result_col |
name of the column where the sum of entries to be saved |
the data with added sum of resource use
eg_data <- as.data.frame(list(no = c(1, 2, 3, 4),
mark_at_1 = c(12, 7, 23, 45), gender = c("M", "F", "M", "F"),
mark_at_2 = c(12, 34, 89, 45), trialarm = c("1","1","2","2"),
time = c(1,1,2,2), id = c(1, 1, 1, 2)))
add_entries_sameuse_timepoint(eg_data, "time", 1, "id",
("mark_at_2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.