Apply the representation of one tf-object to another; i.e. re-express it in
the other's basis, on its grid, etc.
Useful for making different functional data objects compatible so they can
be combined, compared or computed with.
Value
a tf-vector containing the data of object in the same representation
as basis_from (potentially modified by the arguments given in ...).
Details
This uses double dispatch (S3) internally, so the methods defined below are
themselves generics for methods tf_rebase.tfd.tfd,
tf_rebase.tfd.tfb_spline, tf_rebase.tfd.tfb_fpc, tf_rebase.tfb.tfd,
tf_rebase.tfb.tfb that dispatch on object_from.
Methods (by class)
tf_rebase(tfd): re-express atfd-vector in the same representation as some othertf-vectortf_rebase(tfb): re-express atfb-vector in the same representation as some othertf-vector.
Examples
x <- tf_rgp(3)
xb <- tfb(x, k = 8, penalized = FALSE, verbose = FALSE)
tf_rebase(tf_rgp(3), xb)
#> tfb[3]: [0,1] -> [-1.307387,1.384965] in basis representation:
#> using s(arg, bs = "cr", k = 8, sp = NA)
#> 1: ▆▆▆▆▆▆▆▆▅▅▄▄▃▂▂▁▁▁▁▁▂▃▄▄▅▆
#> 2: ▂▃▄▆▆▇█████▇▆▆▅▃▂▁▁▁▁▁▁▂▂▃
#> 3: ▆▆▆▇▇▇▇▇▇▇▆▅▄▄▃▂▂▂▂▂▂▃▃▄▄▅