code_snip_by_line: Display a code snippet

View source: R/knitr-utils.R

code_snip_by_lineR Documentation

Display a code snippet

Description

Pulls out a code snippet based on a vector of start and end lines.

Usage

code_snip_by_line(type, filename, starts = 1, ends = Inf, sep = "\n...\n")

Arguments

type

The code type (as understood by the minted latex plugin)

filename

The source code filename

starts

a vector of start indices ( as line numbers )

ends

a vector of end indices ( as line numbers )

sep

a seperator

Value

a formatted string based on the file


terminological/ggrrr documentation built on June 15, 2024, 6:35 a.m.