Learn R Programming

autoharp (version 0.2.0)

apply_can_improve_this: Identifies if an apply function can improve the code

Description

Identifies if an apply function can improve the code

Usage

apply_can_improve_this(fname, window_size = 2)

Value

A numeric vector corresponding to windows for review is returned. If none are found, then NULL is returned.

Arguments

fname

A filename: either Rmd/qmd or R.

window_size

A window size to analyse.

Details

First, all library() calls and read() calls are removed. Next, only_actual_args_differ is run on all pairwise expressions. The matrix is searched for blocks of 1's along the diagonal.