Skip to contents

Add new variables to the $fac. See examples and ?dplyr::mutate.

Usage

mutate(.data, ...)

Arguments

.data

a Coo, Coe, PCA object

...

comma separated list of unquoted expressions

Value

a Momocs object of the same class.

Details

dplyr verbs are maintained.

See also

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

Examples

olea
#> Opn (curves)
#>   - 210 curves, 99 +/- 3 coords (in $coo)
#>   - 4 classifiers (in $fac): 
#> # A tibble: 210 × 4
#>   var   domes view  ind  
#>   <fct> <fct> <fct> <fct>
#> 1 Aglan cult  VD    O10  
#> 2 Aglan cult  VL    O10  
#> 3 Aglan cult  VD    O11  
#> 4 Aglan cult  VL    O11  
#> 5 Aglan cult  VD    O12  
#> 6 Aglan cult  VL    O12  
#> # ℹ 204 more rows
#>   - also: $ldk
mutate(olea, id=factor(1:length(olea)))
#> Opn (curves)
#>   - 210 curves, 99 +/- 4 coords (in $coo)
#>   - 5 classifiers (in $fac): 
#> # A tibble: 210 × 5
#>   var   domes view  ind   id   
#>   <fct> <fct> <fct> <fct> <fct>
#> 1 Aglan cult  VD    O10   1    
#> 2 Aglan cult  VL    O10   2    
#> 3 Aglan cult  VD    O11   3    
#> 4 Aglan cult  VL    O11   4    
#> 5 Aglan cult  VD    O12   5    
#> 6 Aglan cult  VL    O12   6    
#> # ℹ 204 more rows
#>   - also: $ldk