Closed martinamorris closed 3 years ago
I'll investigate this. Your egor
object only has ego and alter data, no alter-alter data, right?
In the meantime: Can you please try if the following works to obtain the subset you are looking for?
ego_main_all %>%
activate(alter) %>%
filter(keep_active == 1)
I was able to replicate this. The issue is caused by egor()
creating an empty aatie tibble
with numeric variables, when no aaties are specified by the user. The activate()
+ filter()
strategy works regardless.
I'll push a fix for this to github in a few minutes.
@martinamorris Thank you very much for reporting. I recommend using activate()
+ filter()
(as shown in my previous comment) for your data until the next version egor hits CRAN.
Another temporary fix you can employ would be to change the class of ego_main_all$aatie$.egoID
to character
. Similar to what you tried before for the other .egoID
s.
ego_main_all$aatie$.egoID <- as.character(ego_main_all$aatie$.egoID)
Thx!
hey, this is kind of urgent, as it's blocking work for us. we need to subset egor objects by an alter attribute.
your example for subset uses the
egor32
data:which works. Note from the output that the
.egoID
var in both theego
andalter
dfs are both classfactor
.But in my case, after building the
egor
object using a numeric vector for the ego and alter IDs:And when I try to subset by an alter attribute:
It also doesn't work if I change the class of the .xxxID vars
So I'm stumped