get_num_label_repetitions_each_site {NeuroDecodeR} | R Documentation |
Get the number of trial repetitions for a given label for each site
Description
Calculates how many repeated trials there are for each label level for each site. This can be useful for selecting sites that have a minimum number of repetitions of each stimulus or other experimental condition.
Usage
get_num_label_repetitions_each_site(binned_data, labels, label_levels = NULL)
Arguments
binned_data |
A string that list a path to a file that has data in binned format, or a data frame of binned_data that is in binned format. |
labels |
A string specifying which label variable should be used for calculating the minimum number of level repetitions. |
label_levels |
A character vector specifying which levels to include. If not set, all levels will be used. |
Value
A data frame where each row corresponds to a recording site. The columns in the data frame are:
-
siteID: The siteID each row in the data frame corresponds to
-
min_repeats: minimum number of repeats across all label levels
-
level_XXX: The number or repeats for a specific label level
-
site_info.XXX: The site_info for each site