A few additional functions to facilitate filtering of vectors
drop_zeros(x) positives(x) negatives(x) integers(x)
x | vector of numerics to be filtered |
---|
#> [1] -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.5 1.0 1.5 2.0 2.5 3.0positives(x)#> [1] 0.5 1.0 1.5 2.0 2.5 3.0negatives(x)#> [1] -3.0 -2.5 -2.0 -1.5 -1.0 -0.5integers(x)#> [1] -3 -2 -1 0 1 2 3