Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


unheadr (version 0.4.0)

annotate_mf: Annotate meaningful formatting

Description

Turns cell formatting into annotations for values in the target variable.

Usage

annotate_mf(xlfilepath, orig, new)

Value

A tibble with a new column in which the meaningful formatting is embedded as text.

Arguments

xlfilepath

Path to a single-sheet spreadsheet file (xls or xlsx).

orig

Target variable to annotate formatting in.

new

Name of new variable with cell formatting pasted as a string.

Details

Seven popular approaches for meaningful formatting (bold, colored text, italic, strikethrough, underline, double underline, and cell highlighting) are hardcoded in the function. sheets, skip, and range arguments for spreadsheet input are not supported. The hex8 code of the fill color used for text color and cell highlighting is also appended in the output. Ensure the data in the spreadsheet are rectangular before running; this includes blank but formatted cells beyond the data rectangle.

Examples

Run this code
example_spreadsheet <- system.file("extdata/dog_test.xlsx", package = "unheadr")
annotate_mf(example_spreadsheet, orig = Task, new = Task_annotated)

Run the code above in your browser using DataLab