Removes a number of lowest total abundace species from a dataset generated with generateDataSet. Note that the function uses the normalized dataset to decide which species to remove, but returns the absolute dataset.

removeLowAbundance(dataset, removeN)

Arguments

dataset

Abundance dataset

removeN

Number of species to remove

Value

Dataset without N lowest abundance species

Examples

klemm = generateA(N=10, type="klemm", c=0.5)
#> [1] "Adjusting connectance to 0.5" #> [1] "Initial edge number 79" #> [1] "Initial connectance 0.766666666666667" #> [1] "Number of edges removed 24" #> [1] "Final connectance 0.5" #> [1] "Final connectance: 0.5" #> [1] "Initial edge number 55" #> [1] "Initial connectance 0.5" #> [1] "Number of negative edges already present: 10" #> [1] "Converting 18 edges into negative edges" #> [1] "Final connectance: 0.5" #> [1] "Final arc number (excluding self-arcs) 45" #> [1] "Final negative arc number (excluding self-arcs) 18" #> [1] "PEP: 60"
dataset = generateDataSet(100, klemm)
#> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 9.69363e-17 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 9.69363e-17 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 9.69363e-17 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93873e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93873e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93873e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93873e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93078e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93078e-16 #> #> DLSODA- Warning..Internal T (=R1) and H (=R2) are #> such that in the machine, T + H = T on the next step #> (H = step size). Solver will continue anyway. #> In above message, R1 = 2.3644, R2 = 1.93078e-16 #> #> DLSODA- Above warning has been issued I1 times. #> It will not be issued again for this problem. #> In above message, I1 = 10 #> #> DLSODA- At current T (=R1), MXSTEP (=I1) steps #> taken on this call before reaching TOUT #> In above message, I1 = 5000 #> #> In above message, R1 = 2.3644 #>
#> Warning: an excessive amount of work (> maxsteps ) was done, but integration was not successful - increase maxsteps
#> Warning: Returning early. Results are accurate, as far as they go
#> Error in series[, 1001]: subscript out of bounds
dataset = removeLowAbundance(dataset, 10)
#> Error in apply(x, 2, sum): object 'dataset' not found