zTreeSbj {zTree} | R Documentation |
Read '.sbj' files generated by 'z-Tree' into R
Description
Read '.sbj' files which are written by the Microsoft Windows program 'z-Tree'. The latter is a software for developing and carrying out economic experiments (see <http://www.ztree.uzh.ch/> for more information).
Usage
zTreeSbj(files, sep = "\t", zTree.silent=getOption("zTree.silent"),
zTree.encoding=getOption("zTree.encoding"),ignore.errors=FALSE)
Arguments
files |
A vector of 'z-Tree' .sbj filenames |
sep |
'z-Tree' uses "\t" as a separator. If you have a manipulated file, you might need to change the separator. |
zTree.silent |
If |
zTree.encoding |
zTree writes text files and seems to use latin1 (windows-1252) encoding for these files. |
ignore.errors |
Usually, |
Value
A data frame with one entry for each subject.
Author(s)
Oliver Kirchkamp
References
Urs Fischbacher. "z-Tree: Zurich Toolbox for Ready-made Economic Experiments." Experimental Economics (2) 171-178, 2007.
See Also
See also zTreeTables
Examples
## Not run:
files <- list.files(pattern = "*.sbj$",recursive=TRUE)
fname <- sub(".*/","",files)
sbj <- zTreeSbj(aggregate(files,list(fname),function(x) x[1])$x)
## End(Not run)