Skip to content

Commit

Permalink
Update R/utils-get_code_dependency.R
Browse files Browse the repository at this point in the history
Co-authored-by: André Veríssimo <[email protected]>
Signed-off-by: Marcin <[email protected]>
  • Loading branch information
m7pr and averissimo authored Nov 29, 2024
1 parent bdf0e12 commit b5d412d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/utils-get_code_dependency.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@ extract_occurrence <- function(pd) {
}

# For cases like 'eval(expression(c <- b + 2))' removes 'eval(expression('.
sym_cond <- setdiff(
sym_cond,
sym_cond[sym_cond < min(assign_cond) & sym_cond %in% sym_fc_cond]
)
sym_cond <- sym_cond[!(sym_cond < min(assign_cond) & sym_cond %in% sym_fc_cond)]

# If there was an assignment operation detect direction of it.
if (unique(x$text[assign_cond]) == "->") { # What if there are 2 assignments: e.g. a <- b -> c.
Expand Down

0 comments on commit b5d412d

Please sign in to comment.