I'm trying to list all objects/variables/dataframes in a drake plan's environment that match a certain condition. However, when I try to use ls() for this, I'm returned an error.
How could I do this instead?
I'm trying to list all objects/variables/dataframes in a drake plan's environment that match a certain condition. However, when I try to use ls() for this, I'm returned an error.
How could I do this instead?
drakechildproofs the calling environment ofmake()and maintains a formal hierarchy of environments for actually evaluating code. This behavior is mostly a safeguard against side effects that could violate its functional programming assumptions (e.g. commands act like pure functions and targets are immutable). You can accessdrake's environments with thedrake_envir()function. Unless you are using dynamic branching, you probably wantls(envir = drake_envir(which = "targets")).