-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Basically BFS, something along the lines of
sample_snowball <- function(
users, hops,
direction = c(
"following",
"followed-by",
"both"
)) {
if (hops < 0)
stop("`hops` must be greater than zero.")
direction <- rlang::arg_match(direction)
for (user in users)
if (!users_in_cache(user))
add_users_to_cache(user)
# TODO: respect direction in the future
friends <- cache_get_friends(users)
sample_snowball(friends, hops - 1)
}
Metadata
Metadata
Assignees
Labels
No labels