Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_shebang

Identify comments that are shebangs


Description

Shebangs should be preserved and no space should be inserted between \# and !. A comment is a shebang if it is the first top level token (identified with pos_id) and if it starts with #!.

Usage

is_shebang(pd)

Arguments

pd

A parse table.

Examples

style_text("#!/usr/bin/env Rscript")

styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.