Yield, Performance, Profitability
Building Packages On Windows
!
Requires Rtools
• Contains all compilers and Unix tools
• http://www.murdoch-sutherland.com/Rtools
!
LaTeX: http://www.miktex.org 
!
For additional help, see:  
Google 
• r-devel mailing list
FAQ: 
http://cran.cnr.berkeley.edu/bin/windows/base/rw-FAQ.html
• http://faculty.chicagogsb.edu/peter.rossi/research/bayes%20book/b
, accessed 2008.11.02
21 / PDF Solutions Inc.
Convert pdf to editable ppt - application SDK utility:C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF in C#.net, ASP.NET MVC, WinForms, WPF
Online C# Tutorial for Creating PDF from Microsoft PowerPoint Presentation
www.rasteredge.com
Convert pdf to editable ppt - application SDK utility:VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to PDF in vb.net, ASP.NET MVC, WinForms, WPF
VB.NET Tutorial for Export PDF file from Microsoft Office PowerPoint
www.rasteredge.com
Yield, Performance, Profitability
Building Packages On Mac
!
Mac tools are usually not loaded “out-of-the-box”
• Required tools maybe downloaded or installed from 
the OSX installation CDs
• http://developer.apple.com/tools/xcode/
!
Latex: http://www.tug.org/mactex/
!
Building packages on PPC and Intel Macs slightly 
different
• See the FAQ 5.4 on link below
!
Help
http://cran.cnr.berkeley.edu/bin/macosx/RMacOSX-FA
• R-SIG-Mac mailing list
22 / PDF Solutions Inc.
application SDK utility:Online Convert PDF to Text file. Best free online PDF txt
RasterEdge PDF document conversion SDK provides reliable and effective .NET solution for Visual C# developers to convert PDF document to editable & searchable
www.rasteredge.com
Yield, Performance, Profitability
23 / PDF Solutions Inc.
Typical Package Check And Install Sequence 
!
R CMD build packageName 
• (or “R CMD build pkg” with an R-Forge package) 
• Windows:  in a “Command Prompt” window with 
‘packageName’ in the local directory 
• Creates “packageName_x.y-z.tar.gz” 
!
R CMD check packageName_x.y-z.tar.gz 
!
R CMD install packageName_x.y-z.tar.gz
• Installs it in your local installation of R 
!
R CMD install --build packageName_x.y-z.tar.gz 
Creates “packageName_x.y-z.zip”, which can be 
used to install “packageName” on other Windows 
computers  
current package 
version number
All “R CMD” commands are executed in a Windows 
CMD terminal (or analogous terminal for other OSes)
Yield, Performance, Profitability
24 / PDF Solutions Inc.
Cryptic Error Message?  
!
invisible(lapply(list.files(“~packagepath/R", full = 
TRUE, pattern="\\.R$"), source))
This call individually sources every R file in a 
directory
• Identifies particular functions and lines with syntax 
errors 
!
Google 
!
RSiteSearch 
• www.r-project.org " Search 
• Function in R (i.e. RSiteSearch(restrict = “functions”))
• R-devel mailing list
!
Undo recent changes and try again from the last 
working version 
Yield, Performance, Profitability
25 / PDF Solutions Inc.
Submitting A Package To CRAN 
!
www.r-project.org -> CRAN -> (select a local mirror)  
!
Build packageName_x.y-z with the current version of R 
!
Upload to ftp://cran.r-project.org/incoming 
packageName_x.y-z.tar.gz 
• (With firewall problems, can you use a different computer?)  
!
Email “cran@r-project.org” 
subj: packageName_x.y-z.tar.gz now on CRAN 
• text:  “uploaded to CRAN\incoming. GPL (>= 2)” 
Yield, Performance, Profitability
26 / PDF Solutions Inc.
Outline 
!
Installing R and R Packages 
!
Obtaining source code 
!
Creating R packages 
!
Establishing and Maintaining Local R Archive 
Networks 
!
Using Subversion (SVN) 
Yield, Performance, Profitability
Local R Archive Networks 
!
Why:  
• Share work with others that 
you may not want to share 
with the world 
27 / PDF Solutions Inc.
!
How:  
• Requires access to a web server
Then setting up a very specific directory structure to hold 
both source and binary packages
• bin directory contains compiled packages for Windows 
(*.zip) or Mac (*.tgz)
Must contain a subdirectory for every supported version of 
R
• src directory contains package source (*.tar.gz)
Yield, Performance, Profitability
Repository Directory Structure
!
/www (directory that is visible from web)
• bin
•windows
•contrib
• 2.7 "
• 2.8 "
•macosx
contrib
• 2.7 "
• 2.8 "
• src
•contrib "
28 / PDF Solutions Inc.
package1_x.y-z.zip
package2_x.y-z.zip
PACKAGES
package1_x.y-z.tgz
package2_x.y-z.tgz
PACKAGES
package1_x.y-z.tar.gz
package2_x.y-z.tar.gz
PACKAGES
Yield, Performance, Profitability
Accessing The Repository Via install.packages
!
The PACKAGES file 
identifies which version to 
install
• Contents of PACKAGES 
equal DESCRIPTION file 
from each package
29 / PDF Solutions Inc.
!
Installing a package
• install.packages(“packageName”, repos = 
“http://my.Rrepos.com”)
• Or add to Rprofile.site (in $RHOME/etc)
options(repos = c(CRAN = "http://cran.cnr.berkeley.edu",
myCRAN = "http://my.Rrepos.com",
CRANextra = "http://www.stats.ox.ac.uk/pub/RWin"),
max.print=222)
R.home() # R installation directory 
Yield, Performance, Profitability
30 / PDF Solutions Inc.
Outline 
!
Installing R and R Packages 
!
Obtaining source code 
!
Creating R packages 
!
Establishing and Maintaining Local R Archive 
Networks 
!
Using Subversion (SVN) 
• Why?  
Installing and Using Subversion 
• R-Forge 
• a local Subversion (SVN) repository
How to use 
•How to establish and maintain 
Documents you may be interested
Documents you may be interested