as.data.frame: Coerce object to data.frame

as.data.frameR Documentation

Coerce object to data.frame

Description

Coerce object to data.frame

Usage

as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'IRanges'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'Matrix'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

Object.

row.names, optional

Refer to base::data.frame for usage details.

...

Additional arguments.

Value

data.frame.

Note

Updated 2023-10-06.

Examples

data(
    IRanges,
    sparseMatrix,
    package = "AcidTest"
)

## `IRanges` to `data.frame` ====
from <- IRanges
to <- as.data.frame(from)
head(to)

## `Matrix` to `data.frame` ====
from <- sparseMatrix
to <- as.data.frame(from)
head(to)

acidgenomics/brio documentation built on Feb. 1, 2024, 11:47 a.m.