Skip to content

Commit

Permalink
Predefined length of a vector used in implementation of Spearman's rank
Browse files Browse the repository at this point in the history
correlation.
  • Loading branch information
przemyslawj committed Dec 16, 2016
1 parent 8b2b852 commit 381c0c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/isi.R
Expand Up @@ -47,11 +47,11 @@ isi.spearman.rank.corr <- function(spike.train, chunk.length=100) {
n <- length(isi)

chunk.count <- ceiling(n / chunk.length)
if (chunk.count == 0) {
if (n < 2) {
return(0)
}

rho <- c()
rho <- rep(0, chunk.count)
for (i in 1:chunk.count) {
index.start <- (i - 1) * chunk.length + 1
index.end <- min(i * chunk.length, n)
Expand Down

0 comments on commit 381c0c7

Please sign in to comment.