1.2.export.data {pems.utils} | R Documentation |
exporting PEMS data
Description
Some functions for exporting data from R and pems.utils.
Usage
exportPEMS(pems, file = "tempfile", file.writer = write.table,
sep = "\t", ...)
exportPEMS2TAB(pems, file = "tempfile", file.writer = write.table,
sep = "\t", ...)
exportPEMS2TAB(pems, file = "tempfile", file.writer = write.table,
sep = "\t", ...)
#exportPEMS2Excel
#currently disabled
Arguments
pems |
(A required object) The object to export from R, typically a |
file |
(Character) The name of the file to create when exporting data. This can be
|
file.writer , sep |
(Various arguments) |
... |
(Optional) Other arguments, handling varies. For |
Details
By default, exportPEMS2TAB
and exportPEMS2CSV
export the data component of a supplied
pems
object, to tab-delimited .txt
and comma-delimited .csv
files,
respectively. file
sets the file name (default tempfile
).
These are typically used in form:
exportPEMS2...(pems, file, ...)
By default, they make the following associated modifications:
If file extensions are not included in file
, they add .txt
and .csv
extensions to tab-delimited and comma-delimited files, respectively. The argument
tidy.file=FALSE
can be used to disable this modification.
Time stamps, if identified, are exported in "DD/MM/YYYY HH:MM:SS.x" format. Handling can be
altered using time.stamp
, time.format
and tz
arguments like
import2PEMS
or disabled using tidy.time.stamp=FALSE
.
Data-series units can also be added to exported file column names in form name(units)
by adding the argument units="add.to.names"
.
Value
exportPEMS2...()
functions generate export file from pems data.
Warning
Currently, exportPEMS...
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 comma-delimited copy of pems.1
## Not run:
exportPEMS2CSV(pems.1, "pems.example")
dir()
## End(Not run)