Description Usage Arguments Examples
View source: R/hs_tidy_filenames.R
Function to tidy/clean filenames in hyperspec objects (i.e. remove absolute path in name, and/or replace filenames).
1 2 3 4 5 6 7 | hs_tidy_filenames(
hs.x,
remove_pattern = "path",
rename_df = NULL,
old_name_col,
new_name_col
)
|
hs.x |
HyperSpec object |
remove_pattern |
What should be adjusted in filenames. "path" means remove the absolute path of the file and only keep the filename "rename" means that you supply a dataframe with matching old and new filenames. In this case you must supply a dataframe in rename_df and designate the old filename column (old_name_col) and new filename column (new_name_col). |
rename_df |
dataframe containing old and new filenames for the hyperspec objects |
old_name_col |
column in rename_df with old filenames |
new_name_col |
column in rename df with new filenames |
1 2 3 4 | data("hs_example")
# Remove path from spectral ID
hs_tidy_filenames(hs_example, remove_pattern = "path")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.