Description Usage Arguments Value Examples
View source: R/sampling_curves.R
plot.samplingcurve
plots a standard sampling curve
lines.samplingcurve
adds a line for a sampling curve to
an existing plot. It can also add a specified number of re-randomised
versions of the curve, optionally producing a smoothed mean.
hist.samplingcurve
plots a histogram of connections per
partner neuron. strictly speaking this is a bar plot for a table object
rather than an R histogram
1 2 3 4 5 6 7 8 9 10 11 | samplingcurve(partners, N = NULL, m = NULL)
## S3 method for class 'samplingcurve'
plot(x, col = "red", ...)
## S3 method for class 'samplingcurve'
lines(x, rand = 0, mean = FALSE, lty = 3,
col = NULL, ..., colpal = "grey")
## S3 method for class 'samplingcurve'
hist(x, decreasing = TRUE, plot = TRUE, ...)
|
partners |
A vector or partner neuron identifiers (typically numeric such as CATMAID skeleton ids) |
N, m |
optional parameters describing the total number of connections and the total number of partners (if known). |
x |
A |
col |
line colour (see |
... |
Additional arguments to plotting functions |
rand |
number of randomised versions of curve to plot |
mean |
whether to plot the mean of specified number of random curves rather than each individual curve. |
lty |
line type (see |
colpal |
A colour palette. Either a function (see
|
decreasing |
Whether to plot the strongest connections closest to the y
axis (default |
plot |
Whether to show the histogram |
An object of class samplingcurve
, currently implemented as a
data.frame.
hist.samplingcurve
returns the table
of connections per
partner used for the plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | scuniform=samplingcurve(sample(1:20, size=200, replace=TRUE))
plot(scuniform)
# add 20 random realisations
lines(scuniform, rand=20)
# add a smooth mean
lines(scuniform, rand=1000, mean=TRUE, col='black')
# use real sample data for inputs to a lateral horn neuron
plot(pd2a1.1.sc)
lines(pd2a1.1.sc, rand=20)
scuniform=samplingcurve(sample(1:20, size=200, replace=TRUE))
hist(scuniform, main='20 neurons with equal connection probability')
hist(pd2a1.1.sc, main='Inputs to a lateral horn neuron')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.