as.rock_source: Specify that something is a source

View source: R/as.rock_source.R

as.rock_sourceR Documentation

Specify that something is a source

Description

This function converts an object to a character vector and marks it as a ROCK source.

Usage

as.rock_source(x)

Arguments

x

The source contents.

Value

A character vector with class rock_source.

Examples

exampleROCK <-
  rock::as.rock_source(c(
    "Some example text,",
    "and some more.       [[look_a_code]]",
    "And the end."));

### This can then be processed by other {rock}
### functions, for example:
rock::prettify_source(
  exampleROCK
);

rock documentation built on June 14, 2025, 1:08 a.m.