For two vectors frequencies and levels the values from an object of type FreqRep are returned.
## S4 method for signature 'FreqRep'getValues( object, frequencies =2* pi *(0:(lenTS(object@Y)-1))/lenTS(object@Y), levels = object@levels, d =1:(dim(object@values)[2]))
Arguments
object: FreqRep of which to get the values
frequencies: a vector of frequencies for which to get the values
levels: a vector of levels for which to get the values
d: optional parameter that determine of which component to return the data; may be a vector of elements 1, ..., D
Returns
Returns data from the array values that's a slot of object.
Details
The two parameters frequencies and levels are expected to be vectors of reals; an error is thrown otherwise. If any of the frequencies or levels requested is not available from object a warning is issued, and the values with frequencies and levels closest to the ones requested are returned. Note that the frequencies are transformed to [0,pi] using frequenciesValidator
when checking if they are available in object.
The returned array of values is of dimension [J,K,B+1], where J=length(frequencies), K=length(levels), and B
denotes the value stored in slot B of object. At position (j,k,b) the returned value is the one corresponding to frequencies[j] and levels[k] that are closest to the frequencies and levels available in object; closest.pos is used to determine what closest to means.