buildContents {Dasst}R Documentation

Build contents for an object of class Dasst.

Description

buildContents generates contents that are inserted into an object of class Dasst.

Usage

  buildContents(fileName, section, headerLine, dataLine,
    table)

Arguments

fileName

A character string. The file name and path corresponding to the generated contents.

section

A character string. The section title corresponding to the generated contents.

headerLine

A character string. The header names for the table of data included in the generated contents.

dataLine

A character string. A typically formatted line of data.

table

A data.frame. The records for the table of data included in the generated contents are inserted as a data.frame

Details

This function builds the contents that are inserted into an object of class Dasst from a data.frame and ancillary character strings.

The data.frame contains the actual data that is stored as a table within the object of class Dasst.

Value

An object of class Dasst.

Examples

mydf <- data.frame(a=c(1,2,3), b=c("one","two","three"),c=c(1.1,2.2,3.3))
myObj <- Dasst()
myObj[1] <- buildContents("MyTest.OUT","*TestSec",
 "@ID  NAME VALUE","  1   one 1.100", mydf)

[Package Dasst version 0.3.4 Index]