Learn R Programming

flair (version 0.0.2)

code_from_editor: Converts raw editor text to a string of code

Description

Raw editor text has been taken from an active RStudio session via rstudioapi::getSourceEditorContext(). Chunk delimiters and html is removed, all formatting is otherwise preserved.

Usage

code_from_editor(.contents, chunk_name)

Arguments

.contents

chunk contents passed from editor context

chunk_name

label of chunk

Value

chunk text