oneOrDataset: Treating single compositions as one-row datasets

Description Usage Arguments Value Author(s) Examples

Description

A dataset is converted to a data matrix. A single data item (i.e. a simple vector) is converted to a one-row data matrix.

Usage

1
2

Arguments

W

a vector, matrix or dataframe

B

an optional second vector, matrix or data frame having the intended number of rows.

Value

A data matrix containing the same data as W. If W is a vector it is interpreded as a single row. If B is given and length(dim(B))!= 2 and W is a vector, then W is repeated nrow(B) times.

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

Examples

1
2
3


Search within the compositions package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.