FreelistTable: FreeListTable

FreeListTableR Documentation

FreeListTable

Description

Given a Free list data frame (with columns for subject number, order of responses and response code), produce a table comparing each subjects responses to each code. This table can be a simple "presence/absence" table for determining if a subject mentioned a particular code, or something more complex. colSums can be applied in order to get summaries (as opposed to person by person breakdown).

Usage

FreeListTable(mydata, CODE = "CODE", Salience = "Salience", Subj = "Subj", tableType = "DEFAULT")

Arguments

mydata

This is your free-list data, stored as a data frame.

CODE

The name of the column in which your "CODE" (eg, the subjects' individual responses) is stored.

Order

The name of the column in which your "Order" (eg, the rank of a subjects' responses) is stored. Feel free to leave this blank if you are not interested in Order..

Salience

The name of the column in which each responses Salience is stored. If you wish to ask questions of salience, it is important you calculate salience before using this function. (using CalculateSalience).

Subj

The name of the column where your subjects names/subject numbers are stored.

tableType

Currently there are five types of tables: PRESENCE, SUM_SALIENCE, MAX_SALIENCE,HIGHEST_RANK and FREQUENCY. PRESENCE will give a "1" if the specified code is present, or "0" otherwise. If you specify FREQUENCY, then you will get a count of how often each code was mentioned by each person. SUM_SALIENCE and MAX_SALIENCE give (respectively) the total salience an individual has assigned to a particular code, and the highest salience value associated with that code. HIGHEST_RANK gives the lowest number in the order column.

GROUPING

The name of the column where your subjects group names are sorted. Helps distinguish between individuals from different groups with the same ID number.

Value

The value returned is a data frame, where each row represents a subject, and each column (bar the first one or two) represents one of your free-list Codes. Depending on "tableType" the entries of the dataframe will either represent different things.

Author(s)

Alastair Jamieson Lane. <aja107@math.ubc.ca>

Benjamin Grant Purzycki. <bgpurzycki@alumni.ubc.ca>

Examples

fakeData<- GenerateFakeFreeListData() 
table<- FreeListTable(fakeData, tableType="PRESENCE")
View(table)
colSums(table) ##This will give summarised results.
data(WorldList)
FreeListTable(WorldList, tableType="FREQUENCY")
FreeListTable(WorldList, tableType="FREQUENCY",GROUPING="GROUPING")
WorldList<-CalculateSalience(WorldList,GROUPING="GROUPING")
FreeListTable(WorldList, tableType="SUM_SALIENCE",GROUPING="GROUPING")


alastair-JL/AnthroTools documentation built on March 7, 2024, 11:59 p.m.