save_named_table: A function to save tabular files named according to a naming...

Description Usage Arguments Value

View source: R/naming_functions.R

Description

A function to save tabular files named according to a naming schema.

Usage

1
2
3
save_named_table(x, proj.name, tags, values, data.type, tag.delim = ".",
  component.delim = "_", output.dir = dirs$data.csv, type = "csv",
  file.extension = ".txt", ...)

Arguments

x

the names of the object to be saved (as symbols or character strings). (as in base::save)

proj.name

character. Project name. Will be used as the first substring in the file name

tags

list. List with a "tagging schema": list elements contain tags for specific components of the name. E.g. list(markup = "mk", analysis = "an").

values

list. List with a "values schema": lsit elements contain values for the components of the name associated with a specific analysis. E.g. list(markup = "like-parker", analysis = "variant4")

data.type

optional string specifying type of the data stored in the file. it will be added after the project name but before the tags. E.g., if data.type = "data", and the tags and values are as in the examples above, the name could be project1_data_mk.parker-like_an.variant4

tag.delim

character. Delimiter between tags and values.

component.delim

character. Delimiter between filename components

output.dir

character

type

one of "table", "csv", "csv2" - depending on that, the function called differs: utils::write.table, utils::write.csv or utils::write.csv2

file.extension

character. Extenstion of the output file. Only used if type = "table", otherwise it is set to ".csv"

...

other params to be passed to write.table function

Value

Full path to the created file


antonmalko/ettools documentation built on May 28, 2019, 3:35 p.m.