ind.expand: Expands a list of indexes as given to extract() to actual...

Description Usage Arguments

View source: R/ind.expand.R

Description

Expands a list of indexes as given to extract() to actual indexes as input to []. If given as a vector and not a list, 'ind' is assumed to represent the subset along the first dimension. Also if this is the case, and 'ind' is given as a single numeric, the 'ind' farthest values are selected, or the proportion 'ind' is ind<=1. This type of subset selection is not supported if 'ind' is a list.

Usage

1
2
ind.expand(ind, dim, drop = FALSE, pad = c("end", "start"),
  msg = FALSE, ...)

Arguments

ind

is the index specifyer, given as a list of indexes, where negative represent exclusion, empty list elements, zeros, or FALSE represent no subset, and too high indexes are ignored. If 'ind' has length 0, all possible indices are retuned; if 'ind' is not list, it is transformed to list, and if ind has length shorter than the number of elements in 'dim', it is filled with empty list elements implying that all data are selected along those dimensions. If 'ind' is a single integer, this is interpreted as the number of indexes as counted from the end of the first dimenstion. Logical subscripts are allowed. There are pre-defined index-settings for different acoustical instruments:

dim

is the dimension of the array to subset.

drop

is TRUE for returning a vector if a list of only one element (one dimension) is returned.

pad

determines at which end of the dimensions to pad with zeros if the length of 'ind' is shorter than the number of dimensions. Using pad="start" applies 'ind' on the last dimensions.

msg

is FALSE to not print information about the sampling intervals selected by 'ind'.

...

is resent to allow passing variables from other functions to this function.


arnejohannesholmin/TSD documentation built on Oct. 15, 2019, 8:33 a.m.