jay.read.spikes            package:sjemea            R Documentation

_R_e_a_d _i_n _t_h_e ._t_x_t _f_i_l_e _f_r_o_m _N_e_u_r_o_e_x_p_l_o_r_e_r _a_n_d _c_r_e_a_t_e _a "_s_p_i_k_e_s" _d_a_t_a _s_t_r_u_c_t_u_r_e.

_D_e_s_c_r_i_p_t_i_o_n:

     Read in .txt file and work out array positions...

_U_s_a_g_e:

     jay.read.spikes(filename)

_A_r_g_u_m_e_n_t_s:

filename: Name of the text file to be read in.

_V_a_l_u_e:

     Return the data structure 's'.

_M_E_T_H_O_D:

     No fancy tricks used here.  If the data file has information about
     N different spike trains, the file has N (tab-separated) columns. 
     Each column then gives the time (in seconds?) of each spike. 
     Different columns are of different lengths since typically each
     cell will have a different number of spikes.

     The txt file of spike times can be compressed (with gzip).

_R_e_f_e_r_e_n_c_e_s:

     No references here.

_S_e_e _A_l_s_o:

     'sanger.read.spikes'

_E_x_a_m_p_l_e_s:

     data.file <- system.file("examples", "P9_CTRL_MY1_1A.txt",
                              package = "sjemea")
     s <- jay.read.spikes( data.file)
     fourplot(s)
     s <- jay.read.spikes( data.file, beg=400, end=700)
     fourplot(s)
     ## Not run: 
     s <- jay.read.spikes("/home/stephen/ms/jay/p9data.txt")
     fourplot(s)                             #summary plot.
     s$mi <- make.mi(s)
     show.prob.t.r(s)                        #conditional distributions.
     ## End(Not run)

     ## Not run: crosscorrplots(s, autocorr=T, tmax=3, nbins=100,
                    xcorr.nrows=3, xcorr.ncols=3) #plot autocorrs on screen

     ## Plotting just one cross-correlogram is a slightly different matter:
     xcorr.plot( s$spikes[[1]], s$spikes[[2]], "1 v 2")## End(Not run)

