Description Usage Arguments Value See Also Examples
Simple read/write utility functions for the CSV and RData data file format.
1 | ohi.read.csv(file, na.strings = "", row.names = NULL, ...)
|
file |
Full path to input/output file. |
x |
A data frame with data to write. |
digits |
Use to restrict ASCII representation of doubles. |
row.names |
Do not use them by default |
na.strings |
Use blanks for NA. |
na |
Use blanks for NA. |
dir |
The directory to use. |
method |
The data file format method. |
envir |
Environment in which to assign name |
name |
The variable to which data will be assigned, and used for the filename – e.g., name = 'regions' will look for 'regions.csv', etc. |
xdim |
The name of a dimension, and expects get(dimension) to return a valid data frame with 2 columns: region_code, and dimension – e.g., ('region_code', 'status'). |
... |
Arguments passed onto read.csv, write.csv, load, save. |
Returns a data.frame with the input data.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
d <- ohi.read.csv('data/regions.csv')
names(d)
head(d)
d$label <- toupper(d$label)
ohi.write.csv(d, 'data/regions.veryloud.csv')
status <- data.frame(region_code=d$region_code, status=rnorm(nrow(d)))
ohi.save.status()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.