Error in p_cf$prediction : $ operator is invalid for atomic vectors
dbroockman opened this issue · comments
David Broockman commented
I installed the package and its dependencies and ran the following example based on the readme https://github.com/xnie/rlearner#example-usage:
library(rlearner)
library(zeallot)
n = 100
data = toy_data_simulation(n)
model_specs = list(
glmnet = list(
tune_grid = expand.grid(
alpha=c(0,0.5,1),
lambda=exp(seq(-5,2,0.2))),
extra_args = list())
)
r_fit = rlearner_cv(data$x, data$w, data$y, tau_model_specs=model_specs)
I get this error:
Error in p_cf$prediction : $ operator is invalid for atomic vectors
(I am getting the same error when using my own data.)
Yongli Zhang commented
I used rlearner long time ago, so I cannot remember the details.
Maybe you need to install and load the following two packages
library(causalLearning)
library(magrittr)
Yongli
…On Tue, Aug 18, 2020 at 10:49 AM David Broockman ***@***.***> wrote:
I installed the package and its dependencies and ran the following example
based on the readme https://github.com/xnie/rlearner#example-usage:
library(rlearner)
library(zeallot)
n = 100
data = toy_data_simulation(n)
model_specs = list(
glmnet = list(
tune_grid = expand.grid(
alpha=c(0,0.5,1),
lambda=exp(seq(-5,2,0.2))),
extra_args = list())
)
r_fit = rlearner_cv(data$x, data$w, data$y, tau_model_specs=model_specs)
I get this error:
Error in p_cf$prediction : $ operator is invalid for atomic vectors
(I am getting the same error when using my own data.)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOA2PLJUVW5AVUUA5HYBEE3SBKIGJANCNFSM4QDS6JBA>
.
David Broockman commented
Thanks. I added those and I still get the error.
Xinkun Nie commented
Thanks for bringing this to our attention! Due to version issues and package limitations, we are no longer supporting caret-based estimators, and are planning on updating the repository to reflect this change. However, this does not affect replicating the results from the paper as the paper does not use caret-based code.