WriteGeoClass: Write a 'GeoClass.txt' file

View source: R/functioncollection_export.R

WriteGeoClassR Documentation

Write a 'GeoClass.txt' file

Description

This is a convenience wrapper function to export a 'GeoClass.txt' file from R.

Usage

WriteGeoClass(x, filename, use.comment = FALSE)

Arguments

x

The object to be written, a dataframe, as an object returned from ReadGeoClass.

filename

A character string naming a file to write to. Windows users: Note that Paths are separated by '/', not '\'.

use.comment

Logical, set to TRUE to export comment lines saved in attribute 'comment'. Per default, column names are exported as header. See details.

Details

WriteGeoClass exports a GeoClass dataframe. HYPE accepts comment rows with a leading '!' in the beginning rows of a GeoClass file. Comment rows typically contain some class descriptions in a non-structured way. With argument use.comment = TRUE, the export function looks for those in attribute 'comment', where ReadGeoClass stores such comments. Description files (see ReadDescription) offer a more structured way of storing that information.

Value

No return value, called for export to text files.

Examples

te <- ReadGeoClass(filename = system.file("demo_model", "GeoClass.txt", package = "HYPEtools"))
WriteGeoClass(x = te, filename = tempfile())


HYPEtools documentation built on Sept. 11, 2024, 8:34 p.m.