DFI.coercion: Coerce a DFI object

Description Usage Arguments Value See Also Examples

Description

Coerce a DFI object to data.frame or matrix

Usage

1
2
3
4
## S3 method for class 'DFI'
as.data.frame(x, ...)
## S3 method for class 'DFI'
as.matrix(x, ...)

Arguments

x

a DFI object

...

optional arguments passed to inner as.data.frame and as.matrix methods.

Value

A data.frame or matrix object

See Also

DFI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
### create a simple DFIobj
DF <- data.frame(Foo=c(3,5,7,1,5,8,7,10),
                 Bar=c("A","B","B","C","B","B","C","A"),
                 Baz=c(TRUE,FALSE),
                 stringsAsFactors=FALSE)
DFIobj <- DFI(DF, c("Foo","Bar")) # create a DFI from DF with indexes on "Foo" and "Bar" columns

### coercion
as.data.frame(DFIobj)
as.matrix(DFIobj)

bsearchtools documentation built on May 2, 2019, 8:11 a.m.