Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hcube

Generate all points on a hypercuboid lattice.


Description

Generate all points on a hypercuboid lattice.

Usage

hcube(x, scale, translation)

Arguments

x

Argument x is an integer vector giving the extent of each dimension; the number of dimensions is length(x).

scale

Argument scale is a vector of real numbers giving an amount by which to multiply the points in each dimension; it will be replicated as necessary to have the same length as x.

translation

Argument translate is a vector of real numbers giving an amount to translate (from the "origin", rep(1,length(x))) the points in each dimension; it will be replicated as necessary to have the same length as x. To use rep(0,length(x)) as the origin, use translation = -1. Scaling, if any, is done BEFORE translation.

Value

A prod(x) by length(x) numeric matrix; element (i,j) gives the location of point i in the jth dimension. The first column (dimension) varies most rapidly.

Author(s)

code by Scott Chasalow, R pack and maint by VJ Carey <stvjc@channing.harvard.edu>

References

~put references to the literature/web site here ~

See Also

fac.design, expand.grid


combinat

combinatorics utilities

v0.0-8
GPL-2
Authors
Scott Chasalow
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.