Coerce to DataFrame

as.DataFrame(x)

Arguments

x

Object.

Examples

## sparseMatrix to DataFrame ==== data(sparse, package = "acidtest") stopifnot(is(sparse, "sparseMatrix")) x <- as(sparse, "DataFrame") ## tbl_df to DataFrame ==== data(tbl, package = "acidtest") stopifnot(is(tbl, "tbl_df")) x <- as(tbl, "DataFrame") head(x)
#> DataFrame with 4 rows and 4 columns #> sample1 sample2 sample3 sample4 #> <integer> <integer> <integer> <integer> #> ENSG00000000001 1 5 9 13 #> ENSG00000000002 2 6 10 14 #> ENSG00000000003 3 7 11 15 #> ENSG00000000004 4 8 12 16