The lwd argument is most commonly used to adjust line width in functions like plot(), lines(), abline(), and other plotting functions, but it can also be used to adjust the line width of plotting characters.
traceback provides a trail of functions to track where and why an error occurred. For instance, if the error was deeply nested, then traceback is sort of like a road map showing where the error occurred.
Use an interactive, exploratory plot function with a click-interface and eight graphing options. The type of plots generated are printed out in the console. To exit, click "exit" on the plot.
- dataFrame – A data frame.
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.
Create high quality maps that may be shaded or projected in a variety of ways. While today’s post just covers generating a basic map, additional arguments may be used for coloring in counties, states, or countries (col, fill), looking at different map projections (projection), among many many other options.
- database – Usually one of four databases: "world", "usa", "state", "county". More databases are available.
- regions – By default, all regions in the database will be generated. However, specific regions for plotting may be specified using a vector of character strings.
by(data, INDICES, FUN, …)
Apply a function across subsets of data, where the subsets are defined by the INDICES argument. The by function returns a list, where each list item represents the results for a particular subset of the data.
- data – The full set of data, e.g. a vector or data.frame.
- INDICES – A vector describing how the data subsets are to be constructed (e.g. a factor vector). Multiple columns in a data frame may also be given, where each combination of the variables defines a new subset of data.
- FUN – A function to apply to each subset of data.
- … – Any additional arguments to pass to FUN.
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.
lapply(X, FUN, …)
Apply a function across each item in a list. The returned object is a list, where each item is the output corresponding to that item in the original list.
- X – A list.
- FUN – A function.
- … – Additional arguments, if necessary, to pass to FUN.
Perform R expressions using the items (variables) contained in a list or data frame. The within function will even keep track of changes made, including adding or deleting elements, and return a new object with these revised contents.
- data – Typically a list or data frame, although other options exist for with.
- expr – One or more expressions to evaluate using the contents of data (which are accessed directly), where the commands must be wrapped in braces if there is more than one expression to evaluate.