readAndWrite: Read and write tables

Description Usage Arguments Details Value Note Author(s) See Also

View source: R/readAndWrite.R

Description

Read or write tables in two specific formats for standardizing the cleaning process. This function reads the input and writes the output.

Usage

1
2
readAndWrite(action = NULL, frmt = NULL, path = NULL, name = NULL,
  object = NULL)

Arguments

action

Vector of characters. If 'read' string, the function will read the file. If 'write' string, the function will write output file.

frmt

Vector of characters. The format to read or write can be of two types: plain text 'readTXT'/'saveTXT' or a R object 'saveRDS'/'saveRDS'.

path

Vector of characters. Path to the input file or the destination Path to the output file.See details.

name

Vector of characters. Name of the input file or name of file to write.

object

Vector of characters. Object to write. See details.

Details

It reads and/or writes a file in plain text format (txt) using the functions read.table and/or write.table. To maintain the standard manipulation the arguments for both functions read.table and write.table parameters, are the default, except for the parameters: sep= 'TAB', header= TRUE, quotes= FALSE and rownames = FALSE.

If the argument in the action parameter is 'write', the argument in object and name parameters must be assigned. But, if the argument in the action parameter is 'read', the argument in object parameter must be omitted.

Value

For action = 'read', load the file given for the user. For action = 'write', save an output file. Both depend on the frmt parameter.

Note

See: R-Alarcon V. and Miranda-Esquivel DR. (submitted) geocleaMT: An R package to cleaning geographical data from electronic biodatabases.

Author(s)

R-Alarcon Viviana and Miranda-Esquivel Daniel R.

See Also

saveRDS

write.table


Dmirandae/geocleaMT-1 documentation built on Nov. 18, 2019, 6:26 p.m.