Description Usage Arguments Details Value Author(s) Examples
View source: R/jumping.window.R
This function extracts a moving (a.k.a. running, rolling, sliding) window but with no overlap between windows and with the option for gaps between windows.
1 2 | jumping.window(sampl.columns, window.size, gap.size,
start.column = 1, J = FALSE)
|
sampl.columns |
index numbers of the consecutive columns with the sampling data (e.g. 3:180) from which to extract the jumping windows. Can also be any vector from which to extract a jumpting window. |
window.size |
size of each sampling window/season (consecutive sampling days each time) |
gap.size |
size of the gap between sampling windows. Can be zero or a positive integer. |
start.column |
column of sampl.columns where to actually start the sampling windows. The default is 1, but e.g. with a gap size of 1 between windows, the start column can be either 1 or 2. |
J |
logical, whether to provide the results in the form of J for function |
This function is now integrated within submatrix
to provide for additional sampling scheme options.
When J = FALSE (the default), this function returns a vector containing the elements of sampl.columns
that are included in the extracted windows; elements falling within the gaps are left out.
A. Marcia Barbosa, J. Tiago Marques
1 2 3 4 5 6 7 8 9 10 11 12 | data(roadkills)
names(roadkills)
jumping.window(4:ncol(roadkills), window.size = 1, gap.size = 0)
jumping.window(4:ncol(roadkills), window.size = 1, gap.size = 1)
w3g5 <- jumping.window(4:ncol(roadkills), window.size = 3,
gap.size = 5)
w3g5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.