diff --git a/DESCRIPTION b/DESCRIPTION index 22560e2..ad062e6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,4 +25,4 @@ Imports: methods Suggests: testthat -RoxygenNote: 6.0.1 +RoxygenNote: 6.1.1 diff --git a/docs/authors.html b/docs/authors.html index 2dcc6a9..9964e86 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,35 +1,42 @@ - + -Authors • gphys +Citation and Authors • gphys - + - - + + - + - + + + + - - - - + + + + + + + - + + @@ -75,15 +91,35 @@ -
-
+
+
+ + +

Frechter S, Bates AS, Tootoonian S, Dolan M, Manton JD, Jamasb AR, Kohl J, Bock D, Jefferis GS (2019). +“Functional and anatomical specificity in a higher olfactory centre.” +eLife, 8. +doi: 10.7554/elife.44590. +

+
@Article{,
+  doi = {10.7554/elife.44590},
+  year = {2019},
+  month = {may},
+  publisher = {{eLife} Sciences Publications, Ltd},
+  volume = {8},
+  author = {Shahar Frechter and Alexander Shakeel Bates and Sina Tootoonian and Michael-John Dolan and James D Manton and Arian Rokkum Jamasb and Johannes Kohl and Davi Bock and Gregory SXE Jefferis},
+  title = {Functional and anatomical specificity in a higher olfactory centre},
+  journal = {{eLife}},
+}
  • -

    Gregory Jefferis. Author, maintainer. +

    Gregory Jefferis. Author, maintainer. ORCID

@@ -99,12 +135,13 @@

Authors

-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

-
+ + diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..e5f1fe1 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,148 @@ +/* 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 new file mode 100644 index 0000000..b35504c --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(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 index 885e835..8d03f0e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,15 +1,15 @@ - + Analyse Electrophysiology Data Acquired by 'Neuromatic' / 'Igor Pro' • gphys - - - - + + + + - @@ -30,13 +30,18 @@
-
+
@@ -71,14 +79,14 @@

Installation

Currently there isn’t a released version on CRAN.You can use the devtools package to install either the latest release or development version:

# install devtools if required
-install.packages("devtools")
+install.packages("devtools")
 
-library(devtools)
+library(devtools)
 # latest release (recommended)
-install_github("jefferis/gphys")
+install_github("jefferis/gphys")
 
 # develop branch may occasionally have changes that have not been merged to master
-install_github("jefferis/gphys@develop")
+install_github("jefferis/gphys@develop")

Note: Windows users need Rtools and devtools to install this way.

@@ -89,37 +97,55 @@

-
-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

-
+ + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 0000000..59f550e --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,435 @@ + + + + + + + + +Changelog • gphys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+

+gphys 0.12

+
    +
  • Allow subset.spiketimes to remove duplicate odours (#18)
  • +
  • give PlotRasterFromSweeps a DividerLwd argument, making the dividers between odours narrower than in the past (Glenn Turner complained about these).
  • +
+
+
+

+gphys 0.11

+
    +
  • fix bug in handling shuffled odour blocks in divide.spiketimes (#13)
  • +
  • record file number when reading in spike times (#14). This will be useful for dealing with shuffled odour presentations where we would like superimpose voltage information.
  • +
  • add MakeAverageWaves function to make average (analogue) waves that match a spiketimes object
  • +
  • minor doc improvements (#15)
  • +
+
+
+

+gphys 0.10.0

+
    +
  • fix bugs in handling of NAs in lifetime_sparseness
  • +
  • minor doc fixes
  • +
  • make test installation optional
  • +
  • dev: update roxygen2
  • +
+
+
+

+gphys 0.9

+
    +
  • deprecate split.spiketimes in favour of divide.spiketimes
  • +
  • prepare for CRAN release by fixing all R CMD CHECK warnings/notes
  • +
  • fix bug in example on case-sensitive filesystems
  • +
  • add zenodo shield
  • +
  • dev: add travis integration
  • +
+
+
+

+gphys 0.8-2

+
    +
  • Add lifetime_sparseness function
  • +
  • give PlotRasterFromSweeps a DividerCol argument
  • +
+
+
+

+gphys 0.8.1

+
    +
  • Allow smpsth to pass on additional arguments to STAR::psth (such as plotting arguemnts)
  • +
  • dev: switch to roxygen2 v4
  • +
+
+
+

+gphys 0.8

+
    +
  • Major version bump due to possible backwards incompatibility in scale.ts
  • +
  • scale.ts definition now matches base::scale generic function at the expense of losing the convenient yrange argument. There are no known examples of use of scale.ts outside gphys.
  • +
  • PlotOdourResponseFromSpikes argument chanages: baselineWindow now optional and PlotFrequency renamed to freq.
  • +
  • dev: switch to roxygen2 v3.1
  • +
+
+
+

+gphys 0.7-3

+
    +
  • merged spiketimes objects (generated by merge.spiketimes) now contain a mergedwaveinfo attribute indicating the exact wave.sweep of origin for each sweep in the merged wave.
  • +
  • Rename as.spiketimes to spiketimes following convention for S3 constructor and use this to document the spiketimes class.
  • +
  • include all examples within package (with an eye on a CRAN release).
  • +
+
+
+

+gphys 0.7-2

+
    +
  • Allow subset.spiketimes to use even duplicated channels but warn that only the first sweep will be used in this case.
  • +
+
+
+

+gphys 0.7-1

+
    +
  • Allow subset.spiketimes to use channels even when some (other) channels are duplicated in odd config.
  • +
+
+
+

+gphys 0.7

+
    +
  • Fix bug in OdourResponseFromSpikes() when counting spikes from a merged spiketimes object in which the block fewer trials was merged with a block with more trials. Resulted in sweeps for the two blocks being mismatched / misordered.
  • +
+
+
+

+gphys 0.6-7

+
    +
  • Make baselineWindow=NULL the default in OdourResponseFromSpikes() so that it is easier for wrapper functions to switch between specifying a baseline window or not having one.
  • +
+
+
+

+gphys 0.6-6

+
    +
  • Give smooth_decimate an extend option (that is passed on to stats::filter) to allow padding of data to end.
  • +
  • Give smooth_decimate frequency and deltat options that can be used instead of downsamplefactor. Again passed to stats::filter.
  • +
+
+
+

+gphys 0.6-5

+
    +
  • Give smooth_decimate a sides option (that is passed on to stats::filter)
  • +
  • Return call in smooth_decimate result
  • +
  • Better example for smooth_decimate (that is actually run)
  • +
+
+
+

+gphys 0.6-4

+
    +
  • Allow multiple stimulus bars on raster plots Specified as c(start1,stop1,start2,stop2)
  • +
  • Fix bug in plotting stimulus bar (extended outside y axis; usually invisible but obvious in svg format)
  • +
+
+
+

+gphys 0.6-3

+
    +
  • AddLinesToRasterPlot can now cope with multiple colours
  • +
  • PlotRastersFromSweeps can be told not to plot spikes or dividing lines so that it can be used to set up an empty plot to which AddLinesToRasterPlot can then add lines. See ?AddLinesToRasterPlot for examples.
  • +
  • new plot.spiketimes function allows plot() to be called directly on a spiketimes object.
  • +
+
+
+

+gphys 0.6-2

+
    +
  • split.spiketimes now gives each new block a name of form . So if experiment 008 contains 4 repeats we will get: c(“008.000”,“008.001”,“008.002”,“008.003”) +
  • +
  • merge.spiketimes now gives each merged block a name of form , So if we merge experiments 001,002,003 with experiments 004,005 we’ll get c(“001,004”,“002,005”,“003,”) +
  • +
  • OdourResponseFromSpikes can now cope with spiketimes lists that do not have names (this is defensive since splitting and merging produce sensible names).
  • +
+
+
+

+gphys 0.6-1

+
    +
  • merge.spiketimes can merge lists with different numbers of repeats
  • +
  • OdourResponseFromSpikes can cope with missing sweeps (they come back as NA) and it will always convert sweeps that have no spikes to count 0.
  • +
+
+
+

+gphys 0.6

+
    +
  • add smpsth function to generate smooth peristimulus time histogram using STAR psth function from gphys spiketimes objects. Note that these will fail when any sweep has no spikes.
  • +
  • add mpsth class to handle lists of multiple STAR psth objects (e.g. for different odours or for different neurons)
  • +
+
+
+

+gphys 0.5-4

+
    +
  • Several small changes to PlotRasterFromSweeps
  • +
  • with pch=‘rect’ (ie spikes as rectangles rather than dots) then spikeheight option sets the relative spike height and defaults to much prettier looking value of 0.8 than its previous implicit value of 1.
  • +
  • new frame.plot option in PlotRasterFromSweeps to control whether a box surrounds the plot
  • +
  • xaxs and yaxs options to control whether the x and y axes are expanded. the default is now to use exactly the specified xlim and ylim (which is not R’s default behaviour)
  • +
  • teach subset.spiketimes to cope with ODD configs that have repeated odour names (but note that you still can’t subset any of these repeated odours by name, only by channel number)
  • +
  • Option to convert NAs to 0 in OdourResponseFromSpikes (default TRUE)
  • +
  • export is.spiketimes function
  • +
+
+
+

+gphys 0.5-3

+
    +
  • fix bug in visibility of “[.spiketimes” which was causing problems for Aaron’s mergeSpiketrain function (because subsetting a spiketrains object produced a plain list rather than a new spiketimes object).
  • +
  • Option to plot spikes with rectangles of specified width in PlotRasterFromSweeps
  • +
+
+
+

+gphys 0.5-2

+
    +
  • some documentation improvements (PlotOdourResponseFromSpikes,[.spiketimes,finder_colour)
  • +
+
+
+

+gphys 0.5-1

+
    +
  • merge.spiketimes function for spiketimes objects with different odd configs (limited to case where there are the same number of trials for each odour).
  • +
  • implemented proper subsetting of spiketimes object ie spiketimesobj[1:3] now behaves properly
  • +
  • +.spiketimes checks compatibility between spiketimes objects more carefully
  • +
  • finder_colour_fast is much faster for long lists of files [ao]
  • +
  • documentation fixes
  • +
+
+
+

+gphys 0.5

+
    +
  • Add functions for handling timeseries data (ie voltages rather than spikes) including: scale.ts, mean.mts, smooth_decimate, tsp.nclamppxp and a new plot function AddLinesToRasterPlot.
  • +
  • IgorR package (on CRAN) is now a dependency (instead of a suggestion).
  • +
+
+
+

+gphys 0.4-1

+
    +
  • Option not to plot x and y axes in PlotRasterFromSweeps
  • +
+
+
+

+gphys 0.4

+
    +
  • CollectSpikesFromSweeps/PlotRasterFromSweeps can now read/plot subsets of spkes defined by odour name or channel number.
  • +
  • This depends on a new function subset.spiketimes.
  • +
  • STAR package is now a dependency (which must be installed from CRAN).
  • +
  • New as.repeatedTrain function will convert gphys spiketimes objects to STAR repeatedTrain objects, allowing STAR’s psth function to be used.
  • +
  • New fix.odd function to handle situation where ODD has been miswired
  • +
  • +

    Significant documentation improvements (including package docs ?gphys)

    +

    gphys 0.3-2

    +
  • +
  • You can now set options(gphys.datadir=‘/path/to/my/data’) so that you can specify relative paths in CollectSpikesFromSweeps/PlotRasterFromSweeps, ideally just the Igor cell name.

  • +
+
+
+

+gphys 0.3-1

+
    +
  • New OdourResponseFromSpikes function that can be used to extract the number or frequency of spikes in a window (optionally subtracting a baseline).
  • +
  • PlotRasterFromSweeps plots left hand edge of box when the axis starts at time>0
  • +
+
+
+

+gphys 0.3

+
    +
  • Teach CollectSpikesFromSweeps/PlotRasterFromSweeps to use Jonny’s spike subdirs
  • +
  • Make sure that CollectSpikesFromSweeps/PlotRasterFromSweeps only reads ODD files that match the sweeps that have been selected.
  • +
  • ?gphys shows package help
  • +
  • utility functions to set and query Finder colour labels
  • +
+
+
+

+gphys 0.2-1

+
    +
  • plot odour stimulus as an opaque rectangle behind spike rasters rather than a semi-transparent one in front.
  • +
+
+
+

+gphys 0.2

+
    +
  • handle experiments with repeated identical blocks (using split.spiketimes)
  • +
  • can now specify stimRange when collecting sweeps
  • +
  • can now specify xlim when collecting sweeps
  • +
  • and PlotRasterFromSweeps will use this info for plotting
  • +
  • +.spiketimes allows multiple consistent spiketimes objects to be gathered together
  • +
+
+
+

+gphys 0.1

+
    +
  • First version
  • +
+
+
+ + + +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 181fe63..c03fb08 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -1,13 +1,32 @@ -/* Sticker footer */ +/* 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 > .container { display: flex; - padding-top: 60px; - min-height: calc(100vh); + height: 100%; flex-direction: column; + + padding-top: 60px; } body > .container .row { - flex: 1; + flex: 1 0 auto; } footer { @@ -16,6 +35,7 @@ footer { border-top: 1px solid #e5e5e5; color: #666; display: flex; + flex-shrink: 0; } footer p { margin-bottom: 0; @@ -38,6 +58,17 @@ 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); +} + /* Section anchors ---------------------------------*/ a.anchor { @@ -68,7 +99,7 @@ a.anchor { .contents h1, .contents h2, .contents h3, .contents h4 { padding-top: 60px; - margin-top: -60px; + margin-top: -40px; } /* Static header placement on mobile devices */ @@ -108,13 +139,11 @@ a.anchor { /* Reference index & topics ----------------------------------------------- */ .ref-index th {font-weight: normal;} -.ref-index h2 {font-size: 20px;} .ref-index td {vertical-align: top;} +.ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} -.ref-index .title {width: 60%;} - -.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;} @@ -192,3 +221,16 @@ a.sourceLine:hover { .hasCopyButton:hover button.btn-copy-ex { visibility: visible; } + +/* 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; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 64b20df..eb7e83d 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -1,94 +1,115 @@ -$(function() { - - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $("#sidebar") + .stick_in_parent({offset_top: 40}) + .on('sticky_kit:bottom', function(e) { + $(this).parent().css('position', 'static'); + }) + .on('sticky_kit:unbottom', function(e) { + $(this).parent().css('position', 'relative'); + }); + + $('body').scrollspy({ + target: '#sidebar', + offset: 60 }); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 - }); + $('[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; + } + } - var cur_path = paths(location.pathname); - $("#navbar ul li a").each(function(index, value) { - if (value.text == "Home") - return; - if (value.getAttribute("href") === "#") - return; - - var path = paths(value.pathname); - if (is_prefix(cur_path, path)) { - // Add class to parent
  • , and enclosing
  • if in dropdown - var menu_anchor = $(value); + // 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 / + 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); + } - 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); -function is_prefix(needle, haystack) { - if (needle.length > haystack.lengh) - return(false); + // 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(false); - } + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } - return(true); -} + return(haystack.length); + } -/* Clipboard --------------------------*/ + /* 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); -} + 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(Clipboard.isSupported()) { - $(document).ready(function() { - var copyButton = ""; + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; - $(".examples").addClass("hasCopyButton"); + $(".examples, div.sourceCode").addClass("hasCopyButton"); - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); - // Initialize clipboard: - var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); + // 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('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + 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 index ea4156a..4a4f52a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ pandoc: 1.19.2.1 -pkgdown: 0.1.0.9000 -pkgdown_sha: 17f683717d0a1547f13a08a259b34c58927452d6 +pkgdown: 1.3.0 +pkgdown_sha: ~ articles: [] diff --git a/docs/reference/AddLinesToRasterPlot.html b/docs/reference/AddLinesToRasterPlot.html index f3b41c4..4468c41 100644 --- a/docs/reference/AddLinesToRasterPlot.html +++ b/docs/reference/AddLinesToRasterPlot.html @@ -1,6 +1,6 @@ - + @@ -9,32 +9,39 @@ Add eg voltage traces to existing spike raster plot — AddLinesToRasterPlot • gphys - + - - + + - + - + + + + - - - + + + + + + - + +
  • @@ -80,21 +96,25 @@ -
    +
    +

    First thing this does is scale waves to 0-1 range using scale.ts Assumes that number of waves and number of boxes (odours) on spike raster plot actually match. It doesn't check!

    +
    AddLinesToRasterPlot(waves, ylim, col = "black", ...)
    -

    Arguments

    +

    Arguments

    @@ -107,7 +127,7 @@

    Ar

    - + @@ -121,20 +141,20 @@

    Details

    See also

    -

    PlotRasterFromSweeps,lines

    +

    Examples

    # NOT RUN {
     # First plot the rasters
     spikes8=CollectSpikesFromSweeps('/Volumes/JData/JPeople/Shahar/Data/120308/nm20120308c0',8)
    -spike8_split=split(spikes8)
    +spike8_split=split(spikes8)
     PlotRasterFromSweeps (spike8_split)
     # Now plot the voltages
    -avgwaves=read.table(
    +avgwaves=read.table(
       '/Volumes/JData/JPeople/Shahar/Data/120308/nm20120308c0/008_Avg_RG0_A0++.txt',
       header=T)
    -avgwavests=ts(avgwaves,start=0,freq=10)
    +avgwavests=ts(avgwaves,start=0,freq=10)
     AddLinesToRasterPlot(avgwavests,col='red')
     # same but with rainbow colouring
     PlotRasterFromSweeps (spike8_split)
    @@ -167,12 +187,13 @@ 

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/CollectSpikesFromSweeps-1.png b/docs/reference/CollectSpikesFromSweeps-1.png index 174b412..84371a3 100644 Binary files a/docs/reference/CollectSpikesFromSweeps-1.png and b/docs/reference/CollectSpikesFromSweeps-1.png differ diff --git a/docs/reference/CollectSpikesFromSweeps.html b/docs/reference/CollectSpikesFromSweeps.html index df12eca..9ed851b 100644 --- a/docs/reference/CollectSpikesFromSweeps.html +++ b/docs/reference/CollectSpikesFromSweeps.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Read in Igor Pro exported text file of Nclamp spike times — CollectSpikesFromSweeps • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -86,12 +102,15 @@ -
    +
    +

    The list of spiketimes has two columns, Time and Wave, where wave is the number of the wave within each sweepfile containing the spike. xlim and @@ -103,11 +122,12 @@

    Read in Igor Pro exported text file of Nclamp spike times

    is expected that the corresponding pxp and odd config files remain in the top level directory for the cell.

    +
    CollectSpikesFromSweeps(sweepdir, sweeps, subdir = "", xlim, stimRange,
       fixChannels = NULL, subset = NULL)
    -

    Arguments

    +

    Arguments

    col

    vector or function of colours that will be passed to lines

    vector or function of colours that will be passed to lines

    ...
    @@ -155,12 +175,12 @@

    Examp # }
    # If you have your data in a single folder hierarchy, you can that as the # data directory. # Here we set the data directory to folder containing gphys example data -options(gphys.datadir=system.file('igor','spikes',package='gphys')) +options(gphys.datadir=system.file('igor','spikes',package='gphys')) spikes=CollectSpikesFromSweeps('nm20120514c2',subdir='BLOCKB') # Finally an example specifying the exact sweeps to load -spikes=CollectSpikesFromSweeps("nm20110811c0",c(0,1,3)) +spikes=CollectSpikesFromSweeps("nm20110811c0",c(0,1,3)) # and plotting them -plot(spikes,xlim=c(2000,4000),odourRange=c(2000,3000))
    +plot(spikes,xlim=c(2000,4000),odourRange=c(2000,3000))
    @@ -185,12 +203,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/IgorWavesForSpikes.html b/docs/reference/IgorWavesForSpikes.html index a5813b6..ef55045 100644 --- a/docs/reference/IgorWavesForSpikes.html +++ b/docs/reference/IgorWavesForSpikes.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Find the Igor waves matching a set of spikes (even if shuffled) — IgorWavesForSpikes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,19 +94,23 @@ -
    +
    +

    Find the Igor waves matching a set of spikes (even if shuffled)

    +
    IgorWavesForSpikes(x)
    -

    Arguments

    +

    Arguments

    @@ -116,12 +136,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/MakeAverageWaves.html b/docs/reference/MakeAverageWaves.html index c91af46..93265c2 100644 --- a/docs/reference/MakeAverageWaves.html +++ b/docs/reference/MakeAverageWaves.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ Make average (analogue) waves that match a spiketimes object — MakeAverageWaves • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -79,20 +95,24 @@ -
    +
    +

    You can use the wavestem argument to choose the analogue input channel to use for calculation.

    +
    MakeAverageWaves(x, wavestem = "RecordA")
    -

    Arguments

    +

    Arguments

    @@ -113,7 +133,7 @@

    Value

    See also

    -

    CollectSpikesFromSweeps

    + @@ -136,12 +156,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/OdourResponseFromSpikes.html b/docs/reference/OdourResponseFromSpikes.html index 3c4792a..d0fb2fc 100644 --- a/docs/reference/OdourResponseFromSpikes.html +++ b/docs/reference/OdourResponseFromSpikes.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Produce table of spiking responses (optionally subtracting baseline) — OdourResponseFromSpikes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -82,12 +98,15 @@ -
    +
    +

    Details: If baseline window is of different duration to response window the baseline count is normalised to estimate the number of spikes that would have @@ -95,11 +114,12 @@

    Produce table of spiking responses (optionally subtracting baseline)

    5s baseline window and you get 10 spikes in the response period and 5 spikes in the baseline period, the response will be returned as 10-5/5 = 9 spikes.

    +
    OdourResponseFromSpikes(spiketimes, responseWindow, baselineWindow = NULL,
       freq = FALSE)
    -

    Arguments

    +

    Arguments

    @@ -126,15 +146,15 @@

    Value

    See also

    -

    Other OdourResponse: PlotOdourResponseFromSpikes

    +

    Other OdourResponse: PlotOdourResponseFromSpikes

    Examples

    spikes=CollectSpikesFromSweeps( - system.file('igor','spikes','nm20110914c4',package='gphys'), + system.file('igor','spikes','nm20110914c4',package='gphys'), subdir='BLOCKI',sweeps=0:4) -od=OdourResponseFromSpikes(spikes,response=c(2200,2700),baseline=c(0,2000)) -summary(od)
    #> ctr fly 4ol cVA +od=OdourResponseFromSpikes(spikes,response=c(2200,2700),baseline=c(0,2000)) +summary(od)
    #> ctr fly 4ol cVA #> Min. :-1.50 Min. :-1.25 Min. :-1.50 Min. :-1.75 #> 1st Qu.:-0.75 1st Qu.:-0.75 1st Qu.:-1.00 1st Qu.:-1.00 #> Median :-0.25 Median :-0.75 Median :-0.50 Median :-0.50 @@ -147,12 +167,12 @@

    Examp #> Median :-0.25 Median :20.5 #> Mean : 0.10 Mean :21.1 #> 3rd Qu.: 0.25 3rd Qu.:23.0 -#> Max. : 2.00 Max. :24.0

    apply(od,2,function(x) c(mean=mean(x),sd=sd(x)))
    #> ctr fly 4ol cVA IAA PAA +#> Max. : 2.00 Max. :24.0
    apply(od,2,function(x) c(mean=mean(x),sd=sd(x)))
    #> ctr fly 4ol cVA IAA PAA #> mean -0.3500000 -0.65000 -0.75 -0.6500000 0.100000 21.100000 #> sd 0.8403868 0.41833 0.50 0.7416198 1.193734 2.408319
    # show baseline response frequency only (by treating that as response) -od2=OdourResponseFromSpikes(spikes,response=c(0,2000),freq=TRUE) -summary(od2)
    #> ctr fly 4ol cVA IAA +od2=OdourResponseFromSpikes(spikes,response=c(0,2000),freq=TRUE) +summary(od2)
    #> ctr fly 4ol cVA IAA #> Min. :0.0 Min. :0.5 Min. :0.5 Min. :0.0 Min. :0.5 #> 1st Qu.:0.5 1st Qu.:0.5 1st Qu.:1.0 1st Qu.:0.0 1st Qu.:0.5 #> Median :0.5 Median :1.5 Median :1.0 Median :1.0 Median :1.5 @@ -180,9 +200,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -192,12 +210,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/PlotOdourResponseFromSpikes-1.png b/docs/reference/PlotOdourResponseFromSpikes-1.png new file mode 100644 index 0000000..6fcb786 Binary files /dev/null and b/docs/reference/PlotOdourResponseFromSpikes-1.png differ diff --git a/docs/reference/PlotOdourResponseFromSpikes-2.png b/docs/reference/PlotOdourResponseFromSpikes-2.png new file mode 100644 index 0000000..864c162 Binary files /dev/null and b/docs/reference/PlotOdourResponseFromSpikes-2.png differ diff --git a/docs/reference/PlotOdourResponseFromSpikes.html b/docs/reference/PlotOdourResponseFromSpikes.html index 5165a33..18fc6f6 100644 --- a/docs/reference/PlotOdourResponseFromSpikes.html +++ b/docs/reference/PlotOdourResponseFromSpikes.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Boxplot of spikes within a window (optionally less a baseline) — PlotOdourResponseFromSpikes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Boxplot of spikes within a window (optionally less a baseline)

    +
    PlotOdourResponseFromSpikes(spiketimes, responseWindow, baselineWindow = NULL,
       freq = FALSE, PLOTFUN = stripchart, ...)
    -

    Arguments

    +

    Arguments

    @@ -126,22 +146,19 @@

    Value

    See also

    -

    CollectSpikesFromSweeps

    -

    Other OdourResponse: OdourResponseFromSpikes

    +

    CollectSpikesFromSweeps

    +

    Other OdourResponse: OdourResponseFromSpikes

    Examples

    -
    # NOT RUN {
    -spikes=CollectSpikesFromSweeps(
    -  system.file('igor','spikes','nm20110914c4',package='gphys'),
    +    
    spikes=CollectSpikesFromSweeps( + system.file('igor','spikes','nm20110914c4',package='gphys'), subdir='BLOCKI',sweeps=0:4) ## stripchart -PlotOdourResponseFromSpikes(spikes,c(2200,2700),c(0,2000),pch=19,method='jitter', - col=1:6) -## boxplot, in Hz -PlotOdourResponseFromSpikes(spikes,c(2200,2700),c(0,2000),freq=TRUE, - PLOTFUN=boxplot) -# }
    +PlotOdourResponseFromSpikes(spikes,c(2200,2700),c(0,2000),pch=19,method='jitter', + col=1:6)
    ## boxplot, in Hz +PlotOdourResponseFromSpikes(spikes,c(2200,2700),c(0,2000),freq=TRUE, + PLOTFUN=boxplot)
    @@ -168,12 +183,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/PlotRasterFromSweeps-1.png b/docs/reference/PlotRasterFromSweeps-1.png index 174b412..84371a3 100644 Binary files a/docs/reference/PlotRasterFromSweeps-1.png and b/docs/reference/PlotRasterFromSweeps-1.png differ diff --git a/docs/reference/PlotRasterFromSweeps-2.png b/docs/reference/PlotRasterFromSweeps-2.png index 991e7b9..7895189 100644 Binary files a/docs/reference/PlotRasterFromSweeps-2.png and b/docs/reference/PlotRasterFromSweeps-2.png differ diff --git a/docs/reference/PlotRasterFromSweeps-3.png b/docs/reference/PlotRasterFromSweeps-3.png index 44ae972..54f7b4d 100644 Binary files a/docs/reference/PlotRasterFromSweeps-3.png and b/docs/reference/PlotRasterFromSweeps-3.png differ diff --git a/docs/reference/PlotRasterFromSweeps-4.png b/docs/reference/PlotRasterFromSweeps-4.png index 977d423..54df723 100644 Binary files a/docs/reference/PlotRasterFromSweeps-4.png and b/docs/reference/PlotRasterFromSweeps-4.png differ diff --git a/docs/reference/PlotRasterFromSweeps-5.png b/docs/reference/PlotRasterFromSweeps-5.png index a9309d1..938a9e4 100644 Binary files a/docs/reference/PlotRasterFromSweeps-5.png and b/docs/reference/PlotRasterFromSweeps-5.png differ diff --git a/docs/reference/PlotRasterFromSweeps-6.png b/docs/reference/PlotRasterFromSweeps-6.png index 7d29b99..4f3c06c 100644 Binary files a/docs/reference/PlotRasterFromSweeps-6.png and b/docs/reference/PlotRasterFromSweeps-6.png differ diff --git a/docs/reference/PlotRasterFromSweeps-7.png b/docs/reference/PlotRasterFromSweeps-7.png index 2911362..85bdcc3 100644 Binary files a/docs/reference/PlotRasterFromSweeps-7.png and b/docs/reference/PlotRasterFromSweeps-7.png differ diff --git a/docs/reference/PlotRasterFromSweeps.html b/docs/reference/PlotRasterFromSweeps.html index 42c8a2f..d7a1d8b 100644 --- a/docs/reference/PlotRasterFromSweeps.html +++ b/docs/reference/PlotRasterFromSweeps.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ Make a raster plot from a set of Nclamp sweeps recording odour responses — PlotRasterFromSweeps • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -79,30 +95,34 @@ -
    +
    +

    Make a raster plot from a set of Nclamp sweeps recording odour responses

    This overloads base R's plot and calls PlotRasterFromSweeps

    +
    PlotRasterFromSweeps(sweepdir, sweeps, subdir = "", subset = NULL,
       xlim = NULL, xaxis = TRUE, yaxis = TRUE, frame.plot = TRUE,
       xaxs = "i", yaxs = "i", main, sub, xlab = "Time/ms", ylab = "Odour",
       pch = 22, dotcolour = "black", dotsize = 0.5, dotwidth = 20,
    -  spikeheight = 0.8, odourRange = NULL, odourCol = rgb(1, 0.8, 0.8, 1),
    +  spikeheight = 0.8, odourRange = NULL, odourCol = rgb(1, 0.8, 0.8, 1),
       relabelfun = identity, fixChannels = NULL, IncludeChannels = FALSE,
       PlotSpikes = TRUE, PlotDividers = TRUE, DividerCol = "black",
    -  panel.first = NULL, panel.last = NULL, ...)
    +  DividerLwd = 0.5, panel.first = NULL, panel.last = NULL, ...)
     
     # S3 method for spiketimes
    -plot(x, ...)
    +plot(x, ...) -

    Arguments

    +

    Arguments

    @@ -144,7 +164,7 @@

    Ar

    - + @@ -212,6 +232,10 @@

    Ar

    + + + + + +
    main

    main title of plot (see title)

    main title of plot (see title)

    sub

    the colour with which to plot dividing lines between odours (default black)

    DividerLwd

    the width of the lines between odours (default 0.5)

    panel.first

    An expression to be evaluated after the plot axes @@ -246,39 +270,39 @@

    Details

    See also

    -

    CollectSpikesFromSweeps, +

    CollectSpikesFromSweeps, AddLinesToRasterPlot,fix.odd and - plot.default for graphical parameters - PlotRasterFromSweeps, spiketimes

    + plot.default for graphical parameters

    +

    PlotRasterFromSweeps, spiketimes

    Examples

    ## Plot time range 2-4s with odour pulse 2-3s for sweeps 0,1,3 PlotRasterFromSweeps( - system.file('igor','spikes','nm20110811c0',package='gphys'), - c(0,1,3),xlim=c(2000,4000),odourRange=c(2000,3000))
    # Use rectangles for spikes instead + system.file('igor','spikes','nm20110811c0',package='gphys'), + c(0,1,3),xlim=c(2000,4000),odourRange=c(2000,3000))
    # Use rectangles for spikes instead PlotRasterFromSweeps( - system.file('igor','spikes','nm20110811c0',package='gphys'), - c(0,1,3),xlim=c(0,4000),odourRange=c(2000,3000),dotwidth=20,pch='rect')
    ## Fix a bad label, first define a function + system.file('igor','spikes','nm20110811c0',package='gphys'), + c(0,1,3),xlim=c(0,4000),odourRange=c(2000,3000),dotwidth=20,pch='rect')
    ## Fix a bad label, first define a function relabel=function(labels) {labels[labels=="fly"]="empty";labels} ## and then use it PlotRasterFromSweeps( - system.file('igor','spikes','nm20110811c0',package='gphys'), - c(0,1,3),relabelfun=relabel)
    ## Example with block based organisation + system.file('igor','spikes','nm20110811c0',package='gphys'), + c(0,1,3),relabelfun=relabel)
    ## Example with block based organisation ## i.e. spike files sorted into different subdirs for each stimulus protocol PlotRasterFromSweeps( - system.file('igor','spikes','nm20120514c2',package='gphys'), - subdir='BLOCKA',odourRange=c(2000,2500),xlim=c(0,5000))
    ## Example of fixing one of Jonny's traces when channels were mixed up -fixVec=c(empty=31,IAA=30,cVA=29,PAA=27,`4ol`=26,ctr=25) + system.file('igor','spikes','nm20120514c2',package='gphys'), + subdir='BLOCKA',odourRange=c(2000,2500),xlim=c(0,5000))
    ## Example of fixing one of Jonny's traces when channels were mixed up +fixVec=c(empty=31,IAA=30,cVA=29,PAA=27,`4ol`=26,ctr=25) PlotRasterFromSweeps( - system.file('igor','spikes','nm20110907c3',package='gphys'), - subdir='BLOCKI',odourRange=c(2000,2500),xlim=c(0,5000),fixChannels=fixVec)
    ## Imagine a double odour stimulation + system.file('igor','spikes','nm20110907c3',package='gphys'), + subdir='BLOCKI',odourRange=c(2000,2500),xlim=c(0,5000),fixChannels=fixVec)
    ## Imagine a double odour stimulation PlotRasterFromSweeps( - system.file('igor','spikes','nm20110907c3',package='gphys'), - subdir='BLOCKI',odourRange=c(2000,2500,3000,3250),xlim=c(0,5000), - fixChannels=fixVec)
    options(gphys.datadir=system.file('igor','spikes',package='gphys')) + system.file('igor','spikes','nm20110907c3',package='gphys'), + subdir='BLOCKI',odourRange=c(2000,2500,3000,3250),xlim=c(0,5000), + fixChannels=fixVec)
    options(gphys.datadir=system.file('igor','spikes',package='gphys')) spikes=CollectSpikesFromSweeps('nm20120514c2',subdir='BLOCKB') -plot(spikes)
    +plot(spikes)
    @@ -305,12 +327,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/as.mpsth.html b/docs/reference/as.mpsth.html index e5b1bf3..99d02d3 100644 --- a/docs/reference/as.mpsth.html +++ b/docs/reference/as.mpsth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Convert a list of STAR psth objects into an mpsth object — as.mpsth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,19 +94,23 @@ -
    +
    +

    Convert a list of STAR psth objects into an mpsth object

    +
    as.mpsth(x, ...)
    -

    Arguments

    +

    Arguments

    @@ -109,9 +129,9 @@

    Value

    See also

    -

    psth

    +

    psth

    Other mpsth: [.mpsth, - as.ts.mpsth

    + as.ts.mpsth

    @@ -126,9 +146,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -138,12 +156,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/as.repeatedTrain-1.png b/docs/reference/as.repeatedTrain-1.png index 42ec6fd..b35b50b 100644 Binary files a/docs/reference/as.repeatedTrain-1.png and b/docs/reference/as.repeatedTrain-1.png differ diff --git a/docs/reference/as.repeatedTrain-2.png b/docs/reference/as.repeatedTrain-2.png index 4d4b94f..cdf3643 100644 Binary files a/docs/reference/as.repeatedTrain-2.png and b/docs/reference/as.repeatedTrain-2.png differ diff --git a/docs/reference/as.repeatedTrain-3.png b/docs/reference/as.repeatedTrain-3.png index 85e52f2..c552499 100644 Binary files a/docs/reference/as.repeatedTrain-3.png and b/docs/reference/as.repeatedTrain-3.png differ diff --git a/docs/reference/as.repeatedTrain-4.png b/docs/reference/as.repeatedTrain-4.png index a39829b..8a1be8e 100644 Binary files a/docs/reference/as.repeatedTrain-4.png and b/docs/reference/as.repeatedTrain-4.png differ diff --git a/docs/reference/as.repeatedTrain-5.png b/docs/reference/as.repeatedTrain-5.png index 416938b..8bec9f3 100644 Binary files a/docs/reference/as.repeatedTrain-5.png and b/docs/reference/as.repeatedTrain-5.png differ diff --git a/docs/reference/as.repeatedTrain-6.png b/docs/reference/as.repeatedTrain-6.png index ed9b6b0..7ddafd4 100644 Binary files a/docs/reference/as.repeatedTrain-6.png and b/docs/reference/as.repeatedTrain-6.png differ diff --git a/docs/reference/as.repeatedTrain-7.png b/docs/reference/as.repeatedTrain-7.png index f2cf5cb..77a4939 100644 Binary files a/docs/reference/as.repeatedTrain-7.png and b/docs/reference/as.repeatedTrain-7.png differ diff --git a/docs/reference/as.repeatedTrain.html b/docs/reference/as.repeatedTrain.html index 5b7465b..3fe35ac 100644 --- a/docs/reference/as.repeatedTrain.html +++ b/docs/reference/as.repeatedTrain.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Generic function to convert spikes to STAR as.repeatedTrain objects — as.repeatedTrain • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -84,12 +100,15 @@ -
    +
    +

    Generic function to convert spikes to STAR as.repeatedTrain objects

    The STAR (Spike Train Analysis with R) package has a large number of useful @@ -99,13 +118,14 @@

    Generic function to convert spikes to STAR as.repeatedTrain objects

    odours. We now want to turn this into a list of repeatedTrain objects, one for each odour.

    +
    as.repeatedTrain(x, ...)
     
     # S3 method for spiketimes
     as.repeatedTrain(x, ...)
    -

    Arguments

    +

    Arguments

    @@ -124,21 +144,21 @@

    Value

    See also

    -

    as.repeatedTrain

    +

    Examples

    spikes<-CollectSpikesFromSweeps( - system.file('igor','spikes','nm20110914c4',package='gphys'), + system.file('igor','spikes','nm20110914c4',package='gphys'), subdir='BLOCKI',sweeps=0:4) rt=as.repeatedTrain(spikes) -rt
    #> $ctr
    #> -#> $fly
    #> -#> $`4ol`
    #> -#> $cVA
    #> -#> $IAA
    #> -#> $PAA
    #>
    require(STAR) -psth(rt[['PAA']])
    +rt
    #> $ctr
    #> +#> $fly
    #> +#> $`4ol`
    #> +#> $cVA
    #> +#> $IAA
    #> +#> $PAA
    #>
    require(STAR) +psth(rt[['PAA']])
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/as.ts.mpsth-1.png b/docs/reference/as.ts.mpsth-1.png index 010d809..ec39692 100644 Binary files a/docs/reference/as.ts.mpsth-1.png and b/docs/reference/as.ts.mpsth-1.png differ diff --git a/docs/reference/as.ts.mpsth.html b/docs/reference/as.ts.mpsth.html index 0780ab9..9738e3f 100644 --- a/docs/reference/as.ts.mpsth.html +++ b/docs/reference/as.ts.mpsth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Convert a multi-psth list into a (multi) time series object — as.ts.mpsth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Convert a multi-psth list into a (multi) time series object

    +
    # S3 method for mpsth
    -as.ts(x, ...)
    +as.ts(x, ...) -

    Arguments

    +

    Arguments

    @@ -110,17 +130,17 @@

    Value

    See also

    -

    ts as.ts.mpsth STAR::psth

    -

    Other mpsth: [.mpsth, as.mpsth

    +

    ts as.ts.mpsth STAR::psth

    +

    Other mpsth: [.mpsth, as.mpsth

    Examples

    -
    data(CAL1V,package='STAR') -CAL1V <- lapply(CAL1V,as.repeatedTrain) -psth1 <- psth(CAL1V[["neuron 1"]],breaks=c(bw=0.5,step=0.05),plot=FALSE) -psth2 <- psth(CAL1V[["neuron 2"]],breaks=c(bw=1,step=0.1),plot=FALSE) -z=as.ts(as.mpsth(list(psth1,psth2))) -plot(z,plot.type='single',col=1:2,ylab='Frequency /Hz')
    +
    data(CAL1V,package='STAR') +CAL1V <- lapply(CAL1V,as.repeatedTrain) +psth1 <- psth(CAL1V[["neuron 1"]],breaks=c(bw=0.5,step=0.05),plot=FALSE) +psth2 <- psth(CAL1V[["neuron 2"]],breaks=c(bw=1,step=0.1),plot=FALSE) +z=as.ts(as.mpsth(list(psth1,psth2))) +plot(z,plot.type='single',col=1:2,ylab='Frequency /Hz')
    @@ -147,12 +165,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/as.ts.psth.html b/docs/reference/as.ts.psth.html index df20671..85217b5 100644 --- a/docs/reference/as.ts.psth.html +++ b/docs/reference/as.ts.psth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Convert a STAR psth into a (multi) time series object — as.ts.psth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Convert a STAR psth into a (multi) time series object

    +
    # S3 method for psth
    -as.ts(x, fieldsToConvert = "freq", ...)
    +as.ts(x, fieldsToConvert = "freq", ...) -

    Arguments

    +

    Arguments

    @@ -110,7 +130,7 @@

    Ar

    See also

    -

    Other psth: tsp.psth

    +

    Other psth: tsp.psth

    @@ -131,12 +151,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/divide.html b/docs/reference/divide.html index 14acafe..9059bc6 100644 --- a/docs/reference/divide.html +++ b/docs/reference/divide.html @@ -1,6 +1,6 @@ - + @@ -10,32 +10,39 @@ repeat — divide • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -81,24 +97,28 @@ -
    +
    +

    divide.spiketimes is designed for the situation where a single pxp file contains multiple repeats for the same stimulus set.

    +
    divide(x, ...)
     
     # S3 method for spiketimes
     divide(x, blocksize, ...)
    -

    Arguments

    +

    Arguments

    @@ -135,11 +155,11 @@

    Details

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -156,9 +176,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -168,12 +186,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/finder_colour.html b/docs/reference/finder_colour.html index da14f12..01a08a8 100644 --- a/docs/reference/finder_colour.html +++ b/docs/reference/finder_colour.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ Query the colour label of a file in the MacOS X Finder — finder_colour • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -79,20 +95,24 @@ -
    +
    +

    Note the colours are mapped according to my 10.6.8 system but see: http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts

    +
    finder_colour(filename)
    -

    Arguments

    +

    Arguments

    @@ -107,8 +127,8 @@

    Value

    See also

    -

    Other finder_colour: finder_colour_fast, - set_finder_colour

    +

    Other finder_colour: finder_colour_fast, + set_finder_colour

    @@ -123,9 +143,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -135,12 +153,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/finder_colour_fast.html b/docs/reference/finder_colour_fast.html index b355afc..f0fc3b6 100644 --- a/docs/reference/finder_colour_fast.html +++ b/docs/reference/finder_colour_fast.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Query the colour label of a file in the MacOS X Finder — finder_colour_fast • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -82,12 +98,15 @@ -
    +
    +

    Note this queries all the files in a single call to mdls, which can fail for very long file lists (about 260k characters). @@ -95,10 +114,11 @@

    Query the colour label of a file in the MacOS X Finder

    http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts Drops the file and gives a message if a file does not exist

    +
    finder_colour_fast(files)
    -

    Arguments

    +

    Arguments

    @@ -113,8 +133,8 @@

    Value

    See also

    -

    Other finder_colour: finder_colour, - set_finder_colour

    +

    Other finder_colour: finder_colour, + set_finder_colour

    @@ -129,9 +149,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -141,12 +159,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/fix.odd.html b/docs/reference/fix.odd.html index d3acee4..678d368 100644 --- a/docs/reference/fix.odd.html +++ b/docs/reference/fix.odd.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Fix the odour labels in an odd config — fix.odd • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,19 +94,23 @@ -
    +
    +

    Fix the odour labels in an odd config

    +
    fix.odd(odddf, fixChannels)
    -

    Arguments

    +

    Arguments

    @@ -109,8 +129,8 @@

    Value

    Examples

    -
    odd<-read.odd(system.file("igor","oddfiles","simple_odd.txt",package="gphys")) -fixVec=c(empty=31,IAA=30,cVA=29,PAA=27,`4ol`=26,ctr=25) +
    odd<-read.odd(system.file("igor","oddfiles","simple_odd.txt",package="gphys")) +fixVec=c(empty=31,IAA=30,cVA=29,PAA=27,`4ol`=26,ctr=25) fixed=fix.odd(odd,fixVec)
    @@ -136,12 +154,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/gphys-package.html b/docs/reference/gphys-package.html index 6b864ce..c6f182a 100644 --- a/docs/reference/gphys-package.html +++ b/docs/reference/gphys-package.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Analyse electrophysiology data acquired by Neuromatic / Igor Pro — gphys-package • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,15 +94,19 @@ -
    +
    +

    gphys = Greg's ephys (and perhaps gee whiz)

    +

    Details

    @@ -94,8 +114,8 @@

    Details

    You can use functions such as PlotRasterFromSweeps to view spike data. This function and others depend on spike times stored in Igor Pro text files. For details of how to make -these files in Igor see: - http://flybrain.mrc-lmb.cam.ac.uk/dokuwiki/doku.php?id=protocols:analysing_spikes

    +these files in Igor see:

    +

    http://flybrain.mrc-lmb.cam.ac.uk/dokuwiki/doku.php?id=protocols:analysing_spikes

    Spike times read in from Igor Pro text files by CollectSpikesFromSweeps are stored in R a modified list of S3 class spiketimes. You can add, subset and split these lists - see spiketimes @@ -109,9 +129,9 @@

    Details argument of PlotRasterFromSweeps - see function documentation for examples.

    Note that you may find it useful to set e.g. -options(gphys.datadir='/Volumes/JData/JPeople/Jonny/physiology/data') +options(gphys.datadir='/Volumes/JData/JPeople/Jonny/physiology/data') appropriately at the start of a session or in your -.Rprofile file. You can then use relative paths to +.Rprofile file. You can then use relative paths to your Igor data folders in the plot functions.

    Finally as.repeatedTrain provides a bridge to the STAR package which includes many spike analysis functions including (smoothed) @@ -119,9 +139,9 @@

    Details

    See also

    -

    options, spiketimes, PlotRasterFromSweeps, +

    options, spiketimes, PlotRasterFromSweeps, CollectSpikesFromSweeps -and STAR package for further analysis.

    +and STAR package for further analysis.

    @@ -143,12 +163,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 090e25a..7ba041e 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,6 +1,6 @@ - + @@ -9,27 +9,34 @@ Function reference • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -75,298 +91,294 @@ -
    -
    +
    +
    -
    -
    +
    - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
    -

    Package overview

    -

    -
    -

    gphys-package

    -

    Analyse electrophysiology data acquired by Neuromatic / Igor Pro

    -

    Read/plot ephys data

    -

    -
    -

    PlotRasterFromSweeps plot

    -

    Make a raster plot from a set of Nclamp sweeps recording odour responses

    -

    PlotOdourResponseFromSpikes

    -

    Boxplot of spikes within a window (optionally less a baseline)

    -

    CollectSpikesFromSweeps

    -

    Read in Igor Pro exported text file of Nclamp spike times

    -

    AddLinesToRasterPlot

    -

    Add eg voltage traces to existing spike raster plot

    -

    MakeAverageWaves

    -

    Make average (analogue) waves that match a spiketimes object

    -

    IgorWavesForSpikes

    -

    Find the Igor waves matching a set of spikes (even if shuffled)

    -

    Summarising responses

    -

    -
    -

    OdourResponseFromSpikes

    -

    Produce table of spiking responses (optionally subtracting baseline)

    -

    lifetime_sparseness

    -

    Calculate lifetime sparseness according to Olsen et al. 2008

    -

    Odour delivery information

    -

    -
    -

    read.odd

    -

    Read in the ODD text file describing odour presentation sequence

    -

    fix.odd

    -

    Fix the odour labels in an odd config

    -

    Spike trains

    -

    -
    -

    as.repeatedTrain

    -

    Generic function to convert spikes to STAR as.repeatedTrain objects

    -

    spiketimes

    -

    Make spiketimes object (spike times + stimulus info) from list of dataframes

    -

    split

    -

    Split a spiketimes object with multiple repeats into list with one entry per +

    +

    Package overview

    +

    +
    +

    gphys-package

    +

    Analyse electrophysiology data acquired by Neuromatic / Igor Pro

    +

    Read/plot ephys data

    +

    +
    +

    PlotRasterFromSweeps() plot(<spiketimes>)

    +

    Make a raster plot from a set of Nclamp sweeps recording odour responses

    +

    PlotOdourResponseFromSpikes()

    +

    Boxplot of spikes within a window (optionally less a baseline)

    +

    CollectSpikesFromSweeps()

    +

    Read in Igor Pro exported text file of Nclamp spike times

    +

    AddLinesToRasterPlot()

    +

    Add eg voltage traces to existing spike raster plot

    +

    MakeAverageWaves()

    +

    Make average (analogue) waves that match a spiketimes object

    +

    IgorWavesForSpikes()

    +

    Find the Igor waves matching a set of spikes (even if shuffled)

    +

    Summarising responses

    +

    +
    +

    OdourResponseFromSpikes()

    +

    Produce table of spiking responses (optionally subtracting baseline)

    +

    lifetime_sparseness()

    +

    Calculate lifetime sparseness according to Olsen et al. 2008

    +

    Odour delivery information

    +

    +
    +

    read.odd()

    +

    Read in the ODD text file describing odour presentation sequence

    +

    fix.odd()

    +

    Fix the odour labels in an odd config

    +

    Spike trains

    +

    +
    +

    as.repeatedTrain()

    +

    Generic function to convert spikes to STAR as.repeatedTrain objects

    +

    spiketimes()

    +

    Make spiketimes object (spike times + stimulus info) from list of dataframes

    +

    split(<spiketimes>)

    +

    Split a spiketimes object with multiple repeats into list with one entry per repeat

    -

    merge

    -

    Merge two spiketimes lists with different ODD configs

    -

    divide

    -

    Divide spiketimes object with multiple repeats into list with one entry per +

    +

    merge(<spiketimes>)

    +

    Merge two spiketimes lists with different ODD configs

    +

    divide()

    +

    Divide spiketimes object with multiple repeats into list with one entry per repeat

    -

    is.spiketimes

    -

    Test if object is of class spiketimes

    -

    subset

    -

    Make a new spiketimes object containing only sweeps for an odour subset

    -

    [.spiketimes

    -

    Extract one or more spiketimes objects as a new spiketimes list

    -

    +.spiketimes

    -

    Combine multiple compatible spiketimes series (to plot as single raster)

    -

    Time series helper functions/methods

    -

    -
    -

    smooth_decimate

    -

    Boxcar smooth and decimate a time series

    -

    scale

    -

    Rescale the y values of a (multi-)time series (ts) object

    -

    mean

    -

    Take the mean of all the columns in a multi-time series (mts) object

    -

    tsp.nclamppxp

    -

    Get time series properties for an Nclamp pxp file

    -

    tsp.psth

    -

    Find start, end and frequency of a STAR psth object +

    +

    is.spiketimes()

    +

    Test if object is of class spiketimes

    +

    subset(<spiketimes>)

    +

    Subset spiketimes object to contain only sweeps for an odour subset

    +

    `[`(<spiketimes>)

    +

    Extract one or more spiketimes objects as a new spiketimes list

    +

    `+`(<spiketimes>)

    +

    Combine multiple compatible spiketimes series (to plot as single raster)

    +

    Time series helper functions/methods

    +

    +
    +

    smooth_decimate()

    +

    Boxcar smooth and decimate a time series

    +

    scale(<ts>)

    +

    Rescale the y values of a (multi-)time series (ts) object

    +

    mean(<mts>)

    +

    Take the mean of all the columns in a multi-time series (mts) object

    +

    tsp.nclamppxp()

    +

    Get time series properties for an Nclamp pxp file

    +

    tsp.psth()

    +

    Find start, end and frequency of a STAR psth object Checks that it is regularly sampled

    -

    PSTH helper functions/methods

    -

    These help interact with STAR package smoothed peristimulus time histogram objects

    -
    -

    smpsth

    -

    Generate smooth PSTHs for a set of spike trains

    -

    [.mpsth

    -

    Extract one or more psth objects to make a new mpsth list

    -

    as.ts

    -

    Convert a multi-psth list into a (multi) time series object

    -

    as.ts

    -

    Convert a STAR psth into a (multi) time series object

    -

    as.mpsth

    -

    Convert a list of STAR psth objects into an mpsth object

    -

    plot

    -

    Plot PSTHs for multiple neurons (or multiple stimuli)

    -

    Miscellaneous utility functions

    -

    -
    -

    finder_colour

    -

    Query the colour label of a file in the MacOS X Finder

    -

    finder_colour_fast

    -

    Query the colour label of a file in the MacOS X Finder

    -

    set_finder_colour

    -

    Set the colour label of a file in the MacOS X Finder +

    +

    PSTH helper functions/methods

    +

    These help interact with STAR package smoothed peristimulus time histogram objects

    +
    +

    smpsth()

    +

    Generate smooth PSTHs for a set of spike trains

    +

    `[`(<mpsth>)

    +

    Extract one or more psth objects to make a new mpsth list

    +

    as.ts(<mpsth>)

    +

    Convert a multi-psth list into a (multi) time series object

    +

    as.ts(<psth>)

    +

    Convert a STAR psth into a (multi) time series object

    +

    as.mpsth()

    +

    Convert a list of STAR psth objects into an mpsth object

    +

    plot(<mpsth>)

    +

    Plot PSTHs for multiple neurons (or multiple stimuli)

    +

    Miscellaneous utility functions

    +

    +
    +

    finder_colour()

    +

    Query the colour label of a file in the MacOS X Finder

    +

    finder_colour_fast()

    +

    Query the colour label of a file in the MacOS X Finder

    +

    set_finder_colour()

    +

    Set the colour label of a file in the MacOS X Finder See http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts

    -
    +
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + diff --git a/docs/reference/is.spiketimes.html b/docs/reference/is.spiketimes.html index 90b67cd..0e3008e 100644 --- a/docs/reference/is.spiketimes.html +++ b/docs/reference/is.spiketimes.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Test if object is of class spiketimes — is.spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + +
    @@ -78,19 +94,23 @@ -
    +
    +

    Test if object is of class spiketimes

    +
    is.spiketimes(x)
    -

    Arguments

    +

    Arguments

    @@ -105,11 +125,11 @@

    Value

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -132,12 +152,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/lifetime_sparseness.html b/docs/reference/lifetime_sparseness.html index cd5f24c..ce5a1f2 100644 --- a/docs/reference/lifetime_sparseness.html +++ b/docs/reference/lifetime_sparseness.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Calculate lifetime sparseness according to Olsen et al. 2008 — lifetime_sparseness • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,19 +94,23 @@ -
    +
    +

    Calculate lifetime sparseness according to Olsen et al. 2008

    +
    lifetime_sparseness(x, minodours = 0.75)
    -

    Arguments

    +

    Arguments

    @@ -144,14 +164,35 @@

    R

    Examples

    spikes=CollectSpikesFromSweeps( - system.file('igor','spikes','nm20110914c4',package='gphys'), - subdir='BLOCKI',sweeps=0:4) -od=OdourResponseFromSpikes(spikes,response=c(2200,2700),baseline=c(0,2000)) -S=lifetime_sparseness(od)
    #> Warning: Zeroing 19 responses < 0
    + system.file('igor','spikes','nm20120514c2',package='gphys'), + subdir='BLOCKA') +od=OdourResponseFromSpikes(spikes,response=c(2200,2700),baseline=c(0,2000)) +# NB we take mean response per odour since we must end up with one number +# per odour per cell +S=lifetime_sparseness(colMeans(od))
    #> Warning: Zeroing 1 responses < 0
    data.frame(odour=colnames(od), S=S)
    #> odour S +#> 1 IAA 0.7138722 +#> 2 cVA 0.7138722 +#> 3 pro 0.7138722 +#> 4 PAA 0.7138722 +#> 5 4ol 0.7138722 +#> 6 ctr 0.7138722 +#> 7 vin 0.7138722 +#> 8 ctr.1 0.7138722 +#> 9 fly 0.7138722 +#> 10 far 0.7138722 +#> 11 oen 0.7138722 +#> 12 pac 0.7138722 +#> 13 aac 0.7138722
    # check what happens with NAs od2=od od2[5,'cVA']=NA -S2=lifetime_sparseness(od2)
    #> Warning: Zeroing 19 responses < 0
    +lifetime_sparseness(colMeans(od2))
    #> Warning: Zeroing 1 responses < 0
    #> [1] 0.7545164
    +# compare with a sparse cell +spikes2=CollectSpikesFromSweeps( + system.file('igor','spikes','nm20110914c4',package='gphys'), + subdir='BLOCKI', sweeps=0:4) +od3=OdourResponseFromSpikes(spikes2,response=c(2200,2700),baseline=c(0,2000)) +lifetime_sparseness(colMeans(od3))
    #> Warning: Zeroing 4 responses < 0
    #> [1] 0.9981043
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/mean.mts.html b/docs/reference/mean.mts.html index 2d7547e..fd4fe70 100644 --- a/docs/reference/mean.mts.html +++ b/docs/reference/mean.mts.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Take the mean of all the columns in a multi-time series (mts) object — mean.mts • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Take the mean of all the columns in a multi-time series (mts) object

    +
    # S3 method for mts
    -mean(x, ...)
    +mean(x, ...) -

    Arguments

    +

    Arguments

    @@ -110,15 +130,15 @@

    Value

    See also

    -

    ts

    +

    Examples

    -
    require(IgorR) -w<-read.pxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR")) -wts<-WaveToTimeSeries(w[c('RecordA0',"RecordA1")]) -wm<-mean(wts) -summary(wm)
    #> Min. 1st Qu. Median Mean 3rd Qu. Max. +
    require(IgorR) +w<-read.pxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR")) +wts<-WaveToTimeSeries(w[c('RecordA0',"RecordA1")]) +wm<-mean(wts) +summary(wm)
    #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -207.219 -28.945 -19.703 -19.072 -9.273 162.000
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/merge.spiketimes.html b/docs/reference/merge.spiketimes.html index 49d0c10..fc49f52 100644 --- a/docs/reference/merge.spiketimes.html +++ b/docs/reference/merge.spiketimes.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Merge two spiketimes lists with different ODD configs — merge.spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Merge two spiketimes lists with different ODD configs

    +
    # S3 method for spiketimes
    -merge(x, y, ...)
    +merge(x, y, ...)
    -

    Arguments

    +

    Arguments

    @@ -111,12 +131,12 @@

    Value

    See also

    -

    +.spiketimes for combining repeats from the same ODD config

    +

    +.spiketimes for combining repeats from the same ODD config

    Other spiketimes: +.spiketimes, [.spiketimes, divide, is.spiketimes, spiketimes, split.spiketimes, - subset.spiketimes

    + subset.spiketimes

    @@ -139,12 +159,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/open-brace-psth.html b/docs/reference/open-brace-psth.html index c3d5aad..d1a0c12 100644 --- a/docs/reference/open-brace-psth.html +++ b/docs/reference/open-brace-psth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Extract one or more psth objects to make a new mpsth list — [.mpsth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Extract one or more psth objects to make a new mpsth list

    +
    # S3 method for mpsth
     [(x, i, ...)
    -

    Arguments

    +

    Arguments

    @@ -110,8 +130,8 @@

    Ar

    See also

    -

    Other mpsth: as.mpsth, - as.ts.mpsth

    +

    Other mpsth: as.mpsth, + as.ts.mpsth

    @@ -132,12 +152,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/open-brace-spiketimes.html b/docs/reference/open-brace-spiketimes.html index 11c0c3a..4a5c3a5 100644 --- a/docs/reference/open-brace-spiketimes.html +++ b/docs/reference/open-brace-spiketimes.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Extract one or more spiketimes objects as a new spiketimes list — [.spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Extract one or more spiketimes objects as a new spiketimes list

    +
    # S3 method for spiketimes
     [(x, i, ...)
    -

    Arguments

    +

    Arguments

    @@ -110,11 +130,11 @@

    Ar

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -135,12 +155,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/plot.mpsth.html b/docs/reference/plot.mpsth.html index 1acb981..2c307ef 100644 --- a/docs/reference/plot.mpsth.html +++ b/docs/reference/plot.mpsth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Plot PSTHs for multiple neurons (or multiple stimuli) — plot.mpsth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,23 +94,27 @@ -
    +
    +

    Plot PSTHs for multiple neurons (or multiple stimuli)

    +
    # S3 method for mpsth
    -plot(x, stimTimeCourse = NULL, colStim = "grey80",
    +plot(x, stimTimeCourse = NULL, colStim = "grey80",
       colCI = NULL, xlab = "Time /s", ylab = "Spike Freq /Hz", xlim, ylim,
    -  lwd = 2, col = 1, labels = NULL, toplot = c("lines", "CI", "legend"),
    +  lwd = 2, col = 1, labels = NULL, toplot = c("lines", "CI", "legend"),
       ...)
    -

    Arguments

    +

    Arguments

    @@ -145,7 +165,7 @@

    Ar

    See also

    -

    psth, plot.psth

    + @@ -158,9 +178,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -170,12 +188,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/plus-spiketimes.html b/docs/reference/plus-spiketimes.html index 8f95a81..81da1a4 100644 --- a/docs/reference/plus-spiketimes.html +++ b/docs/reference/plus-spiketimes.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Combine multiple compatible spiketimes series (to plot as single raster) — +.spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -86,12 +102,15 @@ -
    +
    +

    Details: this is designed for the case where you have loaded in multiple pxp files into separate spiketimes lists, BUT the pxp files were all acquired @@ -103,11 +122,12 @@

    Combine multiple compatible spiketimes series (to plot as single raster)

    +
    # S3 method for spiketimes
     +(e1, e2)
    -

    Arguments

    +

    Arguments

    @@ -122,11 +142,11 @@

    Value

    See also

    -

    Other spiketimes: [.spiketimes, +

    @@ -141,9 +161,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -153,12 +171,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/read.odd.html b/docs/reference/read.odd.html index f67c7b6..82c3d57 100644 --- a/docs/reference/read.odd.html +++ b/docs/reference/read.odd.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Read in the ODD text file describing odour presentation sequence — read.odd • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,19 +94,23 @@ -
    +
    +

    Read in the ODD text file describing odour presentation sequence

    +
    read.odd(oddfile, fill = TRUE, stringsAsFactors = FALSE, Verbose = FALSE)
    -

    Arguments

    +

    Arguments

    @@ -126,9 +146,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -138,12 +156,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/scale.ts.html b/docs/reference/scale.ts.html index f18bb0d..d6b5ec7 100644 --- a/docs/reference/scale.ts.html +++ b/docs/reference/scale.ts.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ Rescale the y values of a (multi-)time series (ts) object — scale.ts • gphys - + - - + + - + - + + + + - - - + + + +range[2] to 1. Values outside this range will be &lt;0 and &gt;1 respectively." /> + + + - + + @@ -79,21 +95,25 @@ -
    +
    +

    Linearly rescale y values to map range[1] to 0 and range[2] to 1. Values outside this range will be <0 and >1 respectively.

    +
    # S3 method for ts
    -scale(x, center = min(x), scale = diff(range(x)))
    +scale(x, center = min(x), scale = diff(range(x))) -

    Arguments

    +

    Arguments

    @@ -116,13 +136,13 @@

    Value

    See also

    -

    ts

    +

    Examples

    -
    w<-read.pxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR")) -wts<-WaveToTimeSeries(w[c('RecordA0',"RecordA1")]) -ws<-scale(wts,center=-200,scale=400)
    +
    w<-read.pxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR")) +wts<-WaveToTimeSeries(w[c('RecordA0',"RecordA1")]) +ws<-scale(wts,center=-200,scale=400)
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/set_finder_colour.html b/docs/reference/set_finder_colour.html index c500b63..24872c7 100644 --- a/docs/reference/set_finder_colour.html +++ b/docs/reference/set_finder_colour.html @@ -1,6 +1,6 @@ - + @@ -10,32 +10,39 @@ See http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts — set_finder_colour • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -81,22 +97,26 @@ -
    +
    +

    Set the colour label of a file in the MacOS X Finder See http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts

    +
    -
    set_finder_colour(filename, col = c("None", "Gray", "Grey", "Green", "Purple",
    +    
    set_finder_colour(filename, col = c("None", "Gray", "Grey", "Green", "Purple",
       "Blue", "Yellow", "Red", "Orange"))
    -

    Arguments

    +

    Arguments

    @@ -115,8 +135,8 @@

    Value

    See also

    -

    Other finder_colour: finder_colour_fast, - finder_colour

    +

    Other finder_colour: finder_colour_fast, + finder_colour

    @@ -131,9 +151,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -143,12 +161,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/smooth_decimate-1.png b/docs/reference/smooth_decimate-1.png index 029f650..32412be 100644 Binary files a/docs/reference/smooth_decimate-1.png and b/docs/reference/smooth_decimate-1.png differ diff --git a/docs/reference/smooth_decimate.html b/docs/reference/smooth_decimate.html index cbfa02f..c8d799d 100644 --- a/docs/reference/smooth_decimate.html +++ b/docs/reference/smooth_decimate.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Boxcar smooth and decimate a time series — smooth_decimate • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,21 +94,25 @@ -
    +
    +

    Boxcar smooth and decimate a time series

    +
    smooth_decimate(x, filterlength, downsamplefactor = NULL, start = NULL,
       end = NULL, frequency = NULL, deltat = NULL, extend = FALSE,
       sides = 2)
    -

    Arguments

    +

    Arguments

    @@ -135,23 +155,23 @@

    Details

    One of downsamplefactor, frequency or deltat must be specified. downsamplefactor will take priority when available.

    -

    See filter for details about sides argument. +

    See filter for details about sides argument. sides=1 (ie backwards) makes sense if you want to measure the start of a peak (latency). sides=2 (centred, the default) makes sense if you want to measure the mid-timepoint of the peak itself.

    See also

    -

    window,filter

    +

    Examples

    -
    x=ts(rnorm(10000)+sin(1:10000/100),start=0,deltat=0.01) +
    x=ts(rnorm(10000)+sin(1:10000/100),start=0,deltat=0.01) # smoothed xs=smooth_decimate(x,filterlength=100,downsamplefactor=10,start=1,end=99) # smoothed with causal filter (past values only) xsc=smooth_decimate(x,filterlength=100,downsamplefactor=10,start=1,end=99,sides=1) -plot(x)
    lines(xs,col='magenta')
    lines(xsc,col='green')
    +plot(x)
    lines(xs,col='magenta')
    lines(xsc,col='green')
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/smpsth.html b/docs/reference/smpsth.html index 91aa6ed..d4ba302 100644 --- a/docs/reference/smpsth.html +++ b/docs/reference/smpsth.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Generate smooth PSTHs for a set of spike trains — smpsth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +94,24 @@ -
    +
    +

    Generate smooth PSTHs for a set of spike trains

    +
    -
    smpsth(spikes, breaks = c(bw = 0.5, step = 0.05), CI = 0.95,
    +    
    smpsth(spikes, breaks = c(bw = 0.5, step = 0.05), CI = 0.95,
       stimRange = NULL, ...)
    -

    Arguments

    +

    Arguments

    @@ -122,13 +142,13 @@

    Value

    See also

    -

    STAR::psth, STAR::plot.psth, spiketimes

    +

    STAR::psth, STAR::plot.psth, spiketimes

    Examples

    spikes=CollectSpikesFromSweeps( - system.file('igor','spikes','nm20120917c1',package='gphys'), - subdir="BLOCKA",stimRange=c(2000,2500)) + system.file('igor','spikes','nm20120917c1',package='gphys'), + subdir="BLOCKA",stimRange=c(2000,2500)) smpsth(spikes)
    #> $cVA #> $freq #> [1] 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667 0.6666667 @@ -1651,9 +1671,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -1663,12 +1681,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/spiketimes.html b/docs/reference/spiketimes.html index 238a242..0223214 100644 --- a/docs/reference/spiketimes.html +++ b/docs/reference/spiketimes.html @@ -1,6 +1,6 @@ - + @@ -9,24 +9,27 @@ Make spiketimes object (spike times + stimulus info) from list of dataframes — spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -83,12 +99,15 @@ -
    +
    +

    spiketimes objects consist of a list of dataframes reporting the time of spikes. the data frames have two core columns Time and Wave. Time is the time @@ -97,10 +116,11 @@

    Make spiketimes object (spike times + stimulus info) from list of dataframes Wave must have an entry, so if there are no spikes in e.g. Wave 2, an entry of (Time=NA,Wave=2) will be required.

    +

    spiketimes(x, xlim, stimRange)
    -

    Arguments

    +

    Arguments

    @@ -127,19 +147,19 @@

    Details block of waves that is repeated within a single pxp file or compatible blocks from multiple pxp files. Use split.spiketimes to split a spiketimes object loaded from a pxp file with repeated blocks and -+.spiketimes to combine compatible blocks. - CollectSpikesFromSweeps will generate a spiketimes object for ++.spiketimes to combine compatible blocks.

    +

    CollectSpikesFromSweeps will generate a spiketimes object for you, so this function will only needed if you are constructing spiketimes objects from scratch.

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -164,12 +184,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/split.spiketimes.html b/docs/reference/split.spiketimes.html index 4b03933..6483e6a 100644 --- a/docs/reference/split.spiketimes.html +++ b/docs/reference/split.spiketimes.html @@ -1,6 +1,6 @@ - + @@ -10,32 +10,39 @@ repeat — split.spiketimes • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -81,22 +97,26 @@ -
    +
    +

    Deprecated as of gphys 0.9 and will be removed from gphys 1.0 (CRAN release).

    +
    # S3 method for spiketimes
    -split(x, f, drop, ...)
    +split(x, f, drop, ...) -

    Arguments

    +

    Arguments

    @@ -128,11 +148,11 @@

    Details

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -149,9 +169,7 @@

    Contents

    Author

    - -jefferis - +

    jefferis

    @@ -161,12 +179,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/subset.spiketimes.html b/docs/reference/subset.spiketimes.html index d7b31a5..26fab74 100644 --- a/docs/reference/subset.spiketimes.html +++ b/docs/reference/subset.spiketimes.html @@ -1,43 +1,47 @@ - + -Make a new spiketimes object containing only sweeps for an odour subset — subset.spiketimes • gphys +Subset spiketimes object to contain only sweeps for an odour subset — subset.spiketimes • gphys - + - - + + - + - + + + + - - - - + + + + +second parameter is specified it will be interpreted as vector of odours if +it is a character or channel ids if it is numeric." /> + + + - + + @@ -83,30 +96,31 @@ -
    +
    +

    NB the sweeps will be in the specified odour/channel order. If an unnamed -second parameter is specified it will be interpreted as vector of odours -if character or channel ids if numeric. -NB If an odour name is duplicated in the oddconfig (e.g. ctr or oil, often) -then it is not possible to use them in a subset expression and the channel -number must be used instead.

    +second parameter is specified it will be interpreted as vector of odours if +it is a character or channel ids if it is numeric.

    +
    # S3 method for spiketimes
     subset(x, odours = NULL, channels = NULL, ...)
    -

    Arguments

    +

    Arguments

    - + @@ -118,7 +132,8 @@

    Ar

    - +
    x

    The old spiketimes object

    The original spiketimes object

    odours
    ...

    further arguments to be passed to or from other methods.

    further arguments to be passed to or from other methods (currently +ignored)

    @@ -126,13 +141,18 @@

    Value

    spiketimes object restricted to specified odours or channels

    +

    Details

    + +

    If an odour name is duplicated in the oddconfig (e.g. ctr or oil, often) then +a warning will be given and the first matching sweep(s) will be used.

    +

    See also

    -

    Other spiketimes: +.spiketimes, +

    @@ -143,13 +163,13 @@

    Contents

  • Value
  • +
  • Details
  • +
  • See also
  • Author

    - -jefferis - +

    jefferis

    @@ -159,12 +179,13 @@

    Author

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/tsp.nclamppxp.html b/docs/reference/tsp.nclamppxp.html index c0392f4..9a2d89b 100644 --- a/docs/reference/tsp.nclamppxp.html +++ b/docs/reference/tsp.nclamppxp.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ Get time series properties for an Nclamp pxp file — tsp.nclamppxp • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -79,20 +95,24 @@ -
    +
    +

    Details if path is a directory, then pxpnum must also be specified

    +
    tsp.nclamppxp(path, pxpnum, WaveToCheck = "RecordA0")
    -

    Arguments

    +

    Arguments

    @@ -115,11 +135,11 @@

    Value

    See also

    -

    tsp,tsp.igorwave

    +

    tsp,tsp.igorwave

    Examples

    -
    tsp.nclamppxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR"))
    #> start end frequency +
    tsp.nclamppxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR"))
    #> start end frequency #> 0.000 19.975 40.000
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/docs/reference/tsp.psth.html b/docs/reference/tsp.psth.html index 26731b8..0c86ee8 100644 --- a/docs/reference/tsp.psth.html +++ b/docs/reference/tsp.psth.html @@ -1,6 +1,6 @@ - + @@ -10,32 +10,39 @@ Checks that it is regularly sampled — tsp.psth • gphys - + - - + + - + - + + + + - - - + + + + + + - + + @@ -81,21 +97,25 @@ -
    +
    +

    Find start, end and frequency of a STAR psth object Checks that it is regularly sampled

    +
    tsp.psth(x)
    -

    Arguments

    +

    Arguments

    @@ -110,8 +130,8 @@

    Value

    See also

    -

    tsp

    -

    Other psth: as.ts.psth

    +

    tsp

    +

    Other psth: as.ts.psth

    @@ -134,12 +154,13 @@

    Contents

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + diff --git a/man/OdourResponseFromSpikes.Rd b/man/OdourResponseFromSpikes.Rd index f3c1f8e..fc28d55 100644 --- a/man/OdourResponseFromSpikes.Rd +++ b/man/OdourResponseFromSpikes.Rd @@ -4,8 +4,8 @@ \alias{OdourResponseFromSpikes} \title{Produce table of spiking responses (optionally subtracting baseline)} \usage{ -OdourResponseFromSpikes(spiketimes, responseWindow, baselineWindow = NULL, - freq = FALSE) +OdourResponseFromSpikes(spiketimes, responseWindow, + baselineWindow = NULL, freq = FALSE) } \arguments{ \item{spiketimes}{list of spiketimes collected by CollectSpikesFromSweeps} @@ -44,3 +44,4 @@ Other OdourResponse: \code{\link{PlotOdourResponseFromSpikes}} \author{ jefferis } +\concept{OdourResponse} diff --git a/man/PlotOdourResponseFromSpikes.Rd b/man/PlotOdourResponseFromSpikes.Rd index 449d24d..54e0b01 100644 --- a/man/PlotOdourResponseFromSpikes.Rd +++ b/man/PlotOdourResponseFromSpikes.Rd @@ -4,8 +4,8 @@ \alias{PlotOdourResponseFromSpikes} \title{Boxplot of spikes within a window (optionally less a baseline)} \usage{ -PlotOdourResponseFromSpikes(spiketimes, responseWindow, baselineWindow = NULL, - freq = FALSE, PLOTFUN = stripchart, ...) +PlotOdourResponseFromSpikes(spiketimes, responseWindow, + baselineWindow = NULL, freq = FALSE, PLOTFUN = stripchart, ...) } \arguments{ \item{spiketimes}{list of spiketimes collected by CollectSpikesFromSweeps} @@ -47,3 +47,4 @@ Other OdourResponse: \code{\link{OdourResponseFromSpikes}} \author{ jefferis } +\concept{OdourResponse} diff --git a/man/PlotRasterFromSweeps.Rd b/man/PlotRasterFromSweeps.Rd index 64756cb..ab5c504 100644 --- a/man/PlotRasterFromSweeps.Rd +++ b/man/PlotRasterFromSweeps.Rd @@ -3,17 +3,17 @@ \name{PlotRasterFromSweeps} \alias{PlotRasterFromSweeps} \alias{plot.spiketimes} -\alias{plot.spiketimes} \title{Make a raster plot from a set of Nclamp sweeps recording odour responses} \usage{ PlotRasterFromSweeps(sweepdir, sweeps, subdir = "", subset = NULL, xlim = NULL, xaxis = TRUE, yaxis = TRUE, frame.plot = TRUE, - xaxs = "i", yaxs = "i", main, sub, xlab = "Time/ms", ylab = "Odour", - pch = 22, dotcolour = "black", dotsize = 0.5, dotwidth = 20, - spikeheight = 0.8, odourRange = NULL, odourCol = rgb(1, 0.8, 0.8, 1), - relabelfun = identity, fixChannels = NULL, IncludeChannels = FALSE, - PlotSpikes = TRUE, PlotDividers = TRUE, DividerCol = "black", - DividerLwd = 0.5, panel.first = NULL, panel.last = NULL, ...) + xaxs = "i", yaxs = "i", main, sub, xlab = "Time/ms", + ylab = "Odour", pch = 22, dotcolour = "black", dotsize = 0.5, + dotwidth = 20, spikeheight = 0.8, odourRange = NULL, + odourCol = rgb(1, 0.8, 0.8, 1), relabelfun = identity, + fixChannels = NULL, IncludeChannels = FALSE, PlotSpikes = TRUE, + PlotDividers = TRUE, DividerCol = "black", DividerLwd = 0.5, + panel.first = NULL, panel.last = NULL, ...) \method{plot}{spiketimes}(x, ...) } @@ -86,8 +86,6 @@ plotted} \item{x}{A spiketimes object} } \description{ -Make a raster plot from a set of Nclamp sweeps recording odour responses - This overloads base R's plot and calls PlotRasterFromSweeps } \details{ diff --git a/man/as.mpsth.Rd b/man/as.mpsth.Rd index eccf11d..d23777a 100644 --- a/man/as.mpsth.Rd +++ b/man/as.mpsth.Rd @@ -26,3 +26,4 @@ Other mpsth: \code{\link{[.mpsth}}, \author{ jefferis } +\concept{mpsth} diff --git a/man/as.repeatedTrain.Rd b/man/as.repeatedTrain.Rd index 8b31a84..56dbc9f 100644 --- a/man/as.repeatedTrain.Rd +++ b/man/as.repeatedTrain.Rd @@ -3,7 +3,6 @@ \name{as.repeatedTrain} \alias{as.repeatedTrain} \alias{as.repeatedTrain.spiketimes} -\alias{as.repeatedTrain} \title{Generic function to convert spikes to STAR as.repeatedTrain objects} \usage{ as.repeatedTrain(x, ...) @@ -19,8 +18,6 @@ as.repeatedTrain(x, ...) repeatedTrain object (list of numeric vectors) } \description{ -Generic function to convert spikes to STAR as.repeatedTrain objects - The STAR (Spike Train Analysis with R) package has a large number of useful functions for e.g. PSTH analysis. Note that the spiketimes objects are a list of data frames, where each list diff --git a/man/as.ts.mpsth.Rd b/man/as.ts.mpsth.Rd index 51fd443..a4e93a3 100644 --- a/man/as.ts.mpsth.Rd +++ b/man/as.ts.mpsth.Rd @@ -33,3 +33,4 @@ Other mpsth: \code{\link{[.mpsth}}, \code{\link{as.mpsth}} \author{ jefferis } +\concept{mpsth} diff --git a/man/as.ts.psth.Rd b/man/as.ts.psth.Rd index 2490ccf..379ea13 100644 --- a/man/as.ts.psth.Rd +++ b/man/as.ts.psth.Rd @@ -19,3 +19,4 @@ Convert a STAR psth into a (multi) time series object \seealso{ Other psth: \code{\link{tsp.psth}} } +\concept{psth} diff --git a/man/divide.Rd b/man/divide.Rd index 7d0dc2c..5a2701a 100644 --- a/man/divide.Rd +++ b/man/divide.Rd @@ -50,3 +50,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \author{ jefferis } +\concept{spiketimes} diff --git a/man/finder_colour.Rd b/man/finder_colour.Rd index 740210d..91a6a38 100644 --- a/man/finder_colour.Rd +++ b/man/finder_colour.Rd @@ -23,3 +23,4 @@ Other finder_colour: \code{\link{finder_colour_fast}}, \author{ jefferis } +\concept{finder_colour} diff --git a/man/finder_colour_fast.Rd b/man/finder_colour_fast.Rd index 3f4b55c..36abdb3 100644 --- a/man/finder_colour_fast.Rd +++ b/man/finder_colour_fast.Rd @@ -26,3 +26,4 @@ Other finder_colour: \code{\link{finder_colour}}, \author{ jefferis } +\concept{finder_colour} diff --git a/man/is.spiketimes.Rd b/man/is.spiketimes.Rd index 78aca09..c7c857a 100644 --- a/man/is.spiketimes.Rd +++ b/man/is.spiketimes.Rd @@ -22,3 +22,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \code{\link{split.spiketimes}}, \code{\link{subset.spiketimes}} } +\concept{spiketimes} diff --git a/man/merge.spiketimes.Rd b/man/merge.spiketimes.Rd index 49701d9..466003a 100644 --- a/man/merge.spiketimes.Rd +++ b/man/merge.spiketimes.Rd @@ -27,3 +27,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \code{\link{split.spiketimes}}, \code{\link{subset.spiketimes}} } +\concept{spiketimes} diff --git a/man/open-brace-psth.Rd b/man/open-brace-psth.Rd index dd106f9..ebe3fae 100644 --- a/man/open-brace-psth.Rd +++ b/man/open-brace-psth.Rd @@ -20,3 +20,4 @@ Extract one or more psth objects to make a new mpsth list Other mpsth: \code{\link{as.mpsth}}, \code{\link{as.ts.mpsth}} } +\concept{mpsth} diff --git a/man/open-brace-spiketimes.Rd b/man/open-brace-spiketimes.Rd index 36a987b..2559477 100644 --- a/man/open-brace-spiketimes.Rd +++ b/man/open-brace-spiketimes.Rd @@ -23,3 +23,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \code{\link{split.spiketimes}}, \code{\link{subset.spiketimes}} } +\concept{spiketimes} diff --git a/man/plot.mpsth.Rd b/man/plot.mpsth.Rd index d30e1db..16bea44 100644 --- a/man/plot.mpsth.Rd +++ b/man/plot.mpsth.Rd @@ -5,9 +5,9 @@ \title{Plot PSTHs for multiple neurons (or multiple stimuli)} \usage{ \method{plot}{mpsth}(x, stimTimeCourse = NULL, colStim = "grey80", - colCI = NULL, xlab = "Time /s", ylab = "Spike Freq /Hz", xlim, ylim, - lwd = 2, col = 1, labels = NULL, toplot = c("lines", "CI", "legend"), - ...) + colCI = NULL, xlab = "Time /s", ylab = "Spike Freq /Hz", xlim, + ylim, lwd = 2, col = 1, labels = NULL, toplot = c("lines", "CI", + "legend"), ...) } \arguments{ \item{x}{a list of psth objects (class mpsth)} diff --git a/man/plus-spiketimes.Rd b/man/plus-spiketimes.Rd index 26f13ee..e69c0a3 100644 --- a/man/plus-spiketimes.Rd +++ b/man/plus-spiketimes.Rd @@ -33,3 +33,4 @@ Other spiketimes: \code{\link{[.spiketimes}}, \author{ jefferis } +\concept{spiketimes} diff --git a/man/read.odd.Rd b/man/read.odd.Rd index c1dc81e..e483221 100644 --- a/man/read.odd.Rd +++ b/man/read.odd.Rd @@ -4,7 +4,8 @@ \alias{read.odd} \title{Read in the ODD text file describing odour presentation sequence} \usage{ -read.odd(oddfile, fill = TRUE, stringsAsFactors = FALSE, Verbose = FALSE) +read.odd(oddfile, fill = TRUE, stringsAsFactors = FALSE, + Verbose = FALSE) } \arguments{ \item{oddfile}{Path to ODD file} diff --git a/man/set_finder_colour.Rd b/man/set_finder_colour.Rd index ec80f5f..c9616e8 100644 --- a/man/set_finder_colour.Rd +++ b/man/set_finder_colour.Rd @@ -5,8 +5,8 @@ \title{Set the colour label of a file in the MacOS X Finder See http://stackoverflow.com/questions/2435580/tagging-files-with-colors-in-os-x-finder-from-shell-scripts} \usage{ -set_finder_colour(filename, col = c("None", "Gray", "Grey", "Green", "Purple", - "Blue", "Yellow", "Red", "Orange")) +set_finder_colour(filename, col = c("None", "Gray", "Grey", "Green", + "Purple", "Blue", "Yellow", "Red", "Orange")) } \arguments{ \item{filename}{Character vector of file(s) to add colour labels} @@ -27,3 +27,4 @@ Other finder_colour: \code{\link{finder_colour_fast}}, \author{ jefferis } +\concept{finder_colour} diff --git a/man/spiketimes.Rd b/man/spiketimes.Rd index 3e159ad..18f78bd 100644 --- a/man/spiketimes.Rd +++ b/man/spiketimes.Rd @@ -43,3 +43,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \code{\link{split.spiketimes}}, \code{\link{subset.spiketimes}} } +\concept{spiketimes} diff --git a/man/split.spiketimes.Rd b/man/split.spiketimes.Rd index c95773d..07c6e26 100644 --- a/man/split.spiketimes.Rd +++ b/man/split.spiketimes.Rd @@ -37,3 +37,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \author{ jefferis } +\concept{spiketimes} diff --git a/man/subset.spiketimes.Rd b/man/subset.spiketimes.Rd index b1fcc5a..f5783f0 100644 --- a/man/subset.spiketimes.Rd +++ b/man/subset.spiketimes.Rd @@ -39,3 +39,4 @@ Other spiketimes: \code{\link{+.spiketimes}}, \author{ jefferis } +\concept{spiketimes} diff --git a/man/tsp.psth.Rd b/man/tsp.psth.Rd index 51c2dd4..bef4bd0 100644 --- a/man/tsp.psth.Rd +++ b/man/tsp.psth.Rd @@ -22,3 +22,4 @@ tsp Other psth: \code{\link{as.ts.psth}} } +\concept{psth}