writeDictionary: Write Dictionary From Data.Frame To File

Description Usage Arguments Value Examples

Description

This function writes a text file based on an existing data.frame with "key" and "val" columns inside it.

Usage

1
writeDictionary(mydic, exec = FALSE, outfilename = "")

Arguments

mydic

A data.frame containg "key" and "val" columns

exec

If set to TRUE, the function will write to file at outfilename.

outfilename

The name and path of the file you want to write, e.g., "./test.gram"

Value

This function will always return its output, regardless of whether or not exec is set to TRUE.

Examples

1
2
testdic <- data.frame(key=c("key1", "key2"), val=c("a", "b"), stringsAsFactors=F)
writeDictionary(testdic)

ecology-rocks/grammaR documentation built on May 15, 2019, 7:58 p.m.