write_gslib: Export a Data Frame to Simplified GeoEase Format Used by...

Description Usage Arguments Details Value Examples

Description

write_gslib writes a data frame to the GeoEase format used by GSLIB programes. GeoEase has a standard header with a title and number and names of the columns. The title can be supplied or is built automatically from meta- data in the data frame or the name of the data frame object. Only numeric columns are written to the system file and they are rounded.

Usage

1
2
write_gslib(data, path, round = 4, title = NULL, griddim = NULL,
  gridxyz = NULL, gridrealz = NULL)

Arguments

data

Data frame to write to disk, only numeric columns are exported.

path

Path or connection to write to.

round

Integer scalar, number of digits to round data before export.

title

Character title to be appended to GeoEase file. If not supplied it will be determined from data meta-data or it's name.

griddim

Numeric vector of xyz grid dimensions. Length 2 for 2D.

gridxyz

Character vector of grid xyz coordinate columns.

gridrealz

Scalar integer number of realizations if grid file.

Details

If grid argument griddim is given a grid definition will be written to the output GeoEase file. If there is more than 1 realization in the grid data the the input data frame (data) must be sorted by realization and must have the same number of records for each realization.

Value

write_gslib returns the input data invisibly. The function side-effect is a GeoEase-format system file.

Examples

1
2
3
samples_na <- samples_2d
samples_na[3:7, 5] <- NA
write_gslib(samples_na, "samples-na.dat", round = 3, title = "sample data")

truemoid/rgslib documentation built on May 30, 2019, 2:14 p.m.