Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing tfd evaluator from variable can't find the function #115

Open
m-muecke opened this issue Aug 8, 2024 · 1 comment
Open

Passing tfd evaluator from variable can't find the function #115

m-muecke opened this issue Aug 8, 2024 · 1 comment

Comments

@m-muecke
Copy link
Collaborator

m-muecke commented Aug 8, 2024

library(tf)
#> 
#> Attaching package: 'tf'
#> The following objects are masked from 'package:stats':
#> 
#>     sd, var
x <- "tf_approx_linear"
tfd(1:10, evaluator = x)
#> Error in get(evaluator, mode = "function", envir = parent.frame()): object 'x' of mode 'function' was not found

Created on 2024-08-08 with reprex v2.1.1

@fabian-s
Copy link
Contributor

probably just need to adapt the code from tf_evaluator<-?

f <- "tf_approx_spline"
z <- tfd(1:10)
tf_evaluator(z) <- f
z
# tfd[1] on (1,10) based on 10 evaluations each
# interpolation by tf_approx_spline 

works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants