knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

```r

library(ggplot2)

library(Rcpp)

library(mmnst)

```

Introduction

Write something about

$\;$

Step 0B: Loading the data into R and initial data cleaning

SpikeTrainFileName = 'data.LGN.txt' # For batch mode, this line is commented out because spike train file name is created before running this script
trials.to.drop = c()
spikes = dget(paste(SpikeTrainFileName,sep=''))
for(i in 1:length(spikes)){
  temp = spikes[[i]]
  temp = temp[temp>0]
  spikes[[i]] = temp
  if (length(spikes[[i]]) <= 5) trials.to.drop = c(trials.to.drop , i)
}
if(!is.null(trials.to.drop)) spikes=spikes[-trials.to.drop]

length(spikes) #number of trains
hist(unlist(lapply(spikes, length))) 


dpwynne/mmnst documentation built on Aug. 1, 2023, 8:08 a.m.