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

`tfb` edge cases #139

Open m-muecke opened 2 weeks ago

m-muecke commented 2 weeks ago
tf::tfb()
#> tfb[0] on (0,0) in basis representation:
#>  using
tf::tfb(1)
#> Error in new_tfb_spline(data, domain = domain, penalized = penalized, : Assertion on 'domain' failed: Contains duplicated values, position 2.
tf::tfb(1:2)
#> Warning in smooth.construct.cr.smooth.spec(s_spec, data = data_frame(arg = arg_u$x, : basis dimension, k, increased to minimum possible
#> Error in smooth.construct.cr.smooth.spec(s_spec, data = data_frame(arg = arg_u$x, : arg has insufficient unique values to support 3 knots: reduce k.
tf::tfb(1:3)
#> Percentage of input data variability preserved in basis representation
#> (per functional observation, approximate):
#> Min. 1st Qu.  Median Mean 3rd Qu.  Max.
#> 100 100 100 100 100 100
#> tfb[1] on (1,3) in basis representation:
#>  using  s(arg, bs = "cr", k = 3, sp = -1)  
#> 1: (1,1);(2,2);(3,3)

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

fabian-s commented 2 weeks ago

:see_no_evil: thanks!