convert2snafu: Converts 'textcleaner' object to a SNAFU GUI format

View source: R/convert2snafu.R

convert2snafuR Documentation

Converts textcleaner object to a SNAFU GUI format

Description

Converts textcleaner object to a SNAFU GUI format (only works for fluency data)

Usage

convert2snafu(..., category, path, reader = readline)

Arguments

...

Matrix or data frame. A clean response matrices

category

Character. Category of verbal fluency data

path

Character. Directory to save the SNAFU-formatted .csv file to

reader

Function. The input reader used to prompt for the output file name. Defaults to readline. Exposed so this can be driven programmatically (e.g. in automated tests) instead of real console input

Details

The format of the file has 7 columns:

  • id — Defaults to the row names of the inputted data

  • listnum — The list number for the fluency category. Defaults to 0. Future implementations will allow more lists

  • category — The verbal fluency category that is input into the category argument

  • item — The verbal fluency responses for every participant

  • RT — Response time. Currently not implemented. Defaults to 0

  • RTstart — Start of response time. Currently not implemented. Defaults to 0

  • group — Names of groups. Defaults to the names of the objects input into the function (...)

Value

A .csv file formatted for SNAFU

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

References

# For SNAFU, see: Zemla, J. C., Cao, K., Mueller, K. D., & Austerweil, J. L. (2020). SNAFU: The Semantic Network and Fluency Utility. Behavior Research Methods, 1-19. https://doi.org/10.3758/s13428-019-01343-w

Examples

# Convert data to SNAFU (\code{reader} supplies the file name)
convert2snafu(
  open.clean[1:5, ], category = "animals", path = tempdir(),
  reader = function(prompt = "") "snafu_example"
)

if(interactive())
{
  # Asks for the file name
  convert2snafu(open.clean, category = "animals", path = tempdir())
}


SemNetCleaner documentation built on Oct. 16, 2026, 5:07 p.m.