The function search_abstract_syntax_tree should be a recursive call that checks all abstract syntax tree branches and finds the function calls. This function should use the the lobstr package
The function get_packages should extract available packages from the installed packages context
The function add_namespace should take a single ast string with the function call and replace the function name with the namespace::function name
for instance read_csv -> readr::read_csv.
The function search_namespace should search package namespace to see it there is a name
The function extract_function_namespace should loop over existing namespaces and try to find the namespace that has the function name within in by using search_namespace. The return value here should be the namespace string that will be subbing the function name without the namespace.
Each function should have a unit test that tells us that the functionality works correctly.
@olciila if you need any other information, feel free to set the questions below
The function
search_abstract_syntax_tree
should be a recursive call that checks all abstract syntax tree branches and finds the function calls. This function should use the thelobstr
packageThe function
get_packages
should extract available packages from the installed packages contextThe function
add_namespace
should take a single ast string with the function call and replace the function name with thenamespace::function name
for instanceread_csv
->readr::read_csv
.The function
search_namespace
should search package namespace to see it there is a name The functionextract_function_namespace
should loop over existing namespaces and try to find the namespace that has the function name within in by usingsearch_namespace
. The return value here should be the namespace string that will be subbing the function name without the namespace.Each function should have a unit test that tells us that the functionality works correctly.
@olciila if you need any other information, feel free to set the questions below