join_with_preds | R Documentation |
Use join_with_preds
to combine raw data with the values predicted by a given model fit.
join_with_preds(
tidied_for_tmas,
by_var_fit,
.join_by = ".var",
.var_col = ".var",
.model_name_col = "model_name",
.fit_data_col = "data",
.tidied_data_col = "data",
.temp_col_raw = "Temperature",
.value_norm_col_raw = "value_norm",
.value_col_pred = "value",
.keep_cols_from_raw = c("Temperature_norm", "value_norm"),
.rescale_raw_temps = FALSE,
...
)
tidied_for_tmas |
a grouped, nested tibble, as returned by |
by_var_fit |
a grouped, nested tibble, as returned by |
.join_by |
a string, giving the name of the column shared between |
.var_col |
a string, giving the name of the column shared between |
.model_name_col |
a string, giving the name of the column in which the fitted model is specified by name (e.g. "model_1", "model_2" . . . ). Defaults to "model_name". |
.fit_data_col |
a string, giving the name of the column in |
.tidied_data_col |
a string, giving the name of the column in |
.temp_col_raw |
a string, giving the name of the columns shared between |
.value_norm_col_raw |
a string, giving the name of the column in |
.value_col_pred |
a string, giving the name of the column in |
.keep_cols_from_raw |
a character vector, containing names of the columns to be carried through into the final output tibble from |
.rescale_raw_temps |
a boolean, defaults to FALSE, giving whether or not the supplied column name to |
... |
additional arguments, not passed to anything internal here, but allows for the function to recieve named arguments from upstream functions while ignoring arguments passed with ... which match nothing in this function. |
a tibble of five columns
.var character, giving the unique dataset identifier for each DSF trace.
Temperature_norm numeric, giving the normalized Temperature for a given value
value numeric, giving either the normalized raw RFU, a prediction from a fitted model to that normalized raw data, or individual component extract from the model prediction.
which_value character, describing which of the possible values types corresponding to a given value in the value
column. e.g. "raw" (normalized raw RFU), "pred" (full model prediction), "resid" (residuals from the model prediction)
model_name character, giving the name of the model which was fit, and from which the predictions have been extracted. e.g. "model_1", "model_2" ... For the rows corresponding to raw data, modle_name is NA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.