load_raw | R Documentation |
Load raw data from disk and aggregate (using the mean
function)
observations with duplicated IDs (first column). Non-numeric columns must
be excluded using the excluded_columns
parameter.
load_raw(raw_data_filename, excluded_columns = NULL)
raw_data_filename |
Filename containing the raw data, it can be a
relative path (e.g. |
excluded_columns |
Numeric vector containing the indices of the dataset properties that are non-numeric, excluded columns. |
Data frame with the pre-processed raw data.
# Toy dataset example_data <- data.frame(ID = c(1,2,3,4,5), P1 = c("one", "two", "three", "four", "five"), T1 = rnorm(5), T2 = rnorm(5)) write.csv(example_data, "example_data.csv", row.names = FALSE) write.csv(example_data[c(1:5, 1, 2), ], "example_data_dup.csv", row.names = FALSE) knitr::kable(MetaPipe::load_raw("example_data.csv", c(1, 2))) knitr::kable(MetaPipe::load_raw("example_data_dup.csv", c(1, 2))) # F1 Seedling Ionomics dataset ionomics_path <- system.file("extdata", "ionomics.csv", package = "MetaPipe", mustWork = TRUE) ionomics <- MetaPipe::load_raw(ionomics_path) knitr::kable(ionomics[1:5, 1:8]) # Clean up example outputs MetaPipe:::tidy_up("example_data")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.