yihui / xfun

Miscellaneous R functions
https://yihui.org/xfun/
Other
135 stars 28 forks source link

proj_root is not working correctly #54

Closed clarkliming closed 3 years ago

clarkliming commented 3 years ago

proj_root is not using all rules to identify root. https://github.com/yihui/xfun/blob/14161366946beb14866907c999cd9533b03a8665/R/paths.R#L114 you are using seq_along(nrow(rules)) which will return a number only (1), should use seq_len(nrow(rules))