Save grid

The OpenRepGrid R package can currently save grids in two formats. Either as a .txt file or as an R data object.

.txt file
To save a grid as a .txt file use the function saveAsTxt. It 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 function will open an interactive dialog box to let the user enter a filename if no file argument is supplied in the function call. Let's suppose the grid is stored in the object x. x <- randomGrid               # generate a random grid saveAsTxt(x, "random.txt")      # save it to the file "random.txt"

saveAsTxt(x)                    # open a dialog box to enter the file name interactively

R data object
Another option is to save the grid as an R data object. This is done by using the function save. x <- randomGrid               # generate a random grid save(x, file="random.RData")    # save it to the file "random.RData"

In future versions of OpenRepGrid will also support the .xml format.