1.4.export.data {pems.utils}R Documentation

exporting PEMS data

Description

Some functions for exporting data from R and pems.utils.

Usage


 
exportPEMSData(data, file="tempfile", ..., 
          sep="\t", file.writer = write.table,
          row.names = FALSE)

exportPEMS2CSV(pems, file="tempfile", ...)

#exportPEMS2Excel 
#currently disabled

Arguments

data, pems

(A required object) The object to export from R, typically a data.frame or pems object.

file

(Character) The name of the file to create when exporting data. This can be 'clipboard', to export to the clipboard assuming the clipboard buffers are not exceeded.

...

(Optional) Other arguments, handling varies. For export... functions, these are currently ignored. Note: This and may be subject to change in future.

sep, file.writer, row.names

(Various arguments) file.writer is the R function used to create the export file. sep and row.names are arguments passed to file.writer.

Details

Both exportPEMSData and exportPEMS2CSV export the data component of a supplied pems object. exportPEMSData saves it as a tab-delimited .txt file. exportPEMS2CSV saves it as a comma-delimited .csv file. See below.

Value

By default, exportPEMSData and exportPEMS2CSV, respectively, generate tab-delimited and comma-delimited file copies of the data element of the supplied data.

If a file name is not set using the file argument, the is named tempfile.

exportPEMS2CSV modified the data as part of export as follows: It adds the time-series units to the time.series name in form [name]_[units].

Warning

Currently, the export... functions overwrite without warnings.

Note

exportPEMS2Excel is curently disabled.

These are very crude functions in the most part because they are rarely used. Suggestions for helpful improvements would be very welcome.

Author(s)

Karl Ropkins

References

References in preparation.

See Also

See import2PEMS, etc. for importing data into pems.utils.

Examples


###########
##example 1 
###########

#making a tab-delimited copy of pems.1

## Not run: 
exportPEMSData(pems.1, "pems.example.txt")
dir()

## End(Not run)


[Package pems.utils version 0.2.25.11 Index]