extract_metadata | R Documentation |
I find that when I acquire metadata from a paper or collaborator, annoyingly often there are many special characters or other shenanigans in the column names. This function performs some simple sanitizations. In addition, if I give it a filename it calls my generic 'read_metadata()' function before sanitizing.
extract_metadata(
metadata,
id_column = "sampleid",
fill = NULL,
fill_condition = TRUE,
fill_batch = TRUE,
sanitize = TRUE,
...
)
metadata |
file or df of metadata |
id_column |
Column in the metadat containing the sample names. |
fill |
Fill missing data with this. |
fill_condition |
Add a condition column if there is not one? |
fill_batch |
Add a batch column if there is not one? |
sanitize |
Perform my various sanitizers on the data? |
... |
Arguments to pass to the child functions (read_csv etc). |
Metadata dataframe hopefully cleaned up to not be obnoxious.
## Not run:
sanitized <- extract_metadata("some_random_supplemental.xls")
saniclean <- extract_metadata(some_goofy_df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.