wbcmd provides R wrapper functions for the Connectome
Workbench
command-line tool (wb_command).
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.
wbcmd looks for wb_command in the following order:
wbcmd.path
WB_PATH
PATH
Check your setup with:
library(wbcmd)
wb_sitrep()
If wb_command is not found automatically, set the path explicitly:
set_wb_path("/path/to/wb_command")
All commands flow through the central wb_cmd() dispatcher:
wb_cmd("-version")
wb_cmd("-cifti-info", c("data.dscalar.nii"))
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")