R/print_dir_ul.R
print_dir_ul.Rd
This function will create an unordered list of all the files in a directory and print the output. It should be used in conjunction with RMarkdown and knitr. Specifically, you want to call it within an R chunk that has the results set to 'asis'.
print_dir_ul(path = ".", remove = NULL, nested = FALSE)
# In any directory
print_dir_ul()
#> - Rplot001.png
#> - count_words.html
#> - create_project.html
#> - give_n_digits.html
#> - index.html
#> - mod_to_table.html
#> - myProject
#> - normal_approximation.html
#> - print_builder.html
#> - print_dir_ul.html
#> - print_model_param.html
#> - print_model_params.html
#> - print_model_params_p.html
#> - print_nmc_p.html
#> - print_pval.html
#> - round_pval.html
# To specify the path
print_dir_ul(path = "./")
#> - Rplot001.png
#> - count_words.html
#> - create_project.html
#> - give_n_digits.html
#> - index.html
#> - mod_to_table.html
#> - myProject
#> - normal_approximation.html
#> - print_builder.html
#> - print_dir_ul.html
#> - print_model_param.html
#> - print_model_params.html
#> - print_model_params_p.html
#> - print_nmc_p.html
#> - print_pval.html
#> - round_pval.html
# All files that are not .txt
print_dir_ul(remove = ".txt")
#> - Rplot001.png
#> - count_words.html
#> - create_project.html
#> - give_n_digits.html
#> - index.html
#> - mod_to_table.html
#> - myProject
#> - normal_approximation.html
#> - print_builder.html
#> - print_dir_ul.html
#> - print_model_param.html
#> - print_model_params.html
#> - print_model_params_p.html
#> - print_nmc_p.html
#> - print_pval.html
#> - round_pval.html