lines_of_r_code: Lines of R code

View source: R/lines-of-code.R

lines_of_r_codeR Documentation

Lines of R code

Description

Find the total number of lines of R code

Usage

lines_of_r_code(x = ".", skip_empty = TRUE)

Arguments

x

Directory to search for files

skip_empty

Logical, if TRUE will not count lines that are empty or only contain a bracket or quotation mark.

Details

Tries to read each file in the directory that ends in .R or .r and sums together. Files that fail to read are not counted.

Value

An integer for the number of lines in all applicable files

Examples


lines_of_r_code(system.file())
lines_of_r_code(system.file(), skip_empty = FALSE)


mark documentation built on Oct. 23, 2023, 9:06 a.m.