findFn(string, maxPages = 20)
Do a search for functions, which opens an interactive HTML page of results. The results may be sorted in a variety of ways and also link to help files for each function. The results page will automatically open in whatever application has been designated to open .html files (usually a browser is the default).
- string – A character string to search.
- maxPages – Maximum number of pages to return, i.e. number of links is 20*maxPages.
Generate a nicely formatted table for LaTeX or a basic table for HTML.
- x – An R object that could conceivably be formatted into a table. A wide range of objects are accepted.
Use R to create a tarball (tar.gz zip file) or to unzip a tarball.
tar(tarfile, files = NULL)
- tarfile – Name of the tar.gz file to be generated.
- files – List of files to be placed into the tarball.
untar(tarfile, exdir = “.”)
- tarfile – Name of the tar.gz file to be unzipped.
- exdir – Where to put the files.
Create a new folder on your computer from R using the dir.create function.
- path – A folder to be generated in the current working directory, or specify a path, e.g. "../../path/to/new/directory/newFolder".
Check if two objects are equal, or at least very nearly equal. Don’t get tripped up by the argument names, which make it sound like this function is only for a very specific scenario (convergence) when in truth it can be used for a wide variety of scenarios.
- target – An R object.
- current – A second R object to compare to target (the first argument).
As noted in the complete help file, if using all.equal
in an if
statement, wrap it inside of the isTRUE
Check if an R object exists in the current session. Functions and data objects from the base or other packages may also be checked.
- x – The name of an R object as a character string.
zapsmall(x, digits = getOption(“digits”)))
If some values of x are nearly zero relative to the larger values in x, then zapsmall will set those small values to zero.
- x – A numeric vector.
- digits – An integer indicating the precision.
While not a perfect rule, anticipate values of x that are, in absolute value, less than 1 and are 10^digits smaller than the largest values of x to be set to zero.
Skip to the next iteration in a loop.
Retrieve information about packages that have already been installed. For instance, learn the current version, what packages rely on other packages, or the license a package is available under.
Create a character string that contains values from R objects. (The sprintf is much more robust than is touched on here, but this will provide sufficient info for a basic start.)
- fmt – A character string with some occurrences of %s, which will be places that object values are inserted.
- … – The R objects to be inserted. The number of items should correspond to the number of %s occurrences in fmt.