Giter VIP home page Giter VIP logo

emerger's Introduction

edat/edat2 txt parser

AW's version with main functions called edatR() and eMergeR():

This is an adjusted version of the edat 2 txt parser created by Ahebrank (original readme text below).

The main changes are the addition of an emerger() function to read/parse/merge multiple .txt. files at once, and a replaced text file read and parse routine in edat() renamed edatR() ) so that .txt files containing symbols and trials nested several levels deep can be parsed too.

#Ahebranks' original edat() readme: This is a package for reading in E-Prime data files (well, the txt recovery files generated by E-Prime scripts during an experiment). It's for those needing to analyze large batches of edats, don't have access to PST's data utility E-DataAid, or don't have Windows. As far as I know, PST does not make the format of the binary .edat/.edat2 files publicly available, so this is all just guesswork.

Inspiration for this utility and credit for early versions of the code go to canlab's MATLAB implementation, developed in 2010 by Joe Wielgosz.

Use at your own risk! I have a limited number of test cases, most of which were produced by the same E-Prime programmer (me!). Please use the issue tracker to report bugs or submit test cases.

Getting Started

The easiest way is to use devtools' install_github function.

One-time install

> install.packages('devtools')
> devtools::install_github('AWKruijt/eMergeR')

Using the merger and single file parser:

library('emerger')

#parse and merge all .txt files in current working directory:
df <- emerger()
df <- as.data.frame(df)

#parse and merge merge all .txt files in the folder 'deeptest' that sits within the current wd:
df <- eMergeR(dir = "deeptest") 
df <- as.data.frame(df)

#parse and merge merge all .txt files for which filename includes "sumbol" that sit in the folder 'deeptest' within the current wd:
df <- eMergeR(filenameContains = "symbol", dir = "deeptest")
df <- as.data.frame(df)


# parse single file:
e <- edatR('Flanker-1001-1.txt')
dat <- as.data.frame(e)

dim(dat)
head(dat)

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.