I tend to find files with dozens of functions. They don't read well. So I split a code file into multiple files each containing a single function.
split_code_file(
file,
output_directory = tempdir(),
encoding = getOption("encoding"),
write_to_disk = getOption("write_to_disk"),
keep_header = TRUE
)Invisibly a vector of paths to the new
files.
The code file to be split.
Where to create the new files.
The encoding passed to source.
Set the output_directory to
dirname(file)? Just a shortcut.
Keep a header found in your code file?
Other file utilities:
clipboard_path(),
delete_trailing_blank_lines(),
delete_trailing_whitespace(),
develop_test(),
file_copy(),
file_modified_last(),
file_save(),
file_string(),
find_files(),
get_lines_between_tags(),
get_mtime(),
get_unique_string(),
grep_file(),
is_files_current(),
is_path(),
paths,
runsed(),
search_files(),
touch()