Specifically, to_keep is a boolean vector of the length of the original funs identifying ones to keep; funs_to_keep is a shorter vector of just the kept ones. Reassigning names(srcrefs) <- funs_to_keepbefore subsetting srcrefs assigns the wrong names to the wrong references; then subsetting them leaves a smattering of nonsense function names. I think it should be:
(If you made it into a tibble or dataframe before filtering out uninteresting functions, and then added the extra columns, this would all be a lot easier and less error-prone?)
I suspect this is related to how I'm getting completely wrong source context in my stack traces...?
DISCLAIMER: I'm new to R and could be totally off base. But I believe this code is badly erroneous:
Specifically,
to_keep
is a boolean vector of the length of the originalfuns
identifying ones to keep;funs_to_keep
is a shorter vector of just the kept ones. Reassigningnames(srcrefs) <- funs_to_keep
before subsettingsrcrefs
assigns the wrong names to the wrong references; then subsetting them leaves a smattering of nonsense function names. I think it should be:(If you made it into a tibble or dataframe before filtering out uninteresting functions, and then added the extra columns, this would all be a lot easier and less error-prone?)
I suspect this is related to how I'm getting completely wrong source context in my stack traces...?