ReadSortFile: Read a file of free sorting data

Description Usage Arguments Value Examples

View source: R/ReadSortFile.R

Description

The function (ReadSortFile()) reads a csv file of free sorting data.

The file contains stimuli as rows and subjects as columns. For a subject, two stimuli in the same group are coded by the same symbol. First row contains the labels of subjects and first column contains the labels of stimuli.

For each subject, the coding of a group may be a number or a list of terms describing the group (terms have to be separated by a symbol, as a comma).

Returns a matrix of sorting and, if this is adequate, matrices describing the use of terms by subjects.

Usage

1
ReadSortFile(filename, terms=FALSE, septerms=",", sep=";", dec=".")

Arguments

filename

File name (and address if necessary)

terms

Boolean indicating if groups are coded by terms (terms=TRUE) or numbers (default terms=FALSE)

septerms

Symbol for separating terms (default is septerms=",") if terms=TRUE

sep

Symbol for separating data in the csv file (default is sep=";")

dec

Decimal separator (default is dec=".")

Value

List of the following components :

MatSort

Matrix of sorting groups (may be used by the function SortingPartition)

MatTerms

Matrix of occurences of the terms used by the subjects

Stress

List of terms used by each subject

Examples

1
2
  # dat<-ReadSortFile ("FSdata.csv")
  # Sort<-SortingPartition(dat$MatSort)

Example output

Loading required package: smacof
Loading required package: plotrix

Attaching package: 'smacof'

The following object is masked from 'package:base':

    transform

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Loading required package: ellipse

Attaching package: 'ellipse'

The following object is masked from 'package:graphics':

    pairs

FreeSortR documentation built on May 2, 2019, 2:47 p.m.