stringtovector: Converts a character string representation of a factorial...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mainfunctions.R

Description

Converts a character string representation of a factorial effect in PG(n-1,2) into a binary vector of length n.

Usage

1
stringtovector(string,n)

Arguments

string

a character string representation of a factorial effect in PG(n-1,2) (see Details and Examples of checkSpreadEquivalence).


n

the number of basic factors, or equivalently, the dimension of PG(n-1,2)

Details

Takes a character string representation of a factorial effect in PG(n-1,2), and returns a binary vector of length n. This can be used in defining a spread or a star. The spread/star should be formatted as a 3-dimensional array with spread[i,j,k]/star[i,j,k] indicating whether or not the ith basic factor is present in the jth effect of the kth flat of spread/star. See Spencer et al. (2019) for details.

Value

A binary vector of length n.

Author(s)

Neil Spencer, Pritam Ranjan, Franklin Mendivil

References

Spencer, N.A., Ranjan, P., and Mendivil, F., (2019), "Isomorphism Check for 2^n Factorial Designs with Randomization Restrictions", Journal of Statistical Theory and Practice, 13(60),1-24 [https://doi.org/10.1007/s42519-019-0064-5]

See Also

checkSpreadIsomorphism for checking the isomorphism of balanced spreads.
checkStarIsomorphism for checking the isomorphism of balanced covering stars.

Examples

1
2
3
4
## Example : Converts "AC" into a vector representation
stringtovector("AC",4)
stringtovector("AC",5)
stringtovector("CD",6)

IsoCheck documentation built on March 25, 2020, 5:09 p.m.