View source: R/split_code_file.R
| split_code_file | R Documentation |
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")
)
file |
The code file to be split. |
output_directory |
Where to create the new files. |
encoding |
The encoding passed to |
write_to_disk |
Set the output_directory to
|
Invisibly a vector of paths to the new
files.
Other file utilities:
clipboard_path(),
delete_trailing_blank_lines(),
delete_trailing_whitespace(),
develop_test(),
file_copy(),
file_modified_last(),
file_save(),
find_files(),
get_lines_between_tags(),
get_mtime(),
get_unique_string(),
grep_file(),
is_files_current(),
is_path(),
paths,
search_files(),
touch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.