R: Print and Summary Methods for repeatedTrain Objects
print.repeatedTrain
R Documentation
Print and Summary Methods for repeatedTrain Objects
Description
Print and summary methods for repeatedTrain objects.
Usage
## S3 method for class 'repeatedTrain'
print(x,...)
## S3 method for class 'repeatedTrain'
summary(object,
responseWindow, acquisitionWindow,...)
## S3 method for class 'summary.repeatedTrain'
print(x,...)
Arguments
x
a repeatedTrain or a summary.repeatedTrain object.
object
a repeatedTrain object
responseWindow
a 2 elements vector specifying the begining and
the end of the neuron response.
acquisitionWindow
a 2 elements vector specifying the begining and
the end of the acquisition. If missing values are obtained
using the floor of the smallest spike time and the
ceiling of the largest one.
...
additional arguments passed to function
chisq.test or print.
Details
print.repeatedTrain calls plot.repeatedTrain
Value
summary.repeatedTrain returns a LIST of class
summary.repeatedTrain with the following components:
nbRepeates
The number of repetitions.
acquisitionWindow
The acquisition window.
stats
A matrix with as many rows as repetitions. The first
column contains the total number of spikes generated by the neuron
during a given repeat (this column appears under the heading "nb"
when the object is printed). The second column contains the corresponding
average discharge rate (this column appears under the heading "nu"
when the object is printed). If a responseWindow was specified,
the third column contains the number of spikes generated by the
neuron during the response period and the fourth column contains the
corresponding rate (these column appear under the headings "nbR" and
"nuR", respectively when the object is printed).
globalPval
The p value of the chi square test for homogeneity
of the total number of spikes generated accross repetitions. Thats a
rough stationarity test.
responsePval
If a responseWindow was specified, the p
value of the chi square test for homogeneity
of the number of spikes generated within the "response window" accross repetitions.
## Load the Vanillin responses of the first
## cockroach data set
data(CAL1V)
## convert them into repeatedTrain objects
## The stimulus command is on between 4.49 s and 4.99s
CAL1V <- lapply(CAL1V,as.repeatedTrain)
## Generate raster plot for the neurons
raster(CAL1V[["neuron 1"]],c(4.49,4.99))
plot(CAL1V[["neuron 2"]],c(4.49,4.99))
plot(CAL1V[["neuron 3"]],c(4.49,4.99))
## Basic summary of neuron 1
summary(CAL1V[["neuron 1"]])
## Enhanced summary giving a response window between 5 and 5.5s
summary(CAL1V[["neuron 1"]],c(5,5.5))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(STAR)
Loading required package: survival
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-12. For overview type 'help("mgcv-package")'.
Loading required package: R2HTML
Loading required package: gss
Loading required package: codetools
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/STAR/print.repeatedTrain.Rd_%03d_medium.png", width=480, height=480)
> ### Name: print.repeatedTrain
> ### Title: Print and Summary Methods for repeatedTrain Objects
> ### Aliases: print.repeatedTrain summary.repeatedTrain
> ### print.summary.repeatedTrain
> ### Keywords: ts survival
>
> ### ** Examples
>
> ## Load the Vanillin responses of the first
> ## cockroach data set
> data(CAL1V)
> ## convert them into repeatedTrain objects
> ## The stimulus command is on between 4.49 s and 4.99s
> CAL1V <- lapply(CAL1V,as.repeatedTrain)
> ## Generate raster plot for the neurons
> raster(CAL1V[["neuron 1"]],c(4.49,4.99))
> plot(CAL1V[["neuron 2"]],c(4.49,4.99))
> plot(CAL1V[["neuron 3"]],c(4.49,4.99))
> ## Basic summary of neuron 1
> summary(CAL1V[["neuron 1"]])
20 repeats in the object.
nb nu
stim. 1 106 9.636364
stim. 2 165 15.000000
stim. 3 141 12.818182
stim. 4 153 13.909091
stim. 5 183 16.636364
stim. 6 146 13.272727
stim. 7 133 12.090909
stim. 8 144 13.090909
stim. 9 140 12.727273
stim. 10 142 12.909091
stim. 11 137 12.454545
stim. 12 133 12.090909
stim. 13 171 15.545455
stim. 14 136 12.363636
stim. 15 93 8.454545
stim. 16 155 14.090909
stim. 17 143 13.000000
stim. 18 138 12.545455
stim. 19 151 13.727273
stim. 20 169 15.363636
The p value of the chi 2 test for the stationarity accross repeats is:
1.7321908149541e-05.
> ## Enhanced summary giving a response window between 5 and 5.5s
> summary(CAL1V[["neuron 1"]],c(5,5.5))
20 repeats in the object.
nb nu nbR nuR
stim. 1 106 9.636364 38 76
stim. 2 165 15.000000 32 64
stim. 3 141 12.818182 30 60
stim. 4 153 13.909091 45 90
stim. 5 183 16.636364 47 94
stim. 6 146 13.272727 32 64
stim. 7 133 12.090909 34 68
stim. 8 144 13.090909 41 82
stim. 9 140 12.727273 33 66
stim. 10 142 12.909091 37 74
stim. 11 137 12.454545 36 72
stim. 12 133 12.090909 35 70
stim. 13 171 15.545455 33 66
stim. 14 136 12.363636 34 68
stim. 15 93 8.454545 32 64
stim. 16 155 14.090909 36 72
stim. 17 143 13.000000 36 72
stim. 18 138 12.545455 30 60
stim. 19 151 13.727273 34 68
stim. 20 169 15.363636 39 78
The p value of the chi 2 test for the stationarity accross repeats is:
1.7321908149541e-05.
The p value of the chi 2 test for the stationarity accross repeats during the stim. is:
0.926171509238809.
>
>
>
>
>
> dev.off()
null device
1
>