importGraspableJson: importGraspableJson

Description Usage Arguments Value Examples

View source: R/dataLoading.R

Description

This simple script just loads a json data file, merges the trial data and events, and renames a few columns It also twiddles things down to a single version of GM, and a single context ("experiment"). It does this only if you set 'compress' to true, but that seems like the vastly most useful format by default.

Usage

1
2
importGraspableJson(filename, version = F, limitExperiment = F,
  compress = T, debug = F)

Arguments

version

If any non-false value, data will be limited to versions of gm matching this string

limitExperiment

If not false, limit to experiment contexts matching this value

compress

If set to true, execute logic to collapse each interaction into a single row, glossing diferences between touch, tap, release, etc events.

debug

If true, does a number of sanity checks, like looking at the number of unique old states when collapsing Comments

fileName

the name of a file locating a json project

Value

a tibble containing the data from the file, with the class "GM X", where X is the version specified (or the first version number to appear).

Examples

1
2
canvasSnippetFile <- system.file("extdata", "canvasSnippet.json", package = "GraspableDataAnalysis", mustWork = TRUE)
canvasSnippetData <- importGraspableJson(canvasSnippetFile, version = "2.5.12" )

dlandy/GraspableDataAnalysis documentation built on May 25, 2019, 4:23 p.m.