You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example below, providing the data argument in the function call works with and without a scalar predictor (with a functional predictor in both cases). But piping a dataset in and using the . placeholder only works when there is no scalar predictor.
Any thoughts on why this might be the case?
Probably not critical at this juncture, since you can fit the model easily -- but might be nice to address.
library(refund)
library(tidyverse)
data(DTI)
DTI1<-DTI[DTI$visit==1& complete.cases(DTI),]
## WORKS: # functional predictor onlyfit.lf<-
pfr(pasat~ lf(cca, k=30, bs="ps"), data=DTI1)
# functional predictor only using pipesfit.lf<-DTI1 %>%
pfr(pasat~ lf(cca, k=30, bs="ps"), data=.)
# functional and scalar predictorfit.lf<-
pfr(pasat~case+ lf(cca, k=30, bs="ps"), data=DTI1)
## BREAKS:# functional and scalar predictorfit.lf<-DTI1 %>%
pfr(pasat~case+ lf(cca, k=30, bs="ps"), data=.)
#> Error in eval(call$data): object '.' not found
In the example below, providing the
data
argument in the function call works with and without a scalar predictor (with a functional predictor in both cases). But piping a dataset in and using the.
placeholder only works when there is no scalar predictor.Any thoughts on why this might be the case?
Probably not critical at this juncture, since you can fit the model easily -- but might be nice to address.
Created on 2023-03-15 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: