# You can create annotation from scrath or using already existing annotation
ms <- annotate_row(student_results,
dummy = 1,
passed = ifelse(previous_year_score >= 0.6, TRUE, FALSE))
# There is a direct access to matrix content with annotate_row_from_apply(),
# but here is an example on how it can be done with annotate_row()
ms <- annotate_row(student_results,
mn_fail = apply_matrix_dfl(student_results, mn=~ rowMeans(.m1),
.matrix_wise = FALSE)$mn)
Run the code above in your browser using DataLab