Open sfg opened 1 month ago
That doesn't create an error for us. Maybe you cut and pasted the code and there is a hidden character that was inserted?
Just try typing it directly and see if that solves the problem.
Thanks for pointing that out! Not sure what really the problem is, but it seems not to be a copy&paste problem. For me, in file "utilities.data.R", function "parseFormula" line 883 seems to return only .
, probably a problem with as.character()`:
f <- Surv(time, status) ~ .
and line 883:
all.vars(formula(paste(as.character(f)[2], "~ .")), max.names = 1e7)
[1] "."
but
all.vars(formula(paste(f[2], "~ .")), max.names = 1e7)
[1] "time" "status" "."
what is correct. So, on my system the function as.character() seems to cause the error. Best, Sven
That's what I thought. Thanks for the feedback, we will take a closer look.
Hi all,
with version 3.2.3 I got the following error using example from help page:
data(veteran, package = "randomForestSRC")
v.obj <- rfsrc(Surv(time, status) ~ ., data = veteran, ntree = 10, block.size = 1)
Error in parseFormula(formula, data, ytry) :
Survival formula incorrectly specified.
Any ideas? Thanks, Sven