saveDict {pgca}R Documentation

Write a PGCA dictionary to a text file

Description

Write the dictionary to a text file using the write.table function. By default, a tab-separated file is written, but this can be changed by changing the arguments to write.table.

Usage

saveDict(dict, file = stop("`file` must be specified"), ...)

Arguments

dict

a PGCA dictionary.

file

either a character string naming a file or a connection open for writing. "" indicates output to the console.

...

further arguments passed to write.table.

Value

This function returns NULL invisibly.

See Also

pgcaDict to create the dictionary, and applyDict to apply the dictionary for translating data files.

Examples

# Build accession dictionary from all files in a directory
dict <- pgcaDict(
         system.file("extdata", package="pgca"),
         col.mapping=c(gene.symbol="Gene_Symbol")
)

# Save dictionary to a temporary file
dictOutFile <- tempfile()
saveDict(dict, file=dictOutFile)

# Change the separator string to a tab
dictOutFile <- tempfile()
saveDict(dict, file=dictOutFile, sep="\t")

[Package pgca version 1.14.0 Index]