Package 'rvdat'

Title: Lightweight Access to 'VDAT' Shell Commands
Description: Provides lightweight, R-friendly syntax for 'VDAT' shell functions.
Authors: Michael O'Brien [aut, cre]
Maintainer: Michael O'Brien <[email protected]>
License: AGPL (>= 3)
Version: 0.0.1.900
Built: 2024-11-18 06:10:03 UTC
Source: https://github.com/mhpob/rvdat

Help Index


Miscellaneous functions for package checking, building, and CI

Description

skip_example_on_ci and skip_example_on_runiverse check the environment for variables called "CI" and "MY_UNIVERSE", respectively, and return TRUE if it does not exist. Used to run examples if the package is being built locally and there's a chance that vdat.exe exists. If the package is being built on a continuous integration platform like GitHub Actions, the "CI" variable will be TRUE and skip_example_on_ci will return FALSE. If it is being built locally, "CI" will be "" and skip_example_on_ci will return TRUE. Similarly, if the package is being built on R-Universe, the "MY_UNIVERSE" variable will have your universe's name.

Usage

skip_example_on_ci()

skip_example_on_runiverse()

Interface directly with vdat.exe.

Description

Low-level interface to vdat.exe, wherein arguments are passed directly to vdat.exe. Arguments should be character vectors, each element being one command.

Usage

vdat_call(what = "--help", print = TRUE, pass_error = FALSE, ...)

Arguments

what

arguments passed to vdat.exe. Defaults to --help.

print

logical. Defaults to TRUE. Print the output to console?

pass_error

logical. Defaults to FALSE. Capture and pass any error through to the user?

...

arguments passed to sys::exec_internal.

Examples

## Not run: 

# Check the help documentation
vdat_call()

#
vdat_call("--help")

# Inspect a file; multiple arguments are passed in a character vector
vdat_call(c("inspect", "FILENAME"))

## End(Not run)

Write the location of vdat.exe to the environmental variables.

Description

Write the location of vdat.exe to the environmental variables.

Usage

vdat_here(here = NULL)

Arguments

here

location of vdat.exe, either a full path name or relative to the current working directory.

Examples

# Auto-find vdat:
vdat_here()

# Provide an explicit location:
vdat_here("c:/program files/innovasea/fathom connect/vdat.exe")

Return general VDAT file metadata

Description

Return general VDAT file metadata

Usage

vdat_inspect(vdata_file, ...)

Arguments

vdata_file

file path of VDAT file to inspect.

...

arguments passed to vdat_call.


Return description fields ("template") of different VDAT data types and/or files

Description

Return description fields ("template") of different VDAT data types and/or files

Usage

vdat_template(format = "csv.fathom", print = FALSE, ...)

Arguments

format

file format of the template. Currently only accepts "csv.fathom"; here for future compatibility.

print

logical. Defaults to FALS.E Print the output to console?

...

arguments passed to vdat_call.


Internal ⁠vdat convert⁠ caller

Description

Internal ⁠vdat convert⁠ caller

Usage

vdat_to(
  output_format = c("csv", "json"),
  vdata_file,
  outdir = getwd(),
  time_corrected = FALSE,
  quiet = FALSE,
  folder = FALSE,
  filter = NULL
)

Arguments

output_format

What is the desired output format? One of "csv" or "json". Default is "csv".

vdata_file

path of VDAT file to convert to CSV.

outdir

output directory for the created CSV files. Defaults to the current working directory.

time_corrected

logical. Do you want to apply the default time correction?

quiet

logical, defaults to FALSE. Suppress messages?

folder

logical, defaults to FALSE. Convert VDAT to a folder of CSVs?

filter

character, defaults to NULL and is currently ignored with a warning. When implemented, filtering via vdat.exe will only be available for HR3 receivers.


Convert VDAT file to CSV

Description

Convert VDAT file to CSV

Usage

vdat_to_csv(
  vdata_file,
  outdir = getwd(),
  time_corrected = FALSE,
  quiet = FALSE,
  folder = FALSE,
  filter = NULL
)

Arguments

vdata_file

path of VDAT file to convert to CSV.

outdir

output directory for the created CSV files. Defaults to the current working directory.

time_corrected

logical. Do you want to apply the default time correction?

quiet

logical, defaults to FALSE. Suppress messages?

folder

logical, defaults to FALSE. Convert VDAT to a folder of CSVs?

filter

character, defaults to NULL and is currently ignored with a warning. When implemented, filtering via vdat.exe will only be available for HR3 receivers.


Convert a VDAT file to a folder of CSVs by data type

Description

A wrapper around vdat_to_csv that just changes folder = FALSE to folder = TRUE.

Usage

vdat_to_folder(...)

Arguments

...

arguments passed to vdat_to.

Examples


Convert VDAT file to JSON

Description

Convert VDAT file to JSON

Usage

vdat_to_json(
  vdata_file,
  outdir = getwd(),
  time_corrected = FALSE,
  quiet = FALSE,
  filter = NULL
)

Arguments

vdata_file

path of VDAT file to convert to JSON

outdir

output directory for the created JSON. Defaults to the current working directory.

time_corrected

logical. Do you want to apply the default time correction?

quiet

logical, defaults to FALSE. Suppress messages?

filter

character, defaults to NULL and is currently ignored with a warning. When implemented, filtering via vdat.exe will only be available for HR3 receivers.


Report the version of VDAT identified in vdat_here.

Description

Report the version of VDAT identified in vdat_here.

Usage

vdat_version(...)

Arguments

...

arguments passed to vdat_call.

Examples

vdat_version()