Customizing RStudio. Overview RStudio options are accessible from the Options dialog Tools > Options menu (RStudio > Preferences on a Mac) and include the following categories: Details on the various settings are provided in the sections below.
General R Options Default working directory — Startup directory for RStudio (when not in a project). The initial .RData and .Rprofile files (if any) will be read from this directory. Quick list of useful R packages. Many useful R function come in packages, free libraries of code written by R's active user community.
To install an R package, open an R session and type at the command line install.packages("<the package's name>") R will download the package from CRAN, so you'll need to be connected to the internet. Once you have a package installed, you can make its contents available to use in your current R session by running library("<the package's name>") R Markdown — Dynamic Documents for R. Package shiny. Knitr: Elegant, flexible and fast dynamic report generation with R. Overview The knitr package was designed to be a transparent engine for dynamic report generation with R, solve some long-standing problems in Sweave, and combine features in other add-on packages into one package (knitr ≈ Sweave + cacheSweave + pgfSweave + weaver + animation::saveLatex + R2HTML::RweaveHTML + highlight::HighlightWeaveLatex + 0.2 * brew + 0.1 * SweaveListingUtils + more).
This package is developed on GitHub; for installation instructions and FAQ’s, see README. This website serves as the full documentation of knitr, and you can find the main manual, the graphics manual and other demos / examples here. For a more organized reference, see the knitr book. Motivation One of the difficulties with extending Sweave is we have to copy a large amount of code from the utils package (the file SweaveDrivers.R has more than 700 lines of R code), and this is what the two packages mentioned above have done. Features Acknowledgements Misc. Ggplot2.
Mikeaddison93/devtools. Mikeaddison93/devtools. Package magrittr. Packrat: Reproducible package management for R. Packrat is a dependency management system for R.
Packrat: Reproducible package management for R. Introduction to stringr. Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks.
R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that are easy to do in languages like Ruby or Python are rather hard to do in R. The stringr package aims to remedy these problems by providing a clean, modern interface to common string operations. More concretely, stringr: Simplifies string operations by eliminating options that you don’t need 95% of the time (the other 5% of the time you can functions from base R or stringi).Uses consistent function names and arguments.Produces outputs than can easily be used as inputs. To meet these goals, stringr provides two basic families of functions: These are described in more detail in the following sections. Arguments.
It’s used by websites ranging from The New York Times and The Washington Post to GitHub and Flickr, as well as GIS specialists like OpenStreetMap, Mapbox, and CartoDB. This R package makes it easy to integrate and control Leaflet maps in R. Features Interactive panning/zoomingCompose maps using arbitrary combinations of: Map tilesMarkersPolygonsLinesPopupsGeoJSONCreate maps right from the R console or RStudioEmbed maps in knitr/R Markdown documents and Shiny appsEasily render spatial objects from the sp or sf packages, or data frames with latitude/longitude columnsUse map bounds and mouse events to drive Shiny logicDisplay maps in non spherical mercator projectionsAugment map features using chosen plugins from leaflet plugins repository Installation.
DT: An R interface to the DataTables library. DT: An R interface to the DataTables library. Ggvis 0.4 overview. Mikeaddison93/testthat. Shiny Dashboard. Introduction to roxygen2. Documentation is one of the most important aspects of good code.
Without it, users won’t know how to use your package, and are unlikely to do so. Documentation is also useful for you in the future (so you remember what the heck you were thinking!) , and for other developers working on your package. The goal of roxygen2 is to make documenting your code as easy as possible. R provides a standard way of documenting packages: you write .Rd files in the man/ directory. Code and documentation are adjacent so when you modify your code, it’s easy to remember that you need to update the documentation.Roxygen2 dynamically inspects the objects that it’s documenting, so it can automatically add data that you’d otherwise have to write by hand.It abstracts over the differences in documenting S3 and S4 methods, generics and classes so you need to learn fewer details. As well as generating .Rd files, roxygen will also create a NAMESPACE for you, and will manage the Collate field in DESCRIPTION.