- Download R Tools For Visual Studio
- Download R Tools For Visual Studio
- Download R Tools For Mac
- Download R Tools For Windows
The aim of devtools
is to make your life as a package developer easier by providing R functions that simplify many common tasks. R packages are actually really simple, and with the right tools it should be easier to use the package structure than not. Package development in R can feel intimidating, but devtools does every thing it can to make it as welcoming as possible. devtools
comes with a small guarantee: if because of a bug in devtools a member of R-core gets angry with you, I will send you a handwritten apology note. Just forward me the email and your address, and I'll get a card in the mail.
3uTools supports to back up and restore, flash and jailbreak, manage files (photos, videos, contacts.), it provides one-click download for iOS users with genuine iOS apps, popular games, free ringtones and HD wallpapers. The R tool is a code editor for users of R, an open-source code base used for statistical and predictive analysis. Proficiency in R scripting is recommended before using this tool.
devtools
is opinionated about how to do package development, and requires that you use roxygen2
for documentation and testthat
for testing. Not everyone agrees with these opinions, and they are by no means perfect, but they have evolved during the process of writing over 30 R packages. I'm always happy to hear about what doesn't work for you, and any places where devtools gets in your way. Either send an email to the rdevtools mailing list or file an issue.
Updating to the latest version of devtools
You can track (and contribute to) development of devtools
at https://github.com/hadley/devtools. To install it:
Install the release version of
devtools
from CRAN withinstall.packages('devtools')
.- Make sure you have a working development environment.
- Windows: Install Rtools.
- Mac: Install Xcode from the Mac App Store.
- Linux: Install a compiler and various development libraries (details vary across differnet flavors of Linux).
Follow the instructions below depending on platform.
Mac and Linux:
Windows:
Package development tools
All devtools
functions accept a path as an argument, e.g. load_all('path/to/path/mypkg')
. If you don't specify a path, devtools
will look in the current working directory - this is recommend practice.
Frequent development tasks:
load_all()
simulates installing and reloading your package, loading R code inR/
, compiled shared objects insrc/
and data files indata/
. During development you usually want to access all functions soload_all()
ignores the packageNAMESPACE
.load_all()
will automatically create aDESCRIPTION
if needed.document()
updates documentation, file collation andNAMESPACE
.test()
reloads your code, then runs alltestthat
tests.
Building and installing:
install()
reinstalls the package, detaches the currently loaded version then reloads the new version withlibrary()
. Reloading a package is not guaranteed to work: see the documentation tounload()
for caveats.build()
builds a package file from package sources. You can can use it to build a binary version of your package.install_github()
installs an R package from github,install_gitorious()
from gitorious,install_bitbucket()
from bitbucket,install_url()
from an arbitrary url andinstall_file()
from a local file on disk.install_version()
installs a specified version from cran.

Check and release:
check()
updates the documentation, then builds and checks the package.build_win()
builds a package using win-builder, allowing you to easily check your package on windows.run_examples()
will run all examples to make sure they work. This is useful because example checking is the last step ofR CMD check
.check_doc()
runs most of the documentation checking components ofR CMD check
release()
makes sure everything is ok with your package (including asking you a number of questions), then builds and uploads to CRAN. It also drafts an email to let the CRAN maintainers know that you've uploaded a new package.
Other commands:
bash()
opens a bash shell in your package directory so you can use git or other command line tools.wd()
changes the working directory to a path relative to the package root.
Development mode
Calling dev_mode()
will switch your version of R into 'development mode'. In this mode, R will install packages to ~/R-dev
. This is useful to avoid clobbering the existing versions of CRAN packages that you need for other tasks. Calling dev_mode()
again will turn development mode off, and return you to your default library setup.

Other tips
I recommend adding the following code to your .Rprofile
:
See the complete list in ?devtools
This will set up R to:
- always install packages from the RStudio CRAN mirror
- ignore newlines when
browse()
ing - give minimal output from
traceback()
- automatically load
devtools
in interactive sessions
There are also a number of options you might want to set (in .Rprofile
) to customise the default behaviour when creating packages and drafting emails:
devtools.name
: your name, used to sign emailsdevtools.desc.author
: your R author string, in the form of'Hadley Wickham <h.wickham@gmail.com> [aut, cre]'
. Used when creating defaultDESCRIPTION
files.devtools.desc.license
: a default license used when creating new packages
In this article:

Note
After installing R Tools, you may want to configure Visual Studio for an optimized data scientist layout, as described on the Options article.
Supported versions of Visual Studio
R Tools for Visual Studio (RTVS) is supported on Windows with the Community (free), Professional, and Enterprise editions of both Visual Studio 2017 and Visual Studio 2015 Update 3 (or higher) (direct download).
RTVS is not presently supported on Visual Studio for Mac.
RTVS does not install if you have only the Visual Studio Shell that's included with products such as Visual Studio Test Professional and SQL Server Management Studio. Visual Studio Shell lacks the necessary components for RTVS.
Install RTVS in Visual Studio 2017
Download R Tools For Visual Studio
Run the Visual Studio installer and select the Modify option (for details, see Modify Visual Studio). If you don't yet have Visual Studio installed, see Install Visual Studio. On Windows 7, be sure that your installer is updated to show Visual Studio 2017 version 15.2 build 26430.12 or later.
Select the Data science and analytical applications workload:
Set any additional options on the right side under the same workload name. By default, this workload includes F# and Python support. For R, minimum requirements are R language support, Runtime support for R development, and Microsoft R client.
RTVS is installed in: %ProgramFiles(x86)%Microsoft Visual Studio<version><edition>Common7IDEExtensionsMicrosoftR Tools for Visual Studio where <version> is typically 2017
and <edition> is Community
, Professional
, or Enterprise
.
Install RTVS in Visual Studio 2015
With Visual Studio 2015, you need to install an R interpreter and the R Tools separately.
Install an R interpreter
RTVS requires a 64-bit installation of R version 3.2.1 or higher from one or more of the following sources:
Microsoft R Open and CRAN R both allow for multiple side-by-side versions. Microsoft R Client, however, supports only one version and always uses the latest one you installed.
Install the R tools
Download the current RTVS for Visual Studio 2015 from https://rtvs.blob.core.windows.net/download/RTVS_2017-12-18.1.exe. RTVS checks for a suitable version of Visual Studio and helps you install an R interpreter if you haven't already.
Note
Download R Tools For Visual Studio
The standalone RTVS installer works only with Visual Studio 2015; with Visual Studio 2017, install R support through the Data Science and Analytical Applications workload as described earlier.
RTVS for Visual Studio 2015 is installed in: %ProgramFiles(x86)%Microsoft Visual Studio 14Common7IDEExtensionsMicrosoftR Tools for Visual Studio
Download R Tools For Mac
Offline installation of Visual Studio and RTVS
Offline installation is suitable for computers that are not connected to the Internet:
Go to Create an offline installation of Visual Studio 2017.
If you use Visual Studio 2015, select 2015 in the selector above the table of contents.
Follow the instructions for creating an offline installation in the web page.
For Visual Studio 2015, download the offline RTVS installers from https://rtvs.blob.core.windows.net/download/RTVS_2017-12-18.1.zip and https://rtvs.blob.core.windows.net/download/RTVS_Remote_2017-12-12.1.zip.
Install Visual Studio and RTVS from the offline installers.