matrix_df {ichimoku}R Documentation

Convert matrix to data.frame

Description

An optimised 'matrix' to 'data.frame' constructor.

Usage

matrix_df(x, keep.attrs = FALSE)

Arguments

x

a matrix.

keep.attrs

[default FALSE] if set to TRUE, will preserve any custom attributes set on the original object.

Details

The optimised data.frame constructors are used internally within the package and made available as utilities. Please note that no data validation or checking is performed.

Value

A 'data.frame' object. If the matrix has row names, these are retained by the dataframe.

Examples

cloud <- ichimoku(sample_ohlc_data)
mcloud <- as.matrix(cloud)
df <- matrix_df(mcloud)
str(df)
str(rownames(df))


[Package ichimoku version 1.5.1 Index]