Skip to contents

Examples are self-speaking.

Usage

at_least(x, fac, N)

Arguments

x

any Momocs object

fac

the id of name of the $fac column

N

minimal number of individuals to retain the group

Value

a Momocs object of same class

Note

if N is too ambitious the original object is returned with a message

See also

Other handling functions: arrange(), chop(), combine(), dissolve(), fac_dispatcher(), filter(), mutate(), rename(), rescale(), rm_harm(), rm_missing(), rm_uncomplete(), rw_fac(), sample_frac(), sample_n(), select(), slice(), subsetize()

Examples

table(trilo$onto)
#> 
#>  a  b  c  d 
#>  7 16 18  9 
at_least(trilo, "onto", 9)
#> Out (outlines)
#>   - 43 outlines, 64 +/- 0 coords (in $coo)
#>   - 1 classifiers (in $fac): 
#> # A tibble: 43 × 1
#>   onto 
#>   <fct>
#> 1 b    
#> 2 b    
#> 3 b    
#> 4 b    
#> 5 b    
#> 6 b    
#> # ℹ 37 more rows
#>   - also: $ldk
at_least(trilo, "onto", 16)
#> Out (outlines)
#>   - 34 outlines, 64 +/- 0 coords (in $coo)
#>   - 1 classifiers (in $fac): 
#> # A tibble: 34 × 1
#>   onto 
#>   <fct>
#> 1 b    
#> 2 b    
#> 3 b    
#> 4 b    
#> 5 b    
#> 6 b    
#> # ℹ 28 more rows
#>   - also: $ldk
at_least(trilo, "onto", 2000) # too ambitious !
#> no group with at least 2000 indidivuals
#> empty Out