Opens an interactive selection dialog and returns an expression that can directly be used in R code.
Usage
selectVarDlg(x, ...)
# Default S3 method
selectVarDlg(x, useIndex = FALSE, ...)
# S3 method for class 'numeric'
selectVarDlg(x, ...)
# S3 method for class 'factor'
selectVarDlg(x, ...)
# S3 method for class 'character'
selectVarDlg(x, ...)
# S3 method for class 'data.frame'
selectVarDlg(x, ...)Details
Depending on the input type, different expressions are generated:
- vectors: `c(...)` - numeric vectors: index selection - factors/characters: ` - data frames: column selection
The generated expression is automatically copied to the clipboard.
The function uses [utils::select.list()] with `graphics = TRUE` for interactive selection.
If no selection is made, an empty string is returned.
