Description Usage Arguments Details Value Author(s) See Also Examples
Groups each column in a matrix into several bins of a given length for better (and faster) data plotting
1 |
f |
A vector or a matrix |
lineTime |
Line (row) acquisition rate (in seconds) |
nIntervals |
Number of intervals into which the all columns will be grouped |
columns |
Number of columns of the resulting binned matrix |
mode |
Set to "mean" (default) or "sum" to average or sum all the points in every interval, respectively |
plot |
Boolean, set to TRUE (default) to plot the result |
This function groups all the points in each column of the matrix 'f' into 'nIntervals' bins of length = length(f)/nIntervals. Then, averages or sums all of the points in each bin and plots the result. If 'f' is a vector, 'columns' is used to build the resulting matrix. If 'f' is a matrix, then 'columns' takes the value of the number of columns in 'f'.
A matrix of 'nIntervals' rows
Alejandro Linares
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ### Please navigate to
### (https://github.com/FCSlib/FCSlib/tree/master/Sample%20Data)
### to find this sample data
# Automatic plot
x <- read.table("Pax.dat")
x <- binMatrix(x[,1], lineTime = 1e-3, nIntervals = 500,
columns = 64, mode = "mean", plot = T)
# Manual plot (useful for adding custom labels)
x <- read.table("Pax.dat")
x <- binMatrix(x[,1], lineTime = 1e-3, nIntervals = 500,
columns = 64, mode = "mean", plot = F)
image.plot(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.