tidyfun / tf

S3 classes and methods for tidy functional data
https://tidyfun.github.io/tf/
GNU Affero General Public License v3.0
7 stars 2 forks source link

fix: allow single tfd, remove message for empty tfd constructor #144

Closed m-muecke closed 14 hours ago

m-muecke commented 1 day ago

Closes: https://github.com/tidyfun/tf/issues/138

Note: Added a workaround for abs(floor(log10(resolution))) for integer values since I'm not sure this behaves like the desired behaviour:

abs(floor(log10(1:100)))
#>   [1] 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#>  [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#>  [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2
abs(floor(log10(c(0.1, 0.01, 0.001, 1.001))))
#> [1] 1 2 3 0

Created on 2024-11-21 with reprex v2.1.1