Learn R Programming

polyMatrix (version 0.3.1)

cycFill: A vector or a list of a given length, filled cyclically by the given material

Description

Fills an object by the given material

Usage

cycFill(data, size)

Arguments

data

the material

size

the desired length

Value

Depending on the class of the given material, the class of the result is vector or list. The length of the result equals by the value of the size parameter.

Details

The class of the output is the same as the class of the input. The output object is filled cylically by the given material u.

See Also

Used in the code of polyMgen.a,

polyMgen.d

Examples

Run this code
# NOT RUN {
u <- c(4, 1, 3, 2)
cycFill(u, 2)
cycFill(u, 4)
cycFill(u, 6)
cycFill(u, 11)
cycFill(u, 12)

u <- as.list(c(4, 1, 3, 2))
cycFill(u, 2)
cycFill(u, 4)
cycFill(u, 6)
cycFill(u, 11)
cycFill(u, 12)

# clean up
# rm(u)

# }

Run the code above in your browser using DataLab