NEWS
gradecode 0.1.3
- Added
standardize_arguments() function which adds names and default values to arguments in code (#67).
- XML results from
gradecode functions now inherit the gradecode_xml class in addition to their more specific class (gradecode_xml_node, gradecode_xml_nodeset or gradecode_xml_list) (#64).
gradecode 0.1.2
fail_if_not_found() and fail_if_found() now take a ... argument, which is passed to fail() (#63).
gradecode 0.1.1
New functions
- Added
find_argument_values(), which finds the values of named or unnamed arguments (#52).
- e.g.
find_argument_values("mean(1:10, na.rm = TRUE)") will return 1:10 and TRUE.
- Added
find_parent(), which finds the expression containing a previously found expression (#54).
- e.g.
mean(1:10, na.rm = TRUE) %>% find_operators(":") %>% find_parent() will return 1:10 (the expression containing the : operator).
New features
find_arguments() can now take a character vector as a match argument (#48).
- If
match is a character vector, arguments are found by argument name, regardless of their value.
- e.g.
find_arguments(match = "na.rm") can find the na.rm argument of mean(x, na.rm = TRUE) and mean(x, na.rm = FALSE).
- Calling
find_arguments() multiple times in a row now returns the same arguments each time (#62).
- Added
as.list() and as_tibble() methods for gradecode_found objects (#49).
- XML results from
gradecode functions now have the class gradecode_xml_node, gradecode_xml_nodeset or gradecode_xml_list (#53).
- These classes have their own print methods.
Improvements
find_*() functions now attempt to reconstruct the original user code if their user_code argument is an XML object instead of a character string (#49).
uses_argument() can now take a recurse argument like find_arguments() (#48).
gradecode 0.1.0