saveAsTxt: Save grid in a text file (txt).

View source: R/export.r

saveAsTxtR Documentation

Save grid in a text file (txt).

Description

saveAsTxt will save the grid as a .txt file in format used by OpenRepGrid. This file format can also easily be edited by hand (see importTxt for a description).

Usage

saveAsTxt(x, file = NA)

Arguments

x

repgrid object.

file

Filename to save the grid to. The name should have the suffix .txt.

Value

Invisibly returns the name of the file.

Note

Structure of a txt file that can be read by importTxt.

---------------- .txt file -----------------

anything not contained within the tags will be discarded

ELEMENTS
element 1
element 2
element 3
END ELEMENTS
CONSTRUCTS
left pole 1 : right pole 1
left pole 2 : right pole 2
left pole 3 : right pole 3
left pole 4 : right pole 4
END CONSTRUCTS
RATINGS
1 3 2
4 1 1
1 4 4
3 1 1
END RATINGS
RANGE
1 4
END RANGE

---------------- end of file ----------------

See Also

importTxt

Examples

## Not run: 

 x <- randomGrid()
 saveAsTxt(x, "random.txt")


## End(Not run)


OpenRepGrid documentation built on May 31, 2023, 5:33 p.m.