get_num_label_repetitions: Get the number of trial repetitions for a given label

Description Usage Arguments Note Examples

View source: R/get_num_label_repetitions.R

Description

Calculates how many repeated trials there are for each label level. This can be useful for selecting sites that have a minimum number of repetitions of each stimulus or other experimental condition.

Usage

1
get_num_label_repetitions(binned_data, variable_to_use, levels_to_use = 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.

variable_to_use

A string specifying whether label variable should be used for calculating the minimum number of level repetitions.

levels_to_use

A character vector specifying which levels to include. If not set, all levels will be used.

Note

The returned value is an S3 object that inherits from data.frame that has an associated plot() method.

Examples

1
2
3
data_file <- system.file("extdata/ZD_150bins_50sampled.Rda", package = "NDTr")
label_rep_info <- get_num_label_repetitions(data_file, "stimulus_ID")
plot(label_rep_info)

emeyers/NDTr documentation built on Aug. 8, 2020, 3:41 p.m.