A convenient way to build a character data.frame in legible transposed form. Position of first "|" (or other infix operator) determines number of columns (all other infix operators are aliases for ","). Names are treated as character types.

qchar_frame(...)

Arguments

...

cell names, first infix operator denotes end of header row of column names.

Value

character data.frame

Details

qchar_frame() uses bquote() .() quasiquotation escaping notation. Because of this using dot as a name in some places may fail if the dot looks like a function call.

See also

Examples

loss_name <- "loss" x <- qchar_frame( measure, training, validation | "minus binary cross entropy", .(loss_name), val_loss | accuracy, acc, val_acc ) print(x)
#> measure training validation #> 1 minus binary cross entropy loss val_loss #> 2 accuracy acc val_acc
str(x)
#> 'data.frame': 2 obs. of 3 variables: #> $ measure : chr "minus binary cross entropy" "accuracy" #> $ training : chr "loss" "acc" #> $ validation: chr "val_loss" "val_acc"
#> x <- wrapr::build_frame( #> "measure" , "training", "validation" | #> "minus binary cross entropy", "loss" , "val_loss" | #> "accuracy" , "acc" , "val_acc" )
qchar_frame( x | 1 | 2 ) %.>% str(.)
#> 'data.frame': 2 obs. of 1 variable: #> $ x: chr "1" "2"