baytrends (version 1.1.0)

qw.export: qw.export

Description

Export the contents of a QW object to comma delimited file (csv).

Usage

qw.export(df.qw, dir.output = getwd(), fn.output = NULL)

Arguments

df.qw

Data frame with qw fields to be exported.

dir.output

Directory where output files will be saved. Default is working directory.

fn.output

Name of output file.

Value

Returns a user named tab delimited files to the user defined directory with all of the qw slot data.

Details

This internal function will export each qw field of a given data frame to separate columns in a single comma separated file (csv). The left header information will be used "as is" but the data fields will be named with the qw column name and the qw slot names .Data.values, .Data.value2, and remark.codes (e.g., secchi..Data.values). These slots names will be renamed _lo, _hi, _symbol (e.g., secchi_lo). The remaning qw slot values will not be exported.

The exported file will be in a directory specified by the user (defaults to working directory). The file will be named as specified by the user.

Examples

Run this code
# NOT RUN {
# define data frame with qw column classes
myDF <- dataCensored

# directory to save output
dir.save <- getwd()

# prefix for file names ()
fn.out <- "dataCensored_TEST.csv" 

# run function
qw.export(myDF, dir.save, fn.out)
# }

Run the code above in your browser using DataLab