[R] as.spikeTrain

Peng Sian Goh bryangoh39 at hotmail.com
Fri Nov 3 14:50:29 CET 2017


Hi all,


I have recently used the as.spikeTrain function in the STAR Packages but instead of using the CAL1S data that could be found in the package, I used data from other sources.


I am able to convert the data into the required data frame but when I execute the as.spikeTrain function: datafile <- lapply(list_data,as.spikeTrain)


It will give this error:


Error in FUN(X[[i]], ...) :
  The elements of X[[i]] should be all different.

Error in FUN(X[[i]], ...) :
  X[[i]] should have strictly increasing elements.

I found out that as.spikeTrain will only work when the raw data (in txt, csv or any other format) doesnt contain numbers that are repeated and it numbers should also be arranged in increasing order.

May i know why the limitation?

As far as I understand by looking at other spiketrain datasets, the data doesnt follow the increasing trends and many have repeated numbers.

Do advice.

Thanks



Regards,


	[[alternative HTML version deleted]]



More information about the R-help mailing list