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

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Save grid in a text file (txt).

Usage

1

Arguments

x

repgrid object.

file

Filename to save the grid to. The name should have the suffix .txt. If the function is called without specifying this argumnet a dialog box is opened.

Details

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). The funtion will open an interactive dialog box to let the user enter a filename if no file argument is supplied in the function call.

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 ----------------

Author(s)

Mark Heckmann

See Also

importTxt

Examples

1
2
3
4
5
6
7
## Not run: 

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


## End(Not run)

OpenRepGrid documentation built on May 2, 2019, 4:54 p.m.