Giter VIP home page Giter VIP logo

inquisit_combine's Introduction

Inquisit Combine Package (v.0.1.1)

This is a tiny R package to assist with combining output data from the Millisecond Inquisit Lab software.

Installation

This package is built on R-4.2.1. I have not tested it on other versions, but in its current state it should be compatible with any R version that is compatible with dependencies.

This package is not on CRAN. As such, you will need the devtools package to install via the GitHub repository. Complete installation can be done via the following commands.

install.packages('devtools')
library(devtools)
install_github('jackmanners/inquisit_combine')

Usage

The package currently has one function (inquisit.combine) which accepts a directory path and optional filter string. This will then (recursively) find all inquisit output files (*.iqdat) in the directory, sort them into summary and raw files, (optionally) filter out unwanted files, and then combine them into a list of two dataframes.

See below for basic usage.

library(inquisit.combine)

path <- r"(C:\Users\Public\Documents\DATA)"
data <- inquisit.combine(path)

data$sumary # This is the summary-data dataframe
data$raw # This is the raw-data dataframe

Arguments

  • rootpath (REQUIRED, Type: [STR])
    The directory path for the folder contining all files. This can be relative or literal, and in any R-parseable path format (see below for variants).
path <- r"(C:\Users\Public\Documents\DATA)" # Absolute path
path <- "C:\\Users\\Public\\Documents\\DATA" # Absolute path
path <- "C:/Users/Public/Documents/DATA" # Absolute path

path <- "/DATA" # Relative path

# THIS IS THE DEFAULT WHEN COPY-PASTING FROM WINDOWS EXPLORER
# THIS WON'T WORK! SEE TOP SUGGESTION, ABOVE, INSTEAD.
# path <- "C:\Users\Public\Documents\DATA" 

  • record_filepath (Default: FALSE, Type: [BOOLEAN])
    If TRUE, this will add an additional filepath column to each dataframe with the entire filepath of each file. This may be useful in cases where the folder is used to identify the data.
data <- inquisit.combine(path, record_filepath=TRUE)

  • filter (Default: NULL, Type: [STR, LIST(STR)])
    If a string or list of strings are included in this argument, the combine function will filter out any files containing this sub-string. Useful if needing to exclude practise data or exclude a participant by ID.
full_data <- inquisit.combine(path)

data_no_practise <- inquisit.combine(path, filter='practise')

excluded_pxs <- list("PX001", "PX002", "PX003") # Can also be a c() list
data_no_excluded_pxs <- inquisit.combine(path, filter=excluded_pxs)

inquisit_combine's People

Contributors

jackmanners avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.