
Add Geolocator DP resources from a GeoPressureTemplate
Source:R/add_gldp_geopressuretemplate.R
add_gldp_geopressuretemplate.Rd
This function adds all possible resources to a GeolocatoR Data Package by reading data from a GeoPressureTemplate directories and files.
The function performs the following steps:
If
"interim"
infrom
, reads all interim ".RData" files, extract all resources possibles and add them to the package.tags
andobservations
are generated automatically fromparam
.If
"raw-data"
infrom
, create all the possible resources fromdata/raw-data/
anddata/tag-label/
.tags
andobservations
resources are also generated from available information.Reads the
tags.csv
andobservations.csv
files from the./data
directory if they exist and overwrite the previously generatedtags
andobservations
.
You can exclude interim file to be included in the package by starting the file name with an _
.
It is possible to do a mix of some tag
read from "interim"
and other from "raw-data"
simultaneously.
You can find more information on the use of this function in the GeoPressureManual
Usage
add_gldp_geopressuretemplate(
pkg,
directory = ".",
from = c("raw-tag", "interim"),
replace = FALSE
)
Arguments
- pkg
A GeoLocator Data Package object.
- directory
A character string specifying the geopressuretemplate directory.
- from
A character vector specifying the source of the data files. Either or both of
"raw-tag"
(for creatingtag
based on the data indata/raw-tag/
) and"interim"
for data indata/interim
.- replace
If
TRUE
, the added resource will replace an existing resource with the same name.