Learn R Programming

MadanText (version 0.1.0)

ASDATA.FRAME: Convert to Data Frame

Description

This function converts the given object to a data frame.

Usage

ASDATA.FRAME(x)

Value

Returns a data frame with rows and columns corresponding to the original object's structure. If `x` is a matrix, each column in the matrix becomes a column in the data frame. If `x` is a list where all elements are of the same length, each element of the list becomes a column in the data frame. Attributes such as rownames, colnames, and dimnames (if any) are preserved in the conversion.

Arguments

x

An object to be converted into a data frame.

Examples

Run this code
data <- ASDATA.FRAME(matrix(1:4, ncol = 2))

Run the code above in your browser using DataLab