verbose = FALSE
thinking it just quiets down your code?That's true β but it can do so much more.
Here's how understanding verbose
gave me full control over function output β and can help you debug smarter too.
verbose
controls how much info a function prints as it runs.
Most people only use:
verbose = TRUE # Show messages
verbose = FALSE # Be silent
But hereβs what many miss π
In many R functions, verbose
can take numeric levels like 0, 1, 2, or 3.
Think of it like choosing the volume of commentary your function gives.
myFunction(data, verbose = 0) # quiet
myFunction(data, verbose = 1) # normal messages
myFunction(data, verbose = 2) # detailed logs
myFunction(data, verbose = 3) # debug everything
This is useful for testing, pipelines, or debugging complex steps.
verbose
isn't capped. You can set:
verbose = 4, 5, 6β¦even 7+
These unlock:
sft = pickSoftThreshold(datExpr, powerVector = 1:20, verbose = 5)
Note: verbose
is not standardized β each function can implement it differently.
Functions that support verbose = TRUE
:
NormalizeData()
ScaleData()
RunPCA()
FindNeighbors()
FindClusters()
RunUMAP()
These show status updates unless you mute them.
AverageExpression()
FetchData()
DimPlot()
No toggle β they just run silently.
π‘ Tip: Unsure if a function supports verbose
? Try:
args(FunctionName)
# or
?FunctionName
You decide how much feedback you want.
verbose
isn't just TRUE/FALSE β it can be granularEver used verbose = 2
or 3
in your code? What's your go-to level?
#RStats #Bioinformatics #Debugging #DataScience