diff --git a/.Rbuildignore b/.Rbuildignore index 07905fa..4dfecd3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,5 @@ ^revdep$ ^_pkgdown\.yml$ ^docs$ +^\.github$ +^pkgdown$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..d46a617 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check.yaml + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..4bbce75 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,50 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index d5d5fa2..8e4bfb2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ private/ .Rproj.user .Rhistory +docs diff --git a/DESCRIPTION b/DESCRIPTION index 28e4559..caa82c9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,13 +10,14 @@ Authors@R: c( Description: Provides function to read data from the 'Igor Pro' data analysis program by Wavemetrics. The data formats supported are 'Igor' packed experiment format (pxp) and 'Igor' binary wave (ibw). See: - https://www.wavemetrics.com/ for details. Also includes functions to load + for details. Also includes functions to load special pxp files produced by the 'Igor Pro' 'Neuromatic' and 'Nclamp' packages for recording and analysing neuronal data. See - https://github.com/SilverLabUCL/NeuroMatic for details. + for details. Imports: bitops, - tools + tools, + timechange Suggests: spelling, testthat @@ -25,3 +26,5 @@ LazyLoad: yes RoxygenNote: 7.3.2 Language: en-GB Encoding: UTF-8 +URL: https://github.com/jefferis/IgorR, https://jefferis.github.io/IgorR/ +BugReports: https://github.com/jefferis/IgorR/issues diff --git a/R/ReadIgorBinary.R b/R/ReadIgorBinary.R index 7350e3d..7293358 100644 --- a/R/ReadIgorBinary.R +++ b/R/ReadIgorBinary.R @@ -338,12 +338,16 @@ read.pxp<-function(pxpfile,regex,ReturnTimeSeries=FALSE,Verbose=FALSE, i } -igor_date_origin<-as.numeric(ISOdate(1904,1,1,hour=0,tz="")) - -.convertIgorDate<-function(dateval){ - dateval=dateval+igor_date_origin - class(dateval)<-"POSIXct" - dateval +# internal function to convert Igor dates +# these are expressed in seconds since 1904-01-01 in the local timezone +# note that we provide a tz argument to ensure that tests give the same +# results regardless of the local timezone of the test machine +.convertIgorDate<-function(dateval, tz=""){ + igor_origin=ISOdatetime(1904,1,1,hour=0,min = 0, sec=0, tz=tz) + # this takes care of tz offset differences between the actual date and the origin + # e.g. because date is during daylight savings (but origin was not) + res=timechange::time_add(igor_origin, second = dateval) + res } # enum PackedFileRecordType { @@ -402,24 +406,30 @@ NULL x } +# private function to read a null terminated string +.read_nt_string <- function(con, strlen) { + rawchars=readBin(con, what=raw(), n = strlen) + readBin(rawchars, what = 'character', n = 1) +} + .ReadPackedFile<-function(con, recordSize, encoding, Verbose){ # discard first header part numBytes = 32 - readChar(con, numBytes) + res=readBin(con, what=raw(), n = numBytes) recordSize = recordSize - numBytes # read the filename file = list() - file$name = readChar(con, numBytes) + file$name = .read_nt_string(con, numBytes) recordSize = recordSize - numBytes # discard last header part numBytes = 90 - readChar(con, numBytes) + readBin(con, what = raw(), n = numBytes) recordSize = recordSize - numBytes - file$data = .readCharsWithEnc(con, recordSize, encoding) + file$data = suppressWarnings(.readCharsWithEnc(con, recordSize, encoding)) if(nchar(file$data) <= 1) { # assume it is a formatted notebook with custom binary header @@ -763,21 +773,18 @@ if(R.version$major>2) { attr(WaveData,"Note")=.readCharsWithEnc(con,BinHeader5$noteSize,encoding) } - if(BinHeader5$dataEUnitsSize>0) { - attr(WaveData,"dataUnits")=.readNullTermString(con,BinHeader5$dataEUnitsSize,encoding) - } + # ignore dataEUnitsSize + if(BinHeader5$dataEUnitsSize>0) + readBin(con,what=raw(), n = BinHeader5$dataEUnitsSize) + + if(any(BinHeader5$dimEUnitsSize>0)) + readBin(con,what=raw(), n = sum(BinHeader5$dimEUnitsSize)) - if(any(BinHeader5$dimEUnitsSize>0)) { - x=.readCharsWithEnc(con,BinHeader5$dimEUnitsSize,encoding) - attr(WaveData,"dimUnits")[BinHeader5$dimEUnitsSize>0]=x[BinHeader5$dimEUnitsSize>0] - } # Trim units down to active dimensions attr(WaveData,"dimUnits")=attr(WaveData,"dimUnits")[WaveHeader5$nDim>0] - if(any(BinHeader5$dimLabelsSize>0)) { - x=.readCharsWithEnc(con,BinHeader5$dimLabelsSize,encoding) - attr(WaveData,"dimLabels")=x[WaveHeader5$nDim>0] - } + if(any(BinHeader5$dimLabelsSize>0)) + readBin(con,what=raw(), n = sum(BinHeader5$dimLabelsSize)) # Finish up # Re-dimension diff --git a/README.md b/README.md index 03c5632..5d15e9b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # IgorR + [![DOI](https://img.shields.io/badge/doi-10.5281%2Fzenodo.10230-blue.svg)](http://dx.doi.org/10.5281/zenodo.10230) [![Release Version](https://img.shields.io/github/release/jefferis/IgorR.svg)](https://github.com/jefferis/IgorR/releases/latest) -[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/IgorR)](https://cran.r-project.org/package=IgorR) -[![Build Status](https://travis-ci.org/jefferis/IgorR.svg?branch=master)](https://travis-ci.org/jefferis/IgorR) +[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/IgorR)](https://cran.r-project.org/package=IgorR) +[![R-CMD-check](https://github.com/jefferis/IgorR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jefferis/IgorR/actions/workflows/R-CMD-check.yaml) + + Introduction ============ diff --git a/_pkgdown.yml b/_pkgdown.yml index 807cc1a..fdb09cf 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,3 +1,6 @@ +url: https://jefferis.github.io/IgorR/ +template: + bootstrap: 5 reference: - title: Package Help contents: diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 29f3dbe..0000000 --- a/docs/404.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - -Page not found (404) • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index e94ea29..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - -Authors • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Gregory Jefferis. Author, maintainer. -

    -
  • -
  • -

    Thomas Braun. Contributor. -

    -
  • -
- -
- -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 09c2fb3..0000000 --- a/docs/index.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -Read Binary Files Saved by Igor Pro (Including Neuromatic Data) • IgorR - - - - - - - - - - -
    -
    - - - - -
    -
    - -
    - - -
    -
    -

    -Introduction

    -

    The IgorR package for R provides routines to read binary files generated by Igor Pro.

    -

    This includes both the standalone .ibw Igor Binary Wave format (v2 and the latest v5) and the .pxp Packed Experiment Format including both waves and variables. In addition the package provides functions to read files generated by the Neuromatic analysis suite written by Jason Rothman for Igor Pro.

    -
    -
    -

    -Installation

    -
    -

    -Standard Install

    -

    Install the release version from CRAN

    - -
    -
    -

    -Github Install

    -

    To install the latest development version from github

    -
    # install hadley's devtools if required
    -if(!require('devtools')) install.packages('devtools')
    -devtools::install_github('jefferis/IgorR')
    -
    -
    -

    -Development Install

    -

    To checkout a version that can be used for development (RStudio is strongly recommended), in your terminal application.

    -
    cd /some/suitable/dir
    -git clone https://github.com/jefferis/IgorR.git
    -

    In R

    -
    install.packages('devtools') # install hadley's devtools
    -library(devtools)
    -load_all('/some/suitable/dir/IgorR')
    -test()
    -
    -#hack
    -load_all()
    -
    -# ready for release
    -check()
    -build_win() # test for Windows
    -release()
    -
    -
    -
    -

    -Details

    -

    Details of the ibw file format were derived from the Igor Technical Note 003.

    -

    For those interested in the source code, ReadIgorBinary.R provides code for standard pxp and ibw files, while ReadNclamp.R provides routines to read packed experiment files generated by the Nclamp data acquisition package.

    -
    - -
    - - -
    - - -
    - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index c01e592..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,367 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top;} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 7e7048f..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 457ae85..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,6 +0,0 @@ -pandoc: 2.7.3 -pkgdown: 1.5.1 -pkgdown_sha: ~ -articles: [] -last_built: 2020-06-12T08:43Z - diff --git a/docs/reference/IgorR-package.html b/docs/reference/IgorR-package.html deleted file mode 100644 index 89386bd..0000000 --- a/docs/reference/IgorR-package.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - -Read binary files saved by Igor Pro (including Neuromatic data) — IgorR-package • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This package provides function to read data from the Igor Pro data analysis -program by Wavemetrics. The data formats supported are Igor packed experiment -format (.pxp) and Igor binary wave (.ibw). See: -http://www.wavemetrics.com/ for details.

    -
    - - - -

    Details

    - -

    It also includes some functions to load special pxp files produced by the -Neuromatic/Nclamp packages for recording and analysing neuronal #data. See -http://www.neuromatic.thinkrandom.com/ for details.

    -

    Key functions in the package include read.ibw, -read.pxp.

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/IgorR-private.html b/docs/reference/IgorR-private.html deleted file mode 100644 index 9f272da..0000000 --- a/docs/reference/IgorR-private.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - -Private functions in IgorR Package — IgorR-private • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Private functions in IgorR Package

    -

    Read the a short record header from the current location in a PXP file

    -

    Note that the recordType will be one of the constants from Igor's -enum PackedFileRecordType

    -
    - -
    .ReadPackedHeader(con, endian)
    - -

    Arguments

    - - - - - - - - - - -
    con

    an R connection to the file we are reading

    endian

    either little or big

    - -

    Value

    - -

    a list containing information about the current record

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/ReadAllNclampLogTables.html b/docs/reference/ReadAllNclampLogTables.html deleted file mode 100644 index ec86ec3..0000000 --- a/docs/reference/ReadAllNclampLogTables.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - -Read all Nclamp log tables from a directory into a list — ReadAllNclampLogTables • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Read all Nclamp log tables from a directory into a list

    -
    - -
    ReadAllNclampLogTables(logfiledir, pattern = "_log[0-9]+[.]pxp$", ...)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    logfiledir

    path to directory containing log files (pxp files).

    pattern

    optional regular expression -- see list.files.

    ...

    additional parameters for ReadNclampLogTable.

    - -

    Value

    - -

    A named list containing one dataframe for each parsed log file.

    - -

    Examples

    -
    if (FALSE) { -logfiles <- ReadAllNclampLogTables("/GD/projects/PhysiologyData/logs") -str(logfiles) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/ReadNclampLogTable.html b/docs/reference/ReadNclampLogTable.html deleted file mode 100644 index dd46f03..0000000 --- a/docs/reference/ReadNclampLogTable.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - -Read the log table produced by Nclamp acquisition software for Igor — ReadNclampLogTable • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    log tables are special Igor .pxp files that contain only variables. -Each entry corresponds to a single run of an Nclamp protocol, -storing information like protocol name, run time etc.

    -
    - -
    ReadNclampLogTable(f, Verbose = FALSE)
    - -

    Arguments

    - - - - - - - - - - -
    f

    path to the log file.

    Verbose

    whether to print status information while reading the file.

    - -

    Value

    - -

    A dataframe containing a row for each acquisition protocol run.

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/SummariseSweepFile.html b/docs/reference/SummariseSweepFile.html deleted file mode 100644 index 98b8181..0000000 --- a/docs/reference/SummariseSweepFile.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - -Extract summary information from an Nclamp/Igor Sweep File — SummariseSweepFile • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    e.g. for import into Physiology database

    -
    - -
    SummariseSweepFile(f, Verbose = FALSE)
    - -

    Arguments

    - - - - - - - - - - -
    f

    path to an Nclamp/Igor PXP format sweep file.

    Verbose

    if TRUE, print details while parsing underlying PXP -file.

    - -

    Value

    - -

    A list of about 25 fields summarising the sweep file.

    - -

    Examples

    -
    l <- SummariseSweepFile(system.file("igor", "WedJul407c2_001.pxp", package="IgorR")) -cat("There are", l$NumWaves, "waves in the file each of total duration", l$StimWaveLength, - "ms and sample duration", l$StimSampleInterval, "ms \n")
    #> There are 100 waves in the file each of total duration 20 ms and sample duration 0.025 ms
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/SweepFilesToDataFrame.html b/docs/reference/SweepFilesToDataFrame.html deleted file mode 100644 index 1fb8737..0000000 --- a/docs/reference/SweepFilesToDataFrame.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - -Summarise multiple sweep files into a single dataframe — SweepFilesToDataFrame • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Note that this is still a little fragile if the lists produced by -SummariseSweepFile do not have consistent field names.

    -
    - -
    SweepFilesToDataFrame(ff)
    - -

    Arguments

    - - - - - - -
    ff

    paths to a set of sweep files.

    - -

    Value

    - -

    A dataframe with rows for each sweep file.

    -

    See also

    - -

    SummariseSweepFile

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/UpdateSweepDataFrame.html b/docs/reference/UpdateSweepDataFrame.html deleted file mode 100644 index 5b4b7ca..0000000 --- a/docs/reference/UpdateSweepDataFrame.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - -Update the CSV file summarising the sweeps in an Nclamp data folder — UpdateSweepDataFrame • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Update the CSV file summarising the sweeps in an Nclamp data folder

    -
    - -
    UpdateSweepDataFrame(
    -  folder,
    -  outfile = NULL,
    -  action = c("update", "force"),
    -  DryRun = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    folder

    path to the folder.

    outfile

    path to outfile (default: /path/to/datafolder/datafolder.csv).

    action

    update newer (default) or force update (not yet implemented).

    DryRun

    if TRUE, report which files would be processed, but do -nothing.

    - -

    Value

    - -

    TRUE if something happened, FALSE otherwise.

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/WaveToTimeSeries.html b/docs/reference/WaveToTimeSeries.html deleted file mode 100644 index 3d5d3d2..0000000 --- a/docs/reference/WaveToTimeSeries.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - -Convert an Igor wave (wave list) loaded by read.ibw into an R time series — WaveToTimeSeries • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Where there are multiple waves, they are assumed to be of compatible lengths -so that they can be joined together by cbind.

    -
    - -
    WaveToTimeSeries(WaveData, ReturnOriginalDataOnError = TRUE)
    - -

    Arguments

    - - - - - - - - - - -
    WaveData,

    a wave or list of waves

    ReturnOriginalDataOnError

    If we can't make a time series, return -return original data (default TRUE)

    - -

    Value

    - -

    a time series or multi time series (ts, - mts)

    -

    See also

    - -

    Other igor-io: -read.ibw(), -read.pxp()

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 12179cc..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - -Function reference • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Package Help

    -

    -
    -

    IgorR-package

    -

    Read binary files saved by Igor Pro (including Neuromatic data)

    -

    .ReadPackedHeader()

    -

    Private functions in IgorR Package

    -

    Igor

    -

    Basic functions to read Igor Pro files

    -
    -

    read.ibw()

    -

    Read binary files in the Igor Binary Wave format (IBW)

    -

    read.pxp()

    -

    Reads an Igor Pro Packed Experiment (.pxp) file

    -

    WaveToTimeSeries()

    -

    Convert an Igor wave (wave list) loaded by read.ibw into an R time series

    -

    tsp.igorwave()

    -

    Return tsp attribute of Igor wave (start, end, frequency)

    -

    NClamp

    -

    Functions to handle NClamp data acquisition files

    -
    -

    SummariseSweepFile()

    -

    Extract summary information from an Nclamp/Igor Sweep File

    -

    SweepFilesToDataFrame()

    -

    Summarise multiple sweep files into a single dataframe

    -

    UpdateSweepDataFrame()

    -

    Update the CSV file summarising the sweeps in an Nclamp data folder

    -

    ReadNclampLogTable()

    -

    Read the log table produced by Nclamp acquisition software for Igor

    -

    ReadAllNclampLogTables()

    -

    Read all Nclamp log tables from a directory into a list

    -
    - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/read.ibw.html b/docs/reference/read.ibw.html deleted file mode 100644 index fd180b3..0000000 --- a/docs/reference/read.ibw.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - -Read binary files in the Igor Binary Wave format (IBW) — read.ibw • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Read binary files in the Igor Binary Wave format (IBW)

    -
    - -
    read.ibw(
    -  wavefile,
    -  Verbose = FALSE,
    -  ReturnTimeSeries = FALSE,
    -  MakeWave = FALSE,
    -  HeaderOnly = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    wavefile

    either a character vector containing the path to a file or an -R connection.

    Verbose

    if TRUE, print status information while reading the -file.

    ReturnTimeSeries

    if TRUE, return as an R time series (package -ts).

    MakeWave

    if TRUE, assign wave to a list in the global user -environment.

    HeaderOnly

    if TRUE, only return the header of the Igor Wave.

    - -

    Value

    - -

    A vector containing the wave data or, if MakeWave == TRUE, - returns the name of a new R vector containing the data which has been made - in the user environment

    -

    See also

    - -

    Other igor-io: -WaveToTimeSeries(), -read.pxp()

    - -

    Examples

    -
    # return a list containing the wave -wavedata=read.ibw(system.file("igor","version5.ibw",package="IgorR")) -sum(wavedata)
    #> [1] 15
    -# make a list containing the wave's data in the users's environment -wavename=read.ibw(system.file("igor","version5.ibw",package="IgorR"),MakeWave=TRUE) -sum(get(wavename))
    #> [1] 15
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/read.pxp.html b/docs/reference/read.pxp.html deleted file mode 100644 index 51c589e..0000000 --- a/docs/reference/read.pxp.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - -Reads an Igor Pro Packed Experiment (.pxp) file — read.pxp • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Note that PXP files are only partially documented so some contents cannot be -parsed (e.g. image data). This function currently reads data records (Igor -waves and variables), history, procedures, recreation macros and plain text -notebooks. Formatted notebooks cannot be read.

    -
    - -
    read.pxp(
    -  pxpfile,
    -  regex,
    -  ReturnTimeSeries = FALSE,
    -  Verbose = FALSE,
    -  StructureOnly = FALSE,
    -  ExtractText = FALSE,
    -  IgorPlatform = NULL,
    -  ...
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    pxpfile

    character vector naming a PXP file or an R connection.

    regex

    if TRUE, only read records (e.g. waves) in the PXP file -whose names match a regex.

    ReturnTimeSeries

    if TRUE, Igor waves are returned as a -link{ts} object with sensible x scaling (FALSE by default).

    Verbose

    whether to print information to console during loading -(numeric values are also allowed 0=none, 1=basic, 2=all).

    StructureOnly

    (TODO) if TRUE, only the structure of the PXP -file for inspection.

    ExtractText

    whether to extract procedures, recreation macros, history -and plain text notebooks (FALSE by default).

    IgorPlatform

    OS on which Igor file was saved (windows or macintosh).

    ...

    optional parameters passed to read.ibw.

    - -

    Value

    - -

    A list containing all the individual waves or variables in the PXP - file.

    -

    Details

    - -

    IgorPlatform will determine in which encoding text is read -(WINDOWS-1252 for windows and macintosh for macintosh). Unique abbreviations -are acceptable. Defaults to "windows" on Windows, "macintosh" -otherwise. Note that Igor Pro 5.5 added a PlatformRecord to the PXP file -format which is used to determine the file's platform of origin when -available. Since this is information straight from the horse's mouth it will -override the IgorPlatform argument.

    -

    See also

    - -

    Other igor-io: -WaveToTimeSeries(), -read.ibw()

    - -

    Examples

    -
    r=read.pxp(system.file("igor","testexpt.pxp",package="IgorR"))
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/tsp.igorwave.html b/docs/reference/tsp.igorwave.html deleted file mode 100644 index b71f3cf..0000000 --- a/docs/reference/tsp.igorwave.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - -Return tsp attribute of Igor wave (start, end, frequency) — tsp.igorwave • IgorR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Note that end = (npts-1) * deltat

    -
    - -
    tsp.igorwave(wave)
    - -

    Arguments

    - - - - - - -
    wave

    Igor wave loaded by read.ibw orread.pxp

    - -

    Value

    - -

    numeric vector with elements start, end, frequency

    -

    See also

    - - - -
    - -
    - - - -
    - - - - - - - - diff --git a/man/IgorR-package.Rd b/man/IgorR-package.Rd index 9b1d449..cc81b59 100644 --- a/man/IgorR-package.Rd +++ b/man/IgorR-package.Rd @@ -18,6 +18,15 @@ Neuromatic/Nclamp packages for recording and analysing neuronal #data. See Key functions in the package include \code{\link{read.ibw}}, \code{\link{read.pxp}}. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/jefferis/IgorR} + \item \url{https://jefferis.github.io/IgorR/} + \item Report bugs at \url{https://github.com/jefferis/IgorR/issues} +} + } \author{ \strong{Maintainer}: Gregory Jefferis \email{jefferis@gmail.com} (\href{https://orcid.org/0000-0002-0587-9355}{ORCID}) diff --git a/tests/testthat/test-ibw.R b/tests/testthat/test-ibw.R index ff342e4..ef5e11d 100644 --- a/tests/testthat/test-ibw.R +++ b/tests/testthat/test-ibw.R @@ -25,13 +25,25 @@ test_that("Read Igor v2 file", { }) test_that("Processing of dates", { - expect_equivalent(.convertIgorDate(3444214517),as.POSIXct("2013-02-20 14:15:17")) + # when in GMT timezone (Banjul, The Gambia) or BST Igor says + # print secs2Time(3444214517, 3) + # 14:15:17 + expect_equivalent(.convertIgorDate(3444214517, tz="GMT"),as.POSIXct("2013-02-20 14:15:17", tz = 'GMT')) + expect_equivalent(.convertIgorDate(3444214517, tz="Africa/Banjul"),as.POSIXct("2013-02-20 14:15:17", tz = 'Africa/Banjul')) + expect_equivalent(.convertIgorDate(3444214517, tz="Europe/London"),as.POSIXct("2013-02-20 14:15:17", tz = 'Europe/London')) # from nm20120811c1_016.pxp - # current implementation says 13:37 on my laptop, lmb cluster and mac in PDT + # old implementation said 13:37 on my laptop, lmb cluster and mac in PDT # but mtime of file and embedded time string is 12:37 # and this is also what I get on a sunos machine in PDT - # DISABLED due to OS dependent results that I cannot fix - # expect_equivalent(.convertIgorDate(3427533421),as.POSIXct("2012-08-11 13:37:01")) + expect_equivalent(.convertIgorDate(3427533421, tz = 'GMT'),as.POSIXct("2012-08-11 12:37:01", tz='GMT')) + expect_equivalent(.convertIgorDate(3427533421, tz = 'Europe/London'),as.POSIXct("2012-08-11 12:37:01", tz='Europe/London')) + + # when in GMT timezone or BST Igor says + # print secs2Time(3805612788, 3) + # 10:39:48 + expect_equivalent(.convertIgorDate(3805612788, tz='GMT'),as.POSIXct("2024-08-04 10:39:48", tz='GMT')) + expect_equivalent(.convertIgorDate(3805612788, tz='Europe/London'),as.POSIXct("2024-08-04 10:39:48", tz='Europe/London')) + expect_equivalent(.convertIgorDate(3805612788, tz='America/New_York'),as.POSIXct("2024-08-04 10:39:48", tz='America/New_York')) }) test_that("Processing of funny null terminated strings", {