window.rats: Subsets rats by time Intervals always include the 'start' and...

View source: R/classes_rats.R

window.ratsR Documentation

Subsets rats by time Intervals always include the 'start' and exclude the 'end' values. Windows can alternatively be specified through start, end, or one among start and end and a duration.

Description

Subsets rats by time Intervals always include the 'start' and exclude the 'end' values. Windows can alternatively be specified through start, end, or one among start and end and a duration.

Usage

## S3 method for class 'rats'
window(x, start, end, duration)

Arguments

x
start

numeric. Start of the window

end

numeric. End of the window

duration

numeric. The duration of the window.

Value

a subset rats object

Examples

x = rats(1:100, start=0, frequency = 10)


window(x, start=2, duration=2)

#Replace values within a window
window(x, start=0.21, end=0.5) = 99 



kleinbub/rIP documentation built on Dec. 21, 2024, 9:15 a.m.