Add GLDP Geopressure Template
Source:R/add_gldp_geopressuretemplate.R
add_gldp_geopressuretemplate.Rd
This function adds geopressuretemplates to a GLDP package by reading data from specified directories and files.
Arguments
- pkg
A GLDP package object.
- directory
A character string specifying the directory where the data files are located.
- from
A character string specifying the source of the data files. Can be "raw-tag" (for creating
tag
based on the data indata/raw-tag/
) or "interim" for data indata/interim
. IfNULL
(default), the function will determine the source based on the presence of at least one file in the "interim" directory.- replace
If
TRUE
, the added resource will replace an existing resource with the same name.
Details
The function performs the following steps:
Reads the "tags.csv" and "observations.csv" files from the "./data" directory if they exist and adds them to the GLDP package.
Determines the source of the data files ("data" or "interim") if the
from
parameter is NULL.Reads all ".RData" files from the specified source directory and processes them.
You can exclude interim file to be included in the package by starting the file name with an _
.
It is not possible to do a mix of some tag
read from from="data"
and some tag
read from
from="interim"
.