gen_icrfnames {lazy.irt}R Documentation

Generate the Row Names of vec(icrf) as the Combination of Theta Values and Category Names.

Description

Generate the Row Names of vec(icrf) as the Combination of Theta Values and Category Names.

Usage

gen_icrfnames(theta, ncat, zero = 0, cat.first = 0, digits = 2,
  catroot = "c", sep = ":", compress = 0)

Arguments

theta

Numeric vector of theta values.

ncat

# of categories

zero

= 1 to include the 0-th category

cat.first

= 1 to chage the category fist.
= 2 to change the category first and place category name before theta.
This is for vec(icrf, byrow=1 ).

digits

# of digits after the decimal point of theta.

catroot

The root character for category.

sep

The caracter separating theta and category.

compress

= 1 to remove all the blanks in the result

Details

This function creates a character vector consisting of
c( thetavalue1:catvalue1, thetavalue2:catvalue1, ... ) .
If cat.first=1, the result is
c( thetavalue1:catvalue1, thetavalue1:catvalue2, ... ) ,
and if cat.first=2,
c( catvalue1:thetavalue1, catvalue2:thetavalue1, ... ) ,

Value

A vector consisting of rownames of vec(icrf) or vec(icrf, byrow=1).

Examples

gen_icrfnames(seq(-4,4,length=7), 3 )
gen_icrfnames(seq(-4,4,length=7), 3, cat.first=1 )


[Package lazy.irt version 0.1.3 Index]