Learn R Programming

GGUM (version 0.5)

export.GGUM2004: Exports data in 'GGUM2004' friendly format

Description

export.GGUM2004 exports the data from R to a text file according to the format required by 'GGUM2004'

Usage

export.GGUM2004(data, data.file = "data", data.dir = tempdir())

Arguments

data

The R data matrix to be exported.

data.file

A character string defining the name of the data file. No file extension is required.

data.dir

A character string defining the path to the directory where the data file (possibly exported by function export.GGUM2004) is stored. By default a temporary directory is used, but the user can naturally specify a directory of her choice.

Author

Jorge N. Tendeiro, tendeiro@hiroshima-u.ac.jp

Details

This function exports the R matrix data in 'GGUM2004' (Roberts, Donoghue, & Laughlin, 2000; Roberts et al., 2006) friendly format. This data file is to be used together with a 'GGUM2004' command script (or using the GUI itself, of course). 'GGUM2004' may be executed directly or may be called from R, see run.GGUM2004.

By experience, we noticed that long directory paths (especially if spaces are included) make 'GGUM2004' fail to execute with error file not found. Therefore, a good advice is to choose data.dir wisely (short paths, no spaces).

Observe that this function is optimized for the Windows operating system because 'GGUM2004' is a Windows program.

References

Robertsetal2000GGUM

Robertsetal2006GGUM

Examples

Run this code
# Generate data:
C   <- c(3, 3, 3, 5, 5, 5)
I   <- 6
gen <- GenData.GGUM(750, I, C, seed = 125)
# Export data to 'GGUM2004':
export.GGUM2004(gen$data)

Run the code above in your browser using DataLab