[R] picewiseSEM undefined columns selected
kry|ov@r00t @end|ng |rom gm@||@com
Wed Nov 16 11:57:46 CET 2022
Hello Michael and thank you for providing a small reproducible example!
В Tue, 15 Nov 2022 22:23:30 +0100
"Michael Eisenring" <michael.eisenring using gmx.ch> пишет:
> model<-as.psem(modlist)#Error: Error in `[.data.frame`(x$data, ,
> vars) : undefined columns selected
If you set options(error = recover) before reproducing the error, you
can use the debugger to see the values of both x$data and vars at the
moment of crash. See ?recover, ?browser and the free book "R Inferno"
for more information.
I've taken a look, and I think that it's a bug in some of the functions
called by the internal function piecewiseSEM:::formatpsem. The internal
function GetData() returns a data.frame with column names of
c("Stratum", "Drought", "Year", "cbind(branch_suck_Yes,
branch_suck_No)", "N_pc", "Tree.ID"), which gets stored in x$data,
after which the function tries to extract variables named c("N_pc",
"branch_suck_Yes,branch_suck_No") from x$data.
I think you'll have to report this to the maintainer.
More information about the R-help