.The information here applies only to recent versions of R for Windows,(‘ 3.1.0’ or later). It is biased towards users of 64-bit Windows.2 Installation and Usage2.1 Where can I find the latest version?Go to any CRAN site (seefor a list), navigate to the bin/windows/base directory andcollect the file(s) you need. The current release is distributed as aninstaller ‘ R-3.6.3-win.exe’ of about 65MB.There are also links on that page to the ‘ r-patched’ and‘ r-devel’ snapshots.
![](/uploads/1/2/6/5/126589665/804073372.jpg)
Get all the videos you like for offline watching! Download all the videos you want with the simple and smart downloader! Get it for your PC or Mac or Android. Now that you have downloaded Git, it's time to start using it. Read the Book. Dive into the Pro Git book and learn at your own pace. Download a GUI. Several free and commercial GUI tools are available for the Windows platform. Get Involved. A knowledgeable Git community is available to answer your questions.
These are frequently updated builds ofdevelopment versions of R. The ‘ r-patched’ build includes bugfixes to the current release, and ‘ r-devel’ contains these as wellas changes that are planned to eventually make it into the next‘ x.y.0’ release.2.2 How do I install R for Windows?Current binary versions of R are known to run on Windows 7 or later, including on64-bit versions: See. The last versionknown to run on Windows 2000 was 2.12.2. Windows XP is no longer supported.We only test on versions of Windows currently supported by Microsoft,mainly 64-bit Windows 7, Windows Server 2008 and Windows 10.Your file system must allow case-honouring long file names (as is likelyexcept perhaps for some network-mounted systems). An installation takesup to 150MB of disk space.If you want to be able to build packages from sources, we recommend thatyou choose an installation path not containing spaces. (Using a pathwith spaces in will probably work, but is little-tested.) Users ofVista/Windows 7/8/Server 2008/2012 installing for a single user using anaccount with administrator rights should consider installing into a non-system area (such asC:R). Installing to a network share (a filepath starting withmachine.) is not supported: such paths will need to mappedto a network drive.To install use ‘ R-3.6.3-win.exe’.
![Download Download](/uploads/1/2/6/5/126589665/314534825.gif)
Just double-click on the iconand follow the instructions. If you have an account with Administratorprivileges you will be able to install R in the Program Filesarea and to set all the optional registry entries; otherwise you willonly be able to install R in your own file area. You may need toconfirm that you want to proceed with installing a program from an‘unknown’ or ‘unidentified’ publisher.After installation you should choose a working directory for R. Youwill have a shortcut to Rgui.exe on your desktop and/or somewhereon the Start menu file tree, and perhaps also in the Quick Launch partof the taskbar (Vista and earlier).
Right-click each shortcut, selectProperties. And change the ‘Start in’ field to your working directory.(If your account was not the one used for installation, you may need tocopy the shortcut before editing it.)On some systems you will have two shortcuts, one for 32-bit with a labelstarting R i386 and one for 64-bit starting R x64(see )You may also want to add command-line arguments at the end of theTarget field ( after any final double quote, and separated by aspace), for example -sdi -max-mem-size=1G. You can also setenvironment variables at the end of the Target field, for exampleRLIBS=p:/myRlib, and if you want to ensure that menus andmessages are in (American) English, LANGUAGE=en.It is also possible to install from an MSI file, which will be ofinterest only for system administrators. For how to build the MSI file,see the ‘R Installation and Administration Manual’.2.3 How do I check an installation is not corrupt?Relates to earlier installers, removed in R 2.11.0.2.4 Can I customize the installation?The normal way to customize the installation is by selecting componentsfrom the wizards shown by the installer. RLIBS=p:/myRlibIf you have permission to do so, you can also create an environment fileetcRenviron.site and set environmental variables in that file inthe same way. This is useful for variables which should be set for allusers and all usages of this R installation. (Their values can beoverridden in a.Renviron file or on the command line.)See?Startup for more details of environment files.
For all applications via Windows. How you set an environment variableis system-specific: under recent versions of Windows, go to ‘UserAccounts’ in the Control Panel, and select your account and then ‘Changemy environment variables’.The order of precedence for environmental variables is the order inwhich these options are listed, that is the command line then.Renviron then the inherited environment.2.16 R can’t find my file, but I know it is there!How did you specify it? Backslashes have to be doubled in R characterstrings, so for example one needs‘ 'd:R-3.6.3libraryxgobiscriptsxgobi.bat'’. You can makelife easier for yourself by using forward slashes as path separators:they do work under Windows. You should include the file extension(e.g. ‘ 'xgobi.bat'’ rather than just ‘ 'xgobi'’); sometimesthis isn’t shown in Windows Explorer, but it is necessary in R.A simple way to avoid these problems is to use the functionfile.choose to invoke the standard Windows file selectiondialog. If you select a file there, the name will be passed to R inthe correct format.Another possible source of grief is spaces in folder names.
We havetried to make R work on paths with spaces in, but many people writingpackages for Unix do not bother. C:Program FilesRR-3.1.0binx64for 64-bit Rcmd.exe, replacing x64 by i386 for32-bit.How you set the path depends on your OS version. Under recent versions,go to ‘User Accounts’ in the Control Panel, and select your account andthen ‘Change my environment variables’. (System policies can preventend users making changes.)An alternative is to set the PATH in the shell you are running( Rcmd.exe is a command-line program). For those using thestandard Windows ‘Command Prompt’ Duncan Murdoch suggested:The simple way to do it just for the command prompt is to write a littlebatch file setpath.bat containing. CMD /K setpath.bat3 Languages and Internationalization3.1 The installer does not offer my language.Only a limited range of languages is supported, currentlyCatalan,both Simplified and Traditional Chinese,Czech,Danish,Dutch,Finnish,French,German,Greek,Hebrew,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese (Brazil),Portuguese (Portugal),Russian,Slovenian,Spanish (Spain)and Ukranian.3.2 I want R in English (and not in French/Chinese/.)!The default behaviour of R is to try to run in the language you runWindows in.Apparently some users wantWindows in their native language, but not R. To do so, setLANGUAGE=en as discussed in Q2.2 and Q2.15, or in theRconsole file.3.3 I want to run R in Chinese/Japanese/Korean.Suitable versions of Windows support what it calls ‘East Asian’languages, but e.g.
Western installations of Windows often do not havesuch support. So we need to assume that your copy of Windows does.Both Rterm.exe and Rgui.exe support single- anddouble-width characters. It will be necessary to select suitable fontsin files Rconsole and Rdevga (see?Rconsole or thecomments in the files: the system versions are in the etcfolder); in the latter you can replace Arial by ArialUnicode MS, and we tried FixedSys and MS Mincho inRconsole. (Note that Rdevga only applies to Windowsgraphics devices and not, say, to pdf.)Note that it is important that the console font uses double-widthcharacters for all CJK characters (as that is what the width table usedassumes): this is true for the fonts intended for CJK locales but notfor example for Lucida Console or Consolas.You do need to ensure that R is running in a suitable locale: useSys.getlocale to find out.
(CJK users may be used to theirlanguage characters always being available, which is the case forso-called ‘Unicode’ Windows applications. However, R is primarilywritten for Unix-alikes and is not therefore ‘Unicode’ in the Windowssense.) You can find suitable locale names fromandbeware that 'Chinese' is Traditional Chinese (code page 950,Big5) and 'chs' is needed for Simplified Chinese (code page 936,GB2312).When using Rterm the window in which it is run has to be setup to use a suitable font (e.g. Lucida Console orConsolas, not the OEM raster fonts) and a suitable codepage(which for the Windows Cmd shell can be done using chcp).3.4 I selected English for installation but R runs in Chinese.Precisely, you selected English for installation! The languageof the installer has nothing to do with the language used to run R: thisis completely standard Windows practice (and necessary as differentusers of the computer may use different languages).The language R uses for menus and messages is determined by thelocale: please read the appropriate manual (‘R Installation andAdministration’) for the details. You can ensure that R uses Englishmessages by appending LANGUAGE=en to the shortcut you use tostart R, or setting it in the Rconsole file.3.5 I would like to be able to use Japanese fonts.for example, in the console and to annotate graphs. Similar commentsapply to any non-Western-European language.With suitable fonts, this should just work. You will need to set MSMincho or MS Gothic as the console font to ensure that single- anddouble-width characters are handled correctly.
Dir.create(Sys.getenv('RLIBSUSER'), recursive = TRUE)to do so. If you use install.packages and do not have permissionto write to the main or site library, it should offer to create a personallibrary for you and install the packages there. This will also happenif update.packages offers to update packages for you in a librarywhere you do not have write permission.There can be additional security issues under Windows Vista and later:See. In particular, the detectionthat a standard user has suitable permissions appears to be unreliableunder Vista, so we recommend that you do create a personal directoryyourself.4.3 The packages I installed do not appear in the HTML help system.This question applied to the pre-2.10.0 HTML help system, which has beenreplaced.4.4 My functions are not found by the HTML help search system.This question applied to the pre-2.10.0 search system, which has beenreplaced.4.5 Loading a package fails.Is the package installed for this version of R? Packages need to haveprepared for R 2.10.0 or later, and packages containing compiled codefor R 2.12.0 or later.You can tell the version the package was compiled for by looking at the‘ Built:’ line in its DESCRIPTION file.For a small number of binary packages you need to install additionalsoftware and have its DLLs in your PATH. Windows will normallygive an informative message about a certain DLL not being found.
Seefor alisting of some of these packages (notably RGtk2,cairoDevice, rggobi, rJava, rjags and someof the packages connecting to databases).4.6 Package TclTk does not work.For package tcltk to work (try demo(tkdensity) ordemo(tkttest) after library(tcltk)) you need to have Tcl/Tkinstalled. This is part of the R installation, so it should be there.However, if you have the environment variable MYTCLTK set to anon-empty value, it is assumed that you want to use a different Tcl/Tk8.6.x installation with the path to its bin directory given byvalue of MYTCLTK, and that this is set up correctly (withTCLLIBRARY set if needed). Note that you do need 8.6.x and not8.5.x nor 8.4.x, and you do need the architecture to match, that is a32-bit or 64-bit build of Tcl/Tk to match the R build in use. (There isno guarantee that a 64-bit build will work: it depends on the layout ituses.)In the past several package authors have suggested using ActiveTcl as a way toget Tcl/Tk extensions (but the support files do contain the mostcommonly used TkTable and BWidget extensions). This couldbe used by setting (for a default install).
MYTCLTK=c:/Tcl/binbut current versions do not by default contain any extraextensions (although they may be downloaded via the Teacupfacility) and this only works for 32-bit R.4.7 Hyperlinks in HTML sometimes do not work.This question was much more relevant prior to version 2.10.0.They may still not work between packages installed in different librariesif the HTTP server has been disabled: the remedy is not to do that!4.8 update.packages fails.You may not be able to update a package which is in use: Windows ‘locks’the package’s DLL when it is loaded. So use update.packages(or the menu equivalent) in a new session.If you put library(foo) in your.Rprofile you will need tostart R with -vanilla to be able to update package foo.If you set RDEFAULTPACKAGES to include foo, you willneed to unset it temporarily.It has been reported that some other software has interfered with theinstallation process by preventing the renaming of temporary files,Google Desktop being a known example.4.9 How do I add to the list of repositories?as shown in the Select repositories. Item on thePackages menu?This reads from the tab-delimited file RHOMEetcrepositories,which you can edit, or put a modified copy at.Rrepositoriesin your HOME directory (see ).4.10 Help is not shown for some of the packagesThis was about Compiled HTML help, which has not been supported since R2.10.0.4.11 How do I get static HTML pages?We presume you want to do this for some special purpose: R’s help systemwill not make use of them, links across library directories will notwork (unlike R. # set this to YES to build static HTML helpBUILDHTML = NOand them all packages installed by that build of R will (by default) beinstalled with static HTML pages.4.12 How can I get a binary version of a package?Presumably one not available on CRAN, BioC or a similar repository.If you have a source package that is known to work on a Unix-alikesystem, you can try the automated Windows binary package builderdocumented at. If the package isnot yours, please remember to change the maintainer address so theresults go to you and not the author(s)!However, if a CRAN package is not available in binary form, this usuallymeans that there is a problem with some dependent package or externalsoftware (often mentioned in the @ReadMe file in the binaryrepository directory). You can emailexpressing a wish for such a package to be ported—the maintainers willtake such wishes into account when prioritizing work on binary packages.In many cases installing packages from the sources is not at alldifficult (it is simple if the package contains no compiled code), soplease attempt that for yourself before requesting help from the busyvolunteers.4.13 Package xxx is out of date for WindowsHere are three possible reasons:You are simply impatient, and need to wait until the binary package hasbeen built and propagated to the CRAN mirror you are using. Thisnormally (but not always) happens within 24 hours.
Sometimes mirrorsdo get behind (especially unofficial ones), so you could try anothermirror. (Mirror statistics are linked near the top of the CRAN mirrorpage at.)The latest version of the package might require a later version of Rthan the one you are using.
You can check on the package’s HTML page onCRAN, and update your R if needed.Your R might be too old. Binary packages for the 3.x series are built(if possible) whilst 3.(x+1) is current, but building stops once 3.(x+2)reaches alpha (pre-release, about a month before release). You canalways try installing from the sources.4.14 No binary packages appear to be available for my version of RHow old is it? The CRAN policy is to archive binary packages two yearsafter the 2.x series is closed. Other repositories may do so sooner.If you are using an R version that old we advise you to update your R,but you do also have the option of installing packages from theirsource.4.15 How do I build my package for both 32- and 64-bit R?Packages without compiled code nor a configure.win script willrun on both 32- and 64-bit R.Packages with compiled code but no configure.win norsrc/Makefile.win file will be built for both when running on a64-bit version of Windows if both versions of R are installed.An empty configure.win is treated in the same way as if noneexisted.
Also, there is a list of packages known to have anarchitecture-independent configure.win hardcoded into RCMD INSTALL, and for these packages, both architectures will be builtunder the above conditions. ?rc.settingswhich also explains how the various types of completion work.This feature is very similar to the completion available in thereadline-based command line interface on Unix-alikes: the macOSGUI R.app has a different completion scheme.6 Workspaces6.1 My workspace gets saved in a strange place: how do I stop this?Have you changed the working directory?: see Q6.2.6.2 How do I store my workspace in a different place?Use the ‘File Change Dir.’ menu item to select a new workingdirectory: this defaults to the last directory you loaded a filefrom. The workspace is saved in the working directory. You can alsosave a snapshot of the workspace from the ‘Save Workspace.’ menu item.From the command line you can change the working directory by thefunction setwd: see its help page.6.3 Can I load workspaces saved under Unix/GNU-Linux or Mac macOS?Yes.
![Vitamin-R 2.19 Download Vitamin-R 2.19 Download](/uploads/1/2/6/5/126589665/674001661.jpg)
All ports of R use the same format for saved workspaces, so theyare interchangeable (for the same 3.x.? Version of R, at least).Note though that character data in a workspace will be in a particularencoding that is not recorded in the workspace, so workspaces containingnon- ASCII character data may not be interchangeable even onthe same OS.binx64R CMD SHLIB foo.c bar.fto make foo.dll.
Use.binx64R CMD SHLIB -help forfurther options, or see?SHLIB. (Replace x64 byi386 for 64-bit R.)If you want to use Visual C, Borland C or other compilers, see theappropriate section in README.packages.8.4 How do I debug code that I have compiled and dyn.load-ed?Debugging under Windows is often a fraught process, and sometimes doesnot work at all. If all you need is a just-in-time debugger tocatch crashes, consider (32-bit) Dr. Mingw from themingw-utils bundle on. That will beable to pinpoint the error, most effectively if you build a version of Rwith debugging information as described below.First, build a version of the R system with debugging information. Gdb /path/to/R-3.6.3/bin/x64/Rgui.exe(or use Rterm.exe.) However, note.
gdb may only be able to find the source code if we run in thelocation where the source was compiled ( R-3.6.3/src/gnuwin32 forthe main system, R-3.6.3/src/library/mypkg/src for a package),unless told otherwise by the directory command. It is mostconvenient to set a list of code locations via directory commandsin the file.gdbinit in the directory from which gdb isrun. It is only possible to set breakpoints in a DLL after the DLL hasbeen loaded. So a way to examine the function tukeyline inpackage stats might be. Gdb././././bin/i386/Rgui.exe(gdb) break WinMain(gdb) run stops with R.dll loaded (gdb) break RReadConsole(gdb) continue stops with console running (gdb) continueRconsole library(stats)(gdb) break tukeyline(gdb) clear RReadConsole(gdb) continueRconsole example(line).Alternatively, in Rgui you can use the ‘Misc Break todebugger’ menu item after your DLL is loaded. The C function callbreaktodebugger will do the same thing. Fortran symbols need an underline appended.
Windows has little support for signals, so the Unix idea of running aprogram under a debugger and sending it a signal to interrupt it anddrop control back to the debugger does not work with a MinGW version ofgdb. It does often work with the cygwin version.8.5 How do I include C code?You need to do two things:(a) Write a wrapper to export the symbols you want to call from R asextern 'C'.(b) Include the C libraries in the link to make the DLL. SupposeX.cc contains your C code, and Xmain.cc is the wrapper,as in the example in ‘Writing R Extensions’. Then build the DLL by( gcc). Cl /MT /c X.cpp Xmain.cpplink /dll /out:X.dll /export:Xmain X.obj Xmain.objand call the entry point(s) in XR, such as Xmain.Construction of static variables will occur when the DLL is loaded, anddestruction when the DLL is unloaded, usually when R terminates.Note that you will not see the messages from this example in the GUIconsole: see the next section.8.6 The output from my C code disappears. Why?The Rgui.exe console is a Windows application: writing tostdout or stderr will not produce output in theconsole. (This will work with Rterm.exe.) Use Rprintf orREprintf instead.
These are declared in header fileRext/PrtUtil.h.Note that output from the console is delayed (see ), so that you will not normally see anyoutput before returning to the R prompt.8.7 The output from my Fortran code disappears. Why?Writing to Fortran output writes to a file, not the Rgui console.Use one of the subroutines dblepr, intpr or realprdocumented in the ‘Writing R Extensions’ manual.Note that output from the console is delayed (see ), so that you will not normally see anyoutput before returning to the R prompt even when using the xxxprsubroutines.8.8 The console freezes when my compiled code is running.The console, pagers and graphics window all run in the same threadas the R engine. To allow the console etc to respond to Windows events,call RProcessEvents periodically from your compiled code.If you want output to be updated on the console, callRFlushConsole and then RProcessEvents.Last edited 2015-08-13: comments to.
FootnotesNon-administrator accountswill automatically be offered a default installation directory in theuser area.what Windows calls x64 for x86-64 CPUs, not the veryrare ia64 Windows for Itanium CPUs.or they may have no choice:apparently some Windows editions are tied to a specific language.It does not have a complete understanding of Windowsfile paths, but can complete most relative or absolute file paths,including drives and spaces. Relative paths on drives are not handled,for example.
![](/uploads/1/2/6/5/126589665/804073372.jpg)