wbcmd provides R wrapper functions for the Connectome Workbench command-line tool (wb_command).
Installation
You can install wbcmd from CRAN with:
install.packages("wbcmd")Or install the development version from GitHub with:
# install.packages("pak")
pak::pak("lcbc-uio/wbcmd")You also need Connectome Workbench installed on your system.
Setup
wbcmd looks for wb_command in the following order:
- The R option
wbcmd.path - The environment variable
WB_PATH - Platform-specific default installation paths
- The system
PATH
Check your setup with:
If wb_command is not found automatically, set the path explicitly:
set_wb_path("/path/to/wb_command")Usage
All commands flow through the central wb_cmd() dispatcher:
Convenience wrappers provide a more ergonomic interface:
cifti_parcellate(
"data.dtseries.nii",
"atlas.dlabel.nii",
direction = "COLUMN",
cifti_out = "parcellated.ptseries.nii"
)
cifti_correlation(
"data.dtseries.nii",
"corr.dconn.nii",
fisher_z = TRUE
)Get help for any subcommand:
wb_help("-cifti-parcellate")