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

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

View source: R/export.r

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

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.

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()
 saveAsTxt(x, "random.txt")


## End(Not run)

markheckmann/OpenRepGrid documentation built on April 30, 2021, 2:33 a.m.