c# free pdf viewer : Add page to pdf preview Library SDK class asp.net .net web page ajax R-admin2-part782

Chapter3:InstallingRunderWindows
16
forcealotofcomputationevenifallfilesareuptodate.) Thefirstfourtargetsarethedefault
buildifjustmake(ormakeall)isrun.
Parallelmakeisnotsupportedandlikelytofail.
Ifyouwanttocustomizetheinstallationbyaddingextrapackages,replacemakerinstaller
bysomethinglike
make rinstaller EXTRA_PKGS=’pkg1 1 pkg2 2 pkg3’
Analternativewaytocustomizetheinstallerstartingwithabinarydistributionistofirst
make an n installation n of R R from the standard installer, , then n add packages s and d make e other
customizations to thatinstallation. . Then(afterhavingcustomizedfileMkRules,possibly y via
MkRules.local,andhavingmadeRinthesourcetree)insrc/gnuwin32/installerrun
make myR R IMAGEDIR=rootdir
where rootdir r is s the path h tothe root t of the customizedinstallation n (in double quotes if it
containsspacesorbackslashes).
Both methods create anexecutable with a standardname such as R-3.2.5-win.exe, , so
please rename it t to o indicate that it is s customized. . If f you intend to o distribute a a customized
installer please docheck thatlicenserequirements are met –notethattheinstallerwillstate
thatthecontentsaredistributedunderGPLandthishasarequirementforyou tosupplythe
completesources(includingtheRsourcesevenifyoustartedwithabinarydistributionofR,and
alsothesourcesofanyextrapackages(includingtheirexternalsoftware)whichareincluded).
Thedefaultsforthestartupparametersmayalsobecustomized.Forexample
make myR R IMAGEDIR=rootdir MDISDI=1
will create e an installer that defaults s to installing g R R to o run in SDI mode. . See e src/
gnuwin32/installer/Makefileforthenamesandvaluesthatcanbeset.
Thestandard
CRAN
distributionofa32/64-bitinstaller ismadebyfirstbuilding32-bit R
(just
make 32-bit
isneeded),andthen(inaseparatedirectory)building64-bitRwiththemacroHOME32setinfile
MkRules.localtothetop-leveldirectoryofthe32-bitbuild. Thenthemakerinstallerstep
copiesthefilesthatdifferbetweenarchitecturesfromthe32-bitbuildasitbuildstheinstaller
image.
3.1.10 BuildingtheMSIinstaller
ItisalsopossibletobuildaninstallerforusewithMicrosoftInstaller. Thisisintendedforuse
bysysadminsdoingautomatedinstalls,andisnotrecommendedforcasualuse.
It makes use ofthe Windows Installer XML(WiX) toolkit version 3.5 5 (orperhapslater,
untested)availablefromhttp://wixtoolset.org/. OnceWiXisinstalled,setthepathtoits
homedirectoryinMkRules.local.
Youneedto have the filesfor a completeR build,including bitmapand Tcl/Tk support
and themanuals,as s well l as s the recommended d packages. . Thereis s nooptionin the e installer
tocustomize startupoptions, so edit etc/Rconsole andetc/Rprofile.site toset these as
required. Then
cd installer
make msi
whichwillresultinafilewithanamelikeR-3.2.5-win32.msi.Thiscanbedouble-clickedtobe
installed,butthosewhoneeditwillknowwhattodowithit(usuallybyrunningmsiexec/iwith
additionaloptions). Properties s thatusersmight wanttosetfromthemsiexeccommandline
include‘ALLUSERS’,‘INSTALLDIR’(somethinglikec:\ProgramFiles\R\R-3.2.5) and‘RMENU’
Add page to pdf preview - insert pages into PDF file in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Guide C# Users to Insert (Empty) PDF Page or Pages from a Supported File Format
add and delete pages in pdf; add page number to pdf print
Add page to pdf preview - VB.NET PDF Page Insert Library: insert pages into PDF file in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Easy to Use VB.NET APIs to Add a New Blank Page to PDF Document
add page to pdf without acrobat; add page to a pdf
Chapter3:InstallingRunderWindows
17
(the path to the e ‘R’ ’ folder on the start t menu) ) and ‘STARTDIR’ (the e starting directory y for R
shortcuts,defaultingtosomethinglikec:\Users\name\Documents\R).
TheMSIinstallercanbebuiltbothfroma32-bitbuildofR(R-3.2.5-win32.msi)andfrom
a64-bitbuildofR(R-3.2.5-win64.msi,optionallyincluding32-bitfilesbysettingthemacro
HOME32,whenthenameisR-3.2.5-win.msi).Unlikethemaininstaller,a64-bitMSIinstaller
canonlyberunon64-bitWindows.
ThankstoDaviddelCampo(DeptofStatistics,University ofOxford)forsuggestingWiX
andbuildingaprototypeinstaller.
3.1.11 64-bitWindowsbuilds
Tobuilda64-bitversionofRyouneeda64-bittoolchain: theonlyonediscussedhereisbased
onthework oftheMinGW-w64project(http://sourceforge.net/projects/mingw-w64/,
butcommercialcompilerssuchasthosefromIntelandPGIcouldbeused(andhavebeenbyR
redistributors).
SupportforMinGW-w64wasdevelopedintheRsourcesovertheperiod2008–10andwas
firstreleasedaspartofR 2.11.0. . TheassistanceofYuGongatacrucialstepinportingRto
MinGW-w64isgratefullyacknowledged,aswellashelpfromKaiTietz,theleaddeveloperof
theMinGW-w64project.
Windows64-bitisnowcompletelyintegratedintotheRandpackagebuildsystems:a64-bit
buildisselectedinfileMkRules.local.
3.2 TestinganInstallation
TheWindowsinstallercontainsasetoftestfilesusedwhenbuildingR.
The Rtools are not neededtorunthese tests. . butmore e comprehensive analysisof errors
willbegivenifdiffisinthepath(anderrorsAreFatal=FALSEisthennotneededbelow).
LauncheitherRguiorRterm,preferablywith--vanilla.Thenrun
Sys.setenv(LC_COLLATE = = "C", , LANGUAGE E = = "en")
library("tools")
testInstalledBasic("both")
testInstalledPackages(scope = "base", , errorsAreFatal l = FALSE)
testInstalledPackages(scope = "recommended", errorsAreFatal l = = FALSE)
runsthebasictestsandthenallthetestsonthestandardandrecommendedpackages. These
tests canberunfromanywhere: : theywritesomeoftheirresultsinthetestsfolderoftheR
homedirectory(asgivenbyR.home()),andhencemayneedtoberunundertheaccountused
toinstallR.
Theresultsofexample(md5sums)whentestingtoolswilldifferfromthereferenceoutputas
somefilesareinstalledwithWindows’CRLFlineendings.
C# WinForms Viewer: Load, View, Convert, Annotate and Edit PDF
PDF Annotation. • Add sticky notes to PDF document in preview. Add text to PDF document in preview. • Add text box to PDF file in preview.
adding page numbers to pdf in reader; adding page numbers to a pdf in reader
C# WPF Viewer: Load, View, Convert, Annotate and Edit PDF
This page will mainly let you know: PDF Annotation. • Add sticky notes to PDF document. • Highlight PDF text in preview. • Add text to PDF document.
add a page to pdf file; add blank page to pdf preview
18
4 InstallingRunderOSX
Thefrontpageofa
CRAN
sitehasalink‘DownloadRforOSX’.Clickonthat,thendownload
thefileR-3.2.5.pkgandinstallit. ThisrunsonOSX10.9andlater(Mavericks,Yosemite,El
Capitan,...).
InstallersforR-patchedandR-develareusuallyavailablefromhttps://r.research.att.
com.
ForsomeolderversionsoftheOSyoucaninprinciple(itislittletested)installRfromthe
sources.
ItisimportantthatifyouuseabinaryinstallerpackagethatyourOSisfullyupdated:look
at‘Updates’fromthe‘AppStore’tobesure. (IfusingXQuartz,checkthatiscurrent.)
Toinstall,justdouble-clickontheiconofthefileyoudownloaded. Atthe‘InstallationType’
stage, note theoptionto‘Customize’. . This s currently shows four components: : everyone e will
needthe‘R Framework’component: : theremainingcomponents s areoptional. . (The e ‘Tcl/Tk’
componentis neededtouse package tcltk. . The‘Texinfo’component t isonlyneededbythose
installingsourcepackages.)
Thisis an n AppleInstallerpackage. . If f youencounter any problem during theinstallation,
pleasechecktheInstallerlogbyclickingonthe“Window”menuanditem“InstallerLog”.The
fulloutput(select“ShowAllLog”)isusefulfortrackingdownproblems. Notethetheinstaller
iscleverenoughtotrytoupgradethelast-installedversionoftheapplicationwhereyouinstalled
it(whichmaynotbewhereyouwantthistime...).
Various parts s of f the build require e XQuartz z to be e installed: : : see e https://xquartz.
macosforge.org/. These e include the tcltk package andthe X11 device: : attempting g touse
thesewithoutXQuartzwillremindyou.
IfyouupdateyourOSXversion,youshouldre-installR(andperhapsXQuartz):theinstaller
tailorstheinstallationtothecurrentversionoftheOS.
ForbuildingRfromsource,seeSectionC.3[OSX],page56.
4.1 RunningRunderOSX
TherearetwowaystorunRonOSXfroma
CRAN
binarydistribution.
ThereisaGUIconsolenormallyinstalledwiththeRiconin/Applicationswhichyoucan
runby double-clicking(e.g. . from m Launchpador r Finder). . (If f youcannotfindit thereit was
possiblyinstalledelsewheresotrysearchingforitinSpotlight.) Thisisusuallyreferredtoas
R.apptodistinguishitfromcommand-line R:its usermanualiscurrently partoftheOSX
FAQathttps://cran.r-project.org/bin/macosx/RMacOSX-FAQ.htmlandcanbeviewed
fromR.app’s‘Help’menu.
You can run command-line R and Rscript from m a a Terminal
1
so these e can be typed d as
commandslikeanyotherUnix-alike:seethenextchapterofthismanual. Therearesomesmall
differences whichmaysurprise usersofR onotherplatforms,notably thedefault locationof
thepersonallibrarydirectory(under~/Library/R,e.g. ~/Library/R/3.2/library),andthat
warnings,messagesandotheroutputtostderrarehighlightedinbold.
IthasbeenreportedthatrunningR.appunderYosemitemayfailifnopreferencesarestored,
soifitfailswhenlaunchedfortheveryfirsttime,tryitagain(thefirstattemptwillstoresome
preferences).
1
The installer r as s puts links s to
R
and
Rscript
in
/usr/bin
(Mavericks,
Yosemite) or
/usr/local/bin (El l Capitan and d later).
If these e are missing, , you can run directly y the versions
in/Library/Frameworks/R.framework/Resources/.
How to C#: Preview Document Content Using XDoc.Word
RasterEdge XDoc.Word provide you with APIs to get a thumbnail bitmap of the first page in the word document file. C# DLLs for Word File Preview. Add references:
add page number to pdf hyperlink; adding page numbers to a pdf in preview
How to C#: Preview Document Content Using XDoc.PowerPoint
APIs to get a thumbnail bitmap of the first page in the C# DLLs: Preview PowerPoint Document. Add necessary XDoc.PowerPoint DLL libraries into your created C#
adding a page to a pdf in reader; add page number to pdf online
Chapter4:InstallingRunderOSX
19
UsersofR.appneedtobeawareofthe‘AppNap’feature(https://developer.apple.com/
library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html) which
cancauseRtaskstoappeartorunveryslowlywhennotproducingoutputintheconsole. Here
arewaystoavoidit:
 Ensurethattheconsoleiscompletely y visible(oratleasttheactivityindicatoratthetop
rightcornerisvisible).
 InaTerminal,run
defaults write e org.R-project.R R NSAppSleepDisabled -bool YES
(see https://developer.apple.com/library/mac/releasenotes/MacOSX/
WhatsNewInOSX/Articles/MacOSX10_9.html).
UsingtheX11deviceortheX11-basedversionsofView()andedit()fordataframesand
matrices(thelatterarethedefaultforcommand-lineRbutnotR.app)requiresanXsub-system
tobeinstalled: seeSectionC.3[OSX],page56.(Asdothetcltkpackageandsomethird-party
packages.)
4.2 UninstallingunderOSX
RforOSXconsistsoftwoparts: theGUI(R.app)andtheRframework. Theun-installation
is as s simple as removing those folders (e.g. . by dragging theminto the Trash). . The e typical
installationwillinstalltheGUIintothe/Applications/R.appfolderandtheRframeworkinto
the/Library/Frameworks/R.framework folder. . The e links toR andRscript in/usr/bin or
/usr/local/binshouldalsoberemoved.
If you u want to o get t rid of f R more completely using g a a Terminal, , simply y run (use
/usr/local/binasfromElCapitan):
sudo rm m -rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/bin/R /usr/bin/Rscript
The
installation
consists of four
Apple
packages:
org.r-project.R.x86_
64.fw.pkg,
org.r-project.R.x86_64.GUI.pkg,
org.r-project.x86_64.tcltk.x11
and org.r-project.x86_64.texinfo o (not all of which h need d be e installed). . You u can n use
pkgutil--forgetifyouwanttheAppleInstallertoforgetaboutthepackagewithoutdeleting
itsfiles (usefulfor theR framework wheninstallingmultipleR versionsin n parallel), or r after
youhavedeletedthefiles.
Uninstallingthe Tcl/Tk orTexinfocomponents (whichareinstalledunder/usr/local)is
notassimple. YoucanlistthefilestheyinstalledinaTerminalby
pkgutil --files s org.r-project.x86_64.tcltk.x11
pkgutil --files s org.r-project.x86_64.texinfo
Thesearepathsrelativeto/,therootofthefilesystem.
4.3 Multipleversions
TheinstallerwillremoveanypreviousversionoftheRframeworkwhichitfindsinstalled. This
can be e avoided d by using pkgutil--forget t (see the previous section). . However, , note e that
different versions are installedunder r /Library/Frameworks/R.framework/Versions s as s 3.1,
3.2andsoon,soitisnotpossibletohavedifferent‘3.x.y’versionsinstalledforthesame‘x’.
AversionofRcanberundirectlyfromthecommand-linease.g.
/Library/Frameworks/R.framework/Versions/3.2/Resources/bin/R
However,R.appwillalwaysrunthe‘current’version,thatisthelastinstalledversion.Asmall
utility, Rswitch.app(availableat t https://r.research.att.com/#other), , canbe used to
changethe‘current’version. This s isof limiteduse as R.appiscompiledagainstaparticular
C# PDF insert image Library: insert images into PDF in C#.net, ASP
How to insert and add image, picture, digital photo, scanned signature or logo into PDF document page in C#.NET class application?
add page numbers to pdf preview; add remove pages from pdf
VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
Remove bookmarks, annotations, watermark, page labels and article threads from PDF while compressing. Also a preview component enables compressing and
add page numbers to a pdf; add a page to a pdf
20
versionofRandwilllikelycrashifswitchedtoanearlierversion. Thismayallowyoutoinstall
adevelopmentversionofR(de-selectingR.app)andthenswitchbacktothereleaseversion.
VB.NET PDF insert image library: insert images into PDF in vb.net
inserting image to PDF in preview without adobe provide users the most individualized PDF page image inserting function, allowing developers to add and insert
add and remove pages from pdf file online; adding page numbers pdf
How to C#: Preview Document Content Using XDoc.excel
you with APIs to get a thumbnail bitmap of the first page in the C# DLLs: Preview Excel Document without Microsoft Office Installed. Add necessary references:
add page number pdf; add page numbers to pdf in preview
21
5 RunningR
HowtostartRandwhatcommand-lineoptionsareavailableisdiscussedinSection“Invoking
R”inAnIntroductiontoR.
Youshould ensurethat t theshellhas set adequate resource limits: : R R expects astack size
ofatleast8MBandtobeabletoopenatleast256filedescriptors. (AnymodernOSshould
havedefaultlimitsatleastas largeas these,but apparentlyNetBSDmaynot. . Usetheshell
commandulimit(sh/bash)orlimit(csh/tcsh)tocheck.)
Rmakesuseofanumberofenvironmentvariables,thedefaultvaluesofmanyofwhichare
setinfileR_HOME/etc/Renviron(therearenonesetbydefaultonWindowsandhencenosuch
file). Thesearesetatconfiguretime,andyouwouldnotnormallywanttochangethem–a
possibleexceptionisR_PAPERSIZE(seeSectionB.3.1[Settingpapersize],page47). Thepaper
sizewillbededucedfromthe‘LC_PAPER’localecategoryifitexistsandR_PAPERSIZEisunset,
andthiswillnormallyproducetherightchoicefrom‘a4’and‘letter’onmodernUnix-alikes
(butcanalwaysbeoverriddenbysettingR_PAPERSIZE).
VariousenvironmentvariablescanbesettodeterminewhereRcreatesitsper-sessiontem-
porarydirectory.TheenvironmentvariablesTMPDIR,TMPandTEMParesearchedinturnandthe
firstonewhichissetandpointstoawritableareaisused.Ifnonedo,thefinaldefaultis/tmp
onUnix-alikesandthevalueofR_USERonWindows.Thepathshouldbeanabsolutepathnot
containingspaces(anditisbesttoavoidnon-alphanumericcharacterssuchas+).
Some Unix-alikesystems aresetuptoremovefilesanddirectories periodicallyfrom/tmp,
forexamplebyacronjobrunningtmpwatch. SetTMPDIRtoanotherdirectorybeforestarting
long-runningjobsonsuchasystem.
NotethatTMPDIRwillbeusedtoexecuteconfigurescriptswheninstallingpackages,soif
/tmphasbeenmountedas‘noexec’,TMPDIRneedstobesettoadirectoryfromwhichexecution
isallowed.
C# PDF insert text Library: insert text into PDF content in C#.net
Able to add a single text character and text string formatted text and plain text to PDF page using .NET Supports adding text to PDF in preview without adobe
adding page numbers in pdf file; add page number to pdf file
22
6 Add-onpackages
Itishelpfultousethecorrectterminology. Apackage e isloadedfromalibrarybythefunction
library(). Thusalibraryisadirectorycontaininginstalledpackages;themainlibraryisR_
HOME/library,butotherscanbeused,forexamplebysettingtheenvironmentvariableR_LIBS
orusingtheRfunction.libPaths().
6.1 Defaultpackages
Thesetofpackagesloadedonstartupisbydefault
> getOption("defaultPackages")
[1] "datasets" " "utils"
"grDevices" "graphics" " "stats"
"methods"
(plus,ofcourse,base)andthis canbechangedby settingtheoptioninstartupcode(e.g.in
~/.Rprofile).ItisinitiallysettothevalueoftheenvironmentvariableR_DEFAULT_PACKAGESif
set(asacomma-separatedlist). SettingR_DEFAULT_PACKAGES=NULLensuresthatonlypackage
baseisloaded.
Changing the set of f default packages s is s normally used to o reduce the set t for r speed d when
scripting:inparticularnotusingmethodswillreducethestart-uptimebyafactorofuptotwo
(andthisisdonebyRscript).ButitcanalsobeusedtocustomizeR,e.g.forclassuse.
6.2 Managinglibraries
R packages are installed into libraries, which are e directories s in the file e system containing a
subdirectoryforeachpackageinstalledthere.
Rcomeswithasinglelibrary,R_HOME/librarywhichisthevalueoftheRobject‘.Library’
containingthe standardandrecommended
1
packages. Bothsitesandusers s cancreate others
andmakeuseofthem(ornot)inanRsession. Atthelowestlevel‘.libPaths()’canbeused
toaddpathstothecollectionoflibrariesortoreportthecurrentcollection.
Rwillautomaticallymakeuseofasite-specificlibraryR_HOME/site-libraryifthisexists(it
doesnotinavanillaRinstallation).Thislocationcanbeoverriddenbysetting
2
‘.Library.site’
inR_HOME/etc/Rprofile.site,or(notrecommended)bysettingtheenvironmentvariableR_
LIBS_SITE.Like‘.Library’,thesitelibrariesarealwaysincludedby‘.libPaths()’.
Users can n have one or more libraries, normally y specified d by the environment t variable R_
LIBS_USER.Thishasadefaultvalue(toseeit,use‘Sys.getenv("R_LIBS_USER")’withinanR
session),butthat isonlyusedifthecorrespondingdirectoryactuallyexists(whichbydefault
itwillnot).
BothR_LIBS_USERandR_LIBS_SITEcanspecifymultiplelibrarypaths,separatedbycolons
(semicolonsonWindows).
6.3 Installingpackages
Packagesmay bedistributedinsourceformorcompiledbinary form. . Installingsourcepack-
ageswhichcontainC/C++/Fortrancoderequiresthatcompilersandrelatedtoolsbeinstalled.
Binarypackagesareplatform-specificandgenerallyneednospecialtoolstoinstall,butseethe
documentationforyourplatformfordetails.
Notethatyoumayneedtospecifyimplicitlyorexplicitlythelibrarytowhichthepackage
istobeinstalled. Thisisonlyanissueifyouhavemorethanonelibrary,ofcourse.
1
unlesstheywereexcludedinthebuild.
2
itsbindingislockedoncethestartupfileshavebeenread,souserscannoteasilychangeit.
Chapter6:Add-onpackages
23
EnsurethattheenvironmentvariableTMPDIRiseitherunset(and/tmpexistsandcanbewrit-
teninandexecutedfrom)oristheabsolutepathtoavalidtemporarydirectory,notcontaining
spaces.
For most users it t suffices s to o call ‘install.packages(pkgname)’ or r its s GUI equivalent t if
theintentionistoinstalla
CRAN
packageandinternetaccess isavailable.
3
Onmost systems
‘install.packages()’willallowpackagestobeselectedfromalistbox(typicallywithseveral
thousanditems).
ToinstallpackagesfromsourceonaUnix-alikeuseinaterminal
R CMD D INSTALL -l /path/to/library pkg1 pkg2 ...
Thepart‘-l/path/to/library’canbeomitted,inwhichcasethefirstlibraryofanormalR
sessionisused(thatshownby.libPaths()[1]).
Thereareanumberofoptionsavailable:useRCMDINSTALL--helptoseethecurrentlist.
Alternatively,packages canbedownloadedandinstalledfromwithinR.First chooseyour
nearest
CRAN
mirror usingchooseCRANmirror(). . Thendownloadandinstallpackagespkg1
andpkg2by
> install.packages(c("pkg1", , "pkg2"))
Theessential dependencies s of the specified d packages s willalso befetched. . Unless s the library
is specified(argument lib) the first library inthe library searchpath h is s used: : ifthis s is not
writable,Rwillasktheuser(inaninteractivesession)ifthedefaultpersonallibraryshouldbe
created,andifallowedtowillinstallthepackagesthere.
Ifyouwanttofetchapackageandallthoseitdependson(inanyway)thatarenotalready
installed,usee.g.
> install.packages("Rcmdr", , dependencies = = TRUE)
install.packagescaninstallasourcepackagefromalocal.tar.gzfile(oraURLtosuch
afile)bysettingargumentrepostoNULL: thiswillbeselectedautomaticallyifthenamegiven
isasingle.tar.gzfile.
install.packages canlook in n severalrepositories, specifiedas s a character vector by the
argument repos: : these e caninclude a
CRAN
mirror, Bioconductor, R-forge, rforge.net, local
archives,localfiles,...). FunctionsetRepositories() ) canselectamongstthoserepositories
thattheRinstallationisawareof.
Naiveuserssometimesforgetthataswellasinstallingapackage,theyhavetouselibrary
tomakeitsfunctionalityavailable.
6.3.1 Windows
Whatinstall.packagesdoesbydefaultisdifferentonUnix-alikes(exceptOSX)andWindows.
OnUnix-alikesitconsultsthelistofavailablesourcepackageson
CRAN
(orotherrepository/ies),
downloadsthelatestversionofthepackagesources,andinstallsthem(viaRCMDINSTALL).On
Windows itlooks(bydefault)firstatthelistofbinaryversionsofpackagesavailableforyour
version of R R anddownloads s the e latest versions (if any). . If f nobinary y version is s available or
the source version is newer, it t will install the e source versions of packages s without compiled
C/C++/Fortrancode,andofferto dosofor those with, ifmake is available (andthis can be
tunedbyoption"install.packages.compile.from.source").
OnWindowsinstall.packagescanalsoinstallabinarypackagefromalocalzipfile(or
theURLof suchafile)bysettingargumentrepostoNULL. . Rgui.exehas s amenuPackages
withaGUIinterfacetoinstall.packages,update.packagesandlibrary.
WindowsbinarypackagesforRaredistributedasasinglebinarycontainingeitherorboth
architectures(32-and64-bit).
3
Ifaproxyneedstobeset,see?download.file.
Chapter6:Add-onpackages
24
Afewofthebinarypackagesneedothersoftwaretobeinstalledonyoursystem:seeforexam-
plehttps://CRAN.R-project.org/bin/windows/contrib/3.2/@ReadMe.PackagesusingGtk+
(Cairo(https://CRAN.R-project.org/package=Cairo),RGtk2(https://CRAN.R-project.
org/package=RGtk2), cairoDevice (https://CRAN.R-project.org/package=cairoDevice)
andthosethatdependonthem)needthebindirectoryofabundleddistributionofGtk2from
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+orhttp://ftp.gnome.org/pub/
gnome/binaries/win64/gtk+ inthepath: : itshouldworktohaveboth32-and64-bitGtk+
bindirectoriesinthepathona64-bitversionofR.
RCMDINSTALLworksinWindowstoinstallsourcepackages.Noadditionaltoolsareneeded
ifthepackage doesnotcontaincompiledcode,andinstall.packages(type="source")will
work for suchpackages (andfor thosewithcompiledcodeif thetools(see Appendix D[The
Windows toolset], page e 67) are inthe path). . We e have seen occasional permission problems
afterunpackingsourcepackagesonsomesystems:thesehavebeencircumventedbysettingthe
environmentvariableR_INSTALL_TARto‘tar.exe’.
If youhaveonly asourcepackage thatis knowntowork withcurrent R andjustwant a
binary Windows build d of f it, , you could make use of the building service offeredat t http://
win-builder.r-project.org/.
ForalmostallpackagesRCMDINSTALLwillattempttoinstallboth32-and64-bitbuildsof
apackageif runfroma32/64-bitinstallof R.Itwillreport success iftheinstallationofthe
architectureoftherunningRsucceeded,whetherornottheotherarchitecturewassuccessfully
installed. Theexceptionsarepackageswithanon-emptyconfigure.winscriptorwhichmake
useofsrc/Makefile.win. Ifconfigure.windoessomethingappropriatetobotharchitectures
use
4
option--force-biarch: otherwiseRCMDINSTALL--merge-multiarchcanbeappliedto
asourcetarballtomergeseparate32-and64-bitinstalls.(Thiscanonlybeappliedtoatarball,
andwillonlysucceedifbothinstallssucceed.)
If youhave a package without t compiled code e and no Windows-specific help, youcan zip
upaninstallationonanotherOSandinstallfromthatzipfileonWindows. However,sucha
packagecanbeinstalledfromthesourcesonWindowswithoutanyadditionaltools.
There is provision to make use of a system-wide library of installedexternalsoftware by
settingthe make variable LOCAL_SOFT, to give an equivalent of /usr/local l ona a Unix-alike.
Thiscanbesetinsrc/gnuwin/MkRules.localwhenRisbuiltfromsources(seethecomments
in src/gnuwin/MkRules.dist), or infile
5
etc/i386/Makeconf or r etc/x64/Makeconf f for an
installedversionofR.Theversionusedby
CRAN
canbeinstalledasdescribedinSection3.1
[Buildingfromsource],page12.
6.3.2 OSX
OnOSXinstall.packagesworksasitdoesonotherUnix-alikesystems,butthereareaddi-
tionaltypesstartingwithmac.binary(availableforthe
CRAN
distributionbutnotwhencom-
pilingfromsource: mac.binary.mavericksfora‘Mavericks’buildwith"default"asynonym
fortheappropriatevariant)whichcanbepassedtoinstall.packagesinorder todownload
andinstallbinarypackages fromasuitablerepository. . TheseOSXbinary y package files have
theextension‘.tgz’. TheR.appGUIprovidesmenusforinstallationofeitherbinaryorsource
packages,from
CRAN
orlocalfiles.
OnR buildsusingbinarypackages,thedefault istypeboth: : this s looks first at the list of
binary packagesavailableforyourversionofR andinstallsthelatest versions (if any). . Ifno
binary versionis availableorthesource versionisnewer,it willinstallthesourceversionsof
4
forasmallnumber of
CRAN
packageswherethisisknown tobesafeandisneeded bytheautobuilder this
isthedefault. Lookatthesourceoftools:::.install_packagesforthelist. Itcanalsobespecifiedin the
package’sDESCRIPTIONfile.
5
orbyaddingitinafilesuchasetc/i386/Makevars.site,whichdoesnotexistbydefault.
Chapter6:Add-onpackages
25
packages withoutcompiledC/C++/Fortrancode andoffertodo soforthose with,if make is
available.
Notethatmostbinarypackagesincludingcompiledcodearetiedtoaparticularseries(e.g.
R3.2.xor3.1.x)ofR.
Installingsourcepackageswhichdonotcontaincompiledcodeshouldworkwithnoadditional
tools. Forothersyouwillneedthe‘CommandLineTools’forXcodeandcompilerswhichmatch
thoseusedtobuildR:seeSectionC.3[OSX],page56.
PackagerJava(https://CRAN.R-project.org/package=rJava)andthosewhichdependon
itneedaJavaruntimeinstalledandseveralpackagesneedX11installed,includingthoseusing
Tk. SeeSectionC.3[OSX],page56,andSectionC.3.3[Java(OSX)],page58.
Tcl/TkextensionsBWidgetandTktablearepartoftheTcl/TkcontainedintheRinstaller.
Thesearerequiredbyanumberof
CRAN
andBioconductorpackages.
Afewofthebinarypackagesneedothersoftwaretobeinstalledonyoursystem.Inparticular
packages using Gtk+ (RGtk2 (https://CRAN.R-project.org/package=RGtk2), , cairoDevice
(https://CRAN.R-project.org/package=cairoDevice)andthosethatdependonthem)need
theGTK frameworkinstalledfrom https://r.research.att.com/libs/: : the e appropriate
versionatthetimeofwritingwashttps://r.research.att.com/libs/GTK_2.24.17-X11.pkg
Thedefaultcompilersspecifiedin/Library/Frameworks/R.framework/Resources/etc/Makeconf
dependontheversionofOSXunderwhichRwasinstalled,andareappropriateforthelatest
versionofthe‘CommandLineTools’forthat versionof OSXandthe recommendedversion
ofFortran(seeSectionC.3[OSX],page56). The e settingscanbechanged,either by editing
thatfileorinafilesuchas~/.R/Makevars(seethenextsection). Entrieswhichmayneedto
be changed include‘CC’, ‘CXX’,‘FC’,‘F77’, ‘FLIBS’ andthe corresponding flags, and perhaps
‘CXXCPP’,‘DYLIB_LD’,‘MAIN_LD’,‘SHLIB_CXXLD’,‘SHLIB_FCLD’and‘SHLIB_LD’.
SoforexampleyoucouldselectclangforbothCandC++withextensivecheckingbyhaving
in~/.R/Makevars
CC=clang
CXX=clang++
CFLAGS=-mtune=native -g -O2 2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic c -Wconversion
6.3.3 Customizingpackagecompilation
The R system andpackage-specific compilation flags canbe overridden or added to by y set-
tingtheappropriateMakevariables inthe personalfileHOME/.R/Makevars-R_PLATFORM(but
HOME/.R/Makevars.winorHOME/.R/Makevars.win64 onWindows),orifthat doesnotexist,
HOME/.R/Makevars,where‘R_PLATFORM’istheplatformfor whichRwasbuilt,asavailablein
the platform m component t of f the e R R variable R.version. . An n alternative personal file can be
specifiedviatheenvironmentvariableR_MAKEVARS_USER.
Packagedevelopersareencouragedtousethismechanismtoenableareasonableamountof
diagnosticmessaging(“warnings”)whencompiling,suchase.g.-Wall-pedanticfortoolsfrom
GCC,theGnuCompilerCollection.
Notethat this mechanismcanalsobeusedwhenit necessary to change theoptimization
levelforaparticularpackage.Forexample
## forCcode
CFLAGS=-g -O -mtune=native
## forC++code
CXXFLAGS=-g -O -mtune=native
## forFortrancode
FFLAGS=-g -O -mtune=native
Documents you may be interested
Documents you may be interested