Getting Help
In this page:
Getting Help
R's built-in help system is accessed with ?function_name or help(function_name), which opens documentation describing a function's arguments and behavior. example(function_name) runs the documentation's example code directly. Learning to read R's help pages is an essential skill since so much of R's power comes from its huge ecosystem of functions.
Note: ??keyword searches across all installed package documentation, not just an exact function name.
Example: Getting Help
# In an interactive session these open documentation:
# ?mean
# help(mean)
# This prints a short usage description instead, for a non-interactive demo:
cat("Use ?mean or help(mean) in an interactive R session to view docs\n")
cat(args(mean))
Login to try C/C++/Java/PHP code in the editor
🔒
Chapter Quiz — Complete all 6 topics to unlock
0/6 topics done
Complete these topics first: