Inspectopedia 2025.1 Help

Unused variable or function

Reports variables that are not used in the current scope. These variables are not needed and can be removed.

Example:

my_func <- function(a) { x <- 3 return (a^2) }

The x variable is not used and can be removed:

my_func <- function(a) { return (a^2) }

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

RUnusedVariable
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | R

Inspection Details

By default bundled with:

DataSpell 2025.1,

Can be installed with plugin:

R Language, 251.24734

01 April 2025