Reorder a sampling curve object, optionally subsampling a given fraction

subsample(x, fraction = 1)

Arguments

x

A samplingcurve object or a neuron specification that can be passed to make_rand_sampling_curve.

fraction

A fraction from 0-1 specifying the proportion of connections to keep in the sample.

Value

A new samplingcurve object

Examples

scuniform=samplingcurve(sample(1:20, size=200, replace=TRUE)) hist(scuniform)
head(scuniform)
#> new partner #> 1 1 15 #> 2 2 9 #> 3 3 18 #> 4 3 9 #> 5 4 12 #> 6 5 16