R/calculate_eventcursors.R

Defines functions get_eventresults

#' Get eventresults
#'
#' Lists all eventresults
#' 
#' @param tree the tree from which eventresults should be extracted
#' @param stimname the stimulus name for which eventresults should be listed 
#'
#' @return a data frame containing all event results for the given stimulus
#' @export

get_eventresults<-function(tree,stimname){
  events<-get_eventcursors(stimname)
  # get all events of eventlist ec, with additional column listing the basename
  plyr::ldply(events,calculate_eventcursor, tree=tree) %>% 
    plyr::mutate(basename=get_eventbasename(.id))  
}
tdanker/ephys2 documentation built on Aug. 11, 2019, 12:12 p.m.