all.equal method tailored to dotprops objects

# S3 method for dotprops all.equal(target, current, check.attributes = FALSE, absoluteVectors = TRUE, ...)

target, current | dotprops objects to compare |
---|---|

check.attributes | Whether to check attributes (false by default) |

absoluteVectors | Whether to check only the absolute value of eigenvectors for equality (default TRUE, see details) |

... | Additional arguments passed to base |

This method is required because the direction vectors are computed using an eigenvector decomposition where the sign of the eigenvector is essentially random and subject to small numerical instabilities. Therefore it does not usually make sense to check the value of vect exactly.

# equal using default kc1=kcs20[[1]] kc1.recalc=dotprops(kc1) # not equal due to differences in attributes and vectors all.equal.default(kc1.recalc, kc1)#> [1] "Component “vect”: Mean relative difference: 0.5218482"# still not equal because of tangent vector flipping all.equal.default(kc1.recalc, kc1, check.attributes=FALSE)#> [1] "Component “vect”: Mean relative difference: 0.5218482"