Description Usage Arguments Value Note Author(s) Examples
Given the filename of a file compiled from the vest, this function imports the speficied file into the R environment as a dataframe.
1 | import_vest(filename,prefix,suffix)
|
filename |
The complete filename (including path, name and extension) to the file you want to import into R. |
prefix |
(Optional, no default) Sometimes it is handy to import the column names with a prefix (e.g. "VEST_") so they are unique within the dataframe if you want to use the time series to compare with another instrument. The result of specifying a prefix is that all columns in the imported dataset (except for PosixTime) are named (e.g. "VEST_") VEST_dect, VEST_2100UL, etc. |
suffix |
(Optional, no default) Similar to above. The result of specifying a suffix (e.g. "_Vm") is that all columns related to frequency bands show this suffix in their variable name (e.g.) DECT_Vm, 2100UL_Vm etc. |
The result is an R dataframe of your vest file which is ready to work with.
A small vest example .csv file -at least the way it looks for now- is available as an example, but the format will likely change. To be continued...
Marloes Eeftens, marloes.eeftens@swisstph.ch
1 2 3 4 5 6 | #Write the example .csv to a folder of your choice (please change pathname!):
my_filename1<-"V:/EEH/R_functions/EMFtools/data/vest_example.csv"
write.table(vest_example,file=my_filename1,sep=",",quote=FALSE,row.names=FALSE)
#Import using the import function:
my_vest_file<-import_vest(filename=my_filename1,prefix="VEST_",suffix="_Vm")
str(my_vest_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.