Skip to contents

Export data from R

Usage

export(object, con, ...)

# S4 method for class 'TxToGene,character'
export(object, con, ...)

Arguments

object

Object.

con

character(1) or connection. Data connection. Use character(1) to represent a file path.

...

Additional arguments.

Value

Invisible character or list of file paths.

Details

The TxToGene method automatically disables writing of column names, which is the intended input format for tximport.

Note

Updated 2023-09-20.

Examples

object <- S4Vectors::DataFrame(
    "txId" = c(
        "tx0001",
        "tx0002",
        "tx0003",
        "tx0004"
    ),
    "geneId" = c(
        "gene0001",
        "gene0001",
        "gene0002",
        "gene0002"
    )
)
object <- TxToGene(object)
con <- file.path(AcidBase::tempdir2(), "tx2gene.csv")
#> Error in vapply(X = X, FUN = FUN, FUN.VALUE = logical(1L), ..., USE.NAMES = useNames): formal argument "USE.NAMES" matched by multiple actual arguments
export(object = object, con = con)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'con' in selecting a method for function 'export': object 'con' not found
x <- readLines(con, n = 4L)
#> Error: object 'con' not found
print(x)
#> Error: object 'x' not found
AcidBase::unlink2(con)
#> Error: object 'con' not found