R/roxygen.R

Defines functions document_suffix document_stimulus document_treatments document_delay document_annotated_data document_cross_data document_border document_shape_data document_limits document_dataset document_analysis document_controller_data document_tracker_data document_data document_gg document_result_folder document_experiment_folder

document_experiment_folder <- function() {
    "@param experiment_folder Path to folder containing IDOC results .csv files"
}

document_result_folder <- function(required=FALSE) {
  
  docs <- "@param result_folder Path to a folder where to save results."
  if (!required) {docs <- paste0(docs, " If not passaed, it is set to experiment_folder")}
}

document_gg <- function(x="param") {
    paste0("@", x, " gg ggplot2 object")
}

document_data <- function() {
    "@param data List with entries roi, controller, border, limits.
    roi and controller must be data.tables generated by loading IDOC data.
    Border is a TODO. Limits is a numeric vector with 2 positions, delineating
    the boundaries of the x axis"
}

document_tracker_data <- function() {
  "@param tracker_data IDOC tracker dataset where every row captures the position of one animal at one timepoint"
}

document_controller_data <- function() {
  "@param controller_data data.frame with recordings of IDOC status at several timepoints,
  one timepoint per row. Wide format
  "
}

document_analysis <- function() {
  "@param analysis List of processed data including:
  * annotation: every row is a decision zone exit and its appetitive / aversive
  value
  * pi: preference index scored by each animal
  "
}

document_dataset <- function() {
  "@param dataset List of raw data including:
  * roi: every row records the position of one animal at one point in time
  * controller: every row records the status of all IDOC stimulus at one point in time
  * limits
  * border
  "
}

document_limits <- function() {
  "@param limits Position of ticks in space axis"
}

document_shape_data <- function() {
  "@param shape_data Data table where every row is a corner of a polygon
   The group field is the same for all corners of the same polygon
   x and y show where on the plot the corner is
  The color and transparency is provided by the other function arguments.
  "
}

document_border <- function() {
  "@param border Number of pixels from center to decision zone edge"
}

document_cross_data <- function() {
  "@param cross_data data.frame where every row captures the position of one animal at one timepoint
  when the animal exits the decision zone. Must contain fields t, side, region_id"
}

document_annotated_data <- function() {
  "@param annotated_data data.frame where every row captures the position of one animal at ome timepoint
  when the animal exists the decision zone and a sign (type) is associated with the exit (appetitive or aversive).
  Must contain fields t, side, type, region_id"
}
document_delay <- function() {
  "@param delay Seconds to shift the representation of the treatments
   on the plot, to account for a latency or lag between treatment
  delivery start and arrival to behavioral arena
  "
}

document_treatments <- function() {
  "@param treatments Vector of treatments.
  If named and names contain the word treatment,
  it is likely that the user is running old API code
  " 
}

document_stimulus <- function() {
  "@param stimulus Namew of stimulus or event, which should match
  a column in the passed `controller_data`
  " 
}

document_suffix <- function() {
  "@param suffix A character (word) that will differentiate resulting output
  from other output produced on the same experiment folder.
  Useful for segmenting the experiment into different periods of interest
  and analyzing these periods separately."
}
shaliulab/idocr documentation built on June 1, 2025, 4:59 p.m.