convertTo: convertTo

View source: R/convertTo.R View source: R/archive/data.R View source: R/archive/color_data.R

convertToR Documentation

convertTo

Description

Converts an input object (vector, matrix or data frame) to an output asccording to the format in out. Variable, Row and column names are set, if possible as well as a attribute title.

Usage

convertTo(x, coln, rown, title, out = c("data.frame", "matrix", "vector"))

Arguments

x

vector, matrix, or data frame: input

coln

character: column names if possible

rown

character: row names if possible

title

character: for title attribute

out

character: either

Value

the desired output object

Examples

str(convertTo(pi, "Col1", "Row1", "Title", out='data.frame'))
str(convertTo(pi, "Col1", "Row1", "Title", out='matrix'))
str(convertTo(pi, "Col1", "Row1", "Title", out='vector'))

sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.