Learn R Programming

fda (version 6.2.0)

wtcheck: Check a vector of weights

Description

Throws an error if wtvec is not n positive numbers, and return wtvec (stripped of any dim atrribute)

Usage

wtcheck(n, wtvec)

Value

a vector of n positive numbers

Arguments

n

the required length of wtvec

wtvec

an object to be checked

References

Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.

Examples

Run this code
wtcheck(3, 1:3)
wtcheck(2, matrix(1:2, 2))

Run the code above in your browser using DataLab