

This may be a literal string or a regular expression to be used for pattern-matching (see ?"regular expression"). The apropos() function searches for objects, including functions, directly accessible in the current R session that have names that include a specified character string. Use the help system to obtain complete documentation for these functions: for example, ?apropos. The following functions cast a progressively wider net. There are also facilities in the standard R distribution for discovering functions and other objects. The help() function and ? operator are useful only if you already know the name of the function that you wish to use. To run a demo, call the demo() function with the quoted name of the demo (e.g., demo("nlm")), specifying the name of the package if the name of the demo isn’t unique (e.g., demo("nlm", package="stats"), where, in this case, the package name need not be given explicitly). The command demo() lists all demos for all packages in your library, while demo(package="package-name") (e.g., demo(package="stats")) lists demos in a particular package.
#R COMMANDER VS R STUDIO CODE#
Packages may also include extended code demonstrations (“demos”). survival), if you wish to review the vignette for a package prior to installing and/or using it. Vignettes may also be accessed from the CRAN page for the package (e.g.

You can also use the vignette("vignette-name") command to view a vignette (possibly specifying the name of the package in which the vignette resides, if the vignette name is not unique): for example, vignette("timedep") or vignette("timedep", package="survival") (which are, in this case, equivalent). vignette() is employed similarly, but displays a list of vignettes in text form. You can discover vignettes by accessing the help page for a package, or via the browseVignettes() function: the command browseVignettes() opens a list of vignettes from all of your installed packages in your browser, while browseVignettes(package=package-name) (e.g., browseVignettes(package="survival")) shows the vignettes, if any, for a particular package. Many packages include vignettes, which are discursive documents meant to illustrate and explain facilities in the package. Vignettes and Code Demonstrations: browseVignettes(), vignette() and demo()

You can execute these examples in the current R session via the example() command: e.g., example(lm). Help pages for functions usually include a section with executable examples illustrating how the functions work. You may also use the help() function to access information about a package in your library - for example, help(package="MASS") - which displays an index of available help pages for the package along with some other information. To obtain help for an object with a non-standard name (such as the help operator ?), the name must be quoted: for example, help('?') or ?"?". ), and must begin with a letter or a period. Standard names in R consist of upper- and lower-case letters, numerals ( 0-9), underscores ( _), and periods (.

To access help for a function in a package that’s not currently loaded, specify in addition the name of the package: For example, to obtain documentation for the rlm() (robust linear model) function in the MASS package, help(rlm, package="MASS"). To access documentation for the standard lm (linear model) function, for example, enter the command help(lm) or help("lm"), or ?lm or ?"lm" (i.e., the quotes are optional). The help() function and ? help operator in R provide access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for contributed packages. There are also specialized search engines for accessing information about R on the internet, and general internet search engines can also prove useful ( see below). R includes extensive facilities for accessing documentation and searching for help. Before asking others for help, it’s generally a good idea for you to try to help yourself.
