map_fields | R Documentation |
data.frame
).Map field values from one column into new derived columns (takes a data.frame
).
map_fields(d, cname, m)
d |
name of table to re-map. |
cname |
name of column to re-map. |
m |
name of table of data describing the mapping (cname column is source, derived columns are destinations). |
re-mapped table
d <- data.frame(what = c("acc", "loss",
"val_acc", "val_loss"),
score = c(0.8, 1.2,
0.7, 1.7),
stringsAsFactors = FALSE)
m <- data.frame(what = c("acc", "loss",
"val_acc", "val_loss"),
measure = c("accuracy", "log-loss",
"accuracy", "log-loss"),
dataset = c("train", "train", "validation", "validation"),
stringsAsFactors = FALSE)
map_fields(d, 'what', m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.