batch.ifile: Batch Read Winsteps Item Files (ifile) Into R

Description Usage Arguments Value

View source: R/batchIfile.r

Description

This function looks at a directory, identifies all the ifiles in the directory based on a common string pattern, and returns a list with all item files (i.e., each element of the list represents a different pfile). Alternatively, a list of file names to be imported can be supplied. For more information on Winsteps item files, see http://www.winsteps.com/winman/ifile.htm.

Usage

1
2
3
4
5
6
7
batch.ifile(dir = getwd(), pat = "Ifile", files = NULL, varWidths = c(1,
  5, 8, 3, 8, 9, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 8, 2, 2, 2, 100),
  iFileNames = c("Dropped", "Entry", "Difficulty", "Status", "Count",
  "RawScore", "SE", "Infit", "Infit_Z", "Outfit", "Outfit_Z", "Displacement",
  "PointMeasureCorr", "Weight", "ObservMatch", "ExpectMatch",
  "PointMeasureExpected", "RMSR", "WMLE", "Group", "Model", "Recoding",
  "ItemID"))

Arguments

dir

The directory where the item files are saved.

pat

A common character string in all item files. Only used if files = NULL, Defaults to "Ifile", which is what is automatically generated when link{r2Winsteps} is called.

files

Optional character vector of the names of the item files to be read into R. Note that only the names of the files (not the extension) are neccessary. The function assumes .txt files.

varWidths

Width of the item file columns. If you are using the current version of Winsteps, and have not requested any additional columns be represented in the item file, these shouldn't need to be changed. Older versions of Winsteps (e.g., 3.6.8) may need the following widths c(1, 5, 8, 3, 8, 9, 7, 7, 7, 7, 7, 8, 7, 7, 6, 6, 7, 2, 2, 100). Note that the first width of 1 is included to parse comments from item files (e.g., extreme scores). This column is dropped because it is redundant and also represented in the status column.

iFileNames

The column names for the item files being read in. Note that the length(iFileNames) must equal length(varWidths). iFileNames can be changed for personal preference and to accomodate older versions of Winsteps. For example, version 3.6.8 names might be c("Dropped", "Entry", "Difficulty", "Status", "Count", "RawScore", "SE", "Infit", "Infit_Z", "Outfit", "Outfit_Z", "Displacement", "PointMeasureCorr", "Weight", "ObservMatch", "ExpectMatch", "PostHocDiscrim", "Group", "Model", "ItemID").

Value

List of Winsteps ifiles, where each element of the list represents a different ifile.


DJAnderson07/r2Winsteps documentation built on Sept. 12, 2019, 1:06 a.m.