fda (version 2.4.7)

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)

Arguments

n

the required length of wtvec

wtvec

an object to be checked

Value

a vector of n positive numbers

Examples

Run this code
# NOT RUN {
wtcheck(3, 1:3)

wtcheck(2, matrix(1:2, 2))

# }

Run the code above in your browser using DataCamp Workspace