fnmate_below: fnmate_below

View source: R/fnmate.R

fnmate_belowR Documentation

fnmate_below

Description

Create a definition below for the function used at index.

Usage

fnmate_below(text, index)

Arguments

text

some text from a source file

index

an index into text indicating the cursor position.

Details

Given some text and an index into the text, this function generates text containing a definition for the function used at the index. An error is thrown if no function is found.

By default the function is created in the './R' folder. This can be changed with the 'fnmate_folder' option.

By default the function body contains only NULL. This can be changed with the 'fnmate_placeholder' option.

This function is not intended to be used directly but by the fnmate front end - either Emacs or RStudio.

Value

text containing function definition.

Author(s)

Miles McBain


MilesMcBain/fnmate documentation built on March 1, 2025, 1:26 p.m.