How to build an R package in Windows

Let’s suppose you ‘re in the mood to create an R package and then upload it to CRAN as an ideal way of making sure others have access to your work. I don’t know if the following guide will really help you cause the R package mechanism is rather complex, but I’m quite sure it’ll be better than nothing.

A. Toolbox (necessary pieces of software you have to install first)

0. Latest version of R.
1. rtools: a minimal set of Unix utilities
2. ActivePerl: a scripting language
3. MinGW: Compiler system, uses GCC to produce Windows programs
4. Microsoft’s HTML Compiler: It’s called htmlhelp.exe and includes hhc.exe
5. A version of TeX (I use MiKTeX)

B. Change your Windows Path “environmental variable”

To set the path, right click on the “My Computer” icon on your desktop. Choose properties and click on the “advanced” tab. Click the environmental variables button and you will see a new window. Change the system variable “Path”. To do so, click on the variable and select the edit button. Change the path so that the directories containing MikTeX, Rtools, minGW, perl, R and the html help compiler. You will need to be very careful to type the path names correctly. See below for an example of the beginning of the path as set on my machine:

C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\R\R-2.10.1\bin;c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Perl\bin;C:\Program Files\MiKTeX 2.7\miktex\bin

Restart your machine.

C. Build your hello package (eventually)

- Open a “Command Prompt” window. Check if path is correct (type path).
- Run R through the command prompt (type R)
- Type package.skeleton("hello",code_="hello.r")
- Exit R (type q() )
(the hello directory was created and now you have to carefully edit the DESCRIPTION file which is under the hello directory and the hello.Rd file which is under the man directory, search for examples of these files in other package installations, you can find plenty of them in the lib directory, which is under your R installation directory)

- Back to the command prompt window, type R CMD build hello (hello.tar.gz was created)
- Type R CMD INSTALL --build hello (hello.zip was created)
- Type R CMD check hello for an extensive check of your package installation

In the unlikely event that everything went fine so far (no errors, no warnings) you just have to upload the hello.tar.gz file to ftp://cran.r-project.org/incoming/ and send an email to cran@r-project.org that you did it. Otherwise, google the bad news and hope for the best.

Other resources for building R packages:
[Making packages under Windows]
[Creating R packages: a tutorial]
[An introduction to the R package mechanism]
[Create packages for R]

Buzzdigmeblogspacedeliciousgoogle bookmarks

Popularity: 1% [?]

Ψηφιακή Ελλάδα Γειά Σου

Έγραψε πρώτα ο argos στο Open:mag

Η παρακάτω εικόνα είναι από την πρώτη ημέρα της Infosystem το περίπτερο της Ψηφιακής Ελλάδας. Εκπομπής της κρατικής ΕΤ1 με παρουσιαστή τον κ. Βασιλάκο πρόεδρο της ΕΕΧΙ. Λεφτά πεταμένα, λεφτά του ελληνικού λαού, αλλά τουλάχιστον δείχνει την πραγματικότητα, το κενό στην καινοτομία.

Το σταντ της εκπομπής Ψηφιακή Ελλάδα, Σάββατο 04/10/08
Το σταντ της εκπομπής Ψηφιακή Ελλάδα, Σάββατο 04/10/08 by argos

Συνέχισε σήμερα ο vrypan με αφορμή το γεμάτο ανακρίβειες ρεπορτάζ της ΝΕΤ για την πρόσφατη επίσκεψη των blogger στις Βρυξέλλες.

Αναπαράγω δύο ερωτήματα και προσθέτω άλλα δύο που στριφογυρίζουν στο μυαλό μου και περιμένουν απάντηση από αρμόδια χείλη.

1) Έχει κάποια σχέση η Ψηφιακή Ελλάδα (εκπομπή της ET1), με την Ψηφιακή Ελλάδα (καμπάνια του Υπουργείου Οικονομικών);

2) Ποιός πλήρωσε το άδειο περίπτερο της “Ψηφιακής Ελλάδας” στη φετινή Infosystem (7.500 ευρώ); Η ΕΡΤ; Το υπουργείο; Η ΕΕΧΙ; Μήπως πρόκεται για το περίπτερο που βραβεύτηκε από τους διοργανωτές για την ολοκληρωμένη, λειτουργική και αισθητικά άψογη οργάνωσή του;

3) Ήταν τυχαίες οι ανακρίβειες και παραλείψεις που αναφέρθηκαν και έγιναν δια στόματος κ. Βασιλάκου στο ρεπορτάζ της ΝΕΤ για την πρόσφατη επίσκεψη των blogger στις Βρυξέλλες;

4) Τι είδους δραστηριότητα έχει ο πρόεδρος της Ε.Ε.Χ.Ι. ως ένα από πέντε βασικά μέλη της Ομάδας του Υπουργείου Οικονομίας και Οικονομικών για την Ψηφιακή Ασφάλεια (D.A.R.T.) (βλέπε βιογραφικό); Θα αφιερώσει κάποια εκπομπή του ο κ. Βασιλάκος στις μέχρι τώρα δράσεις της Ομάδας, ώστε να αποσαφηνιστούν οι γενικές προτάσεις του τύπου Πρόληψη Ψηφιακών Κινδύνων και προτάσεις πολιτικής για την ασφάλεια (σελ. 5);

Update 13/10: Έγραψαν επίσης John Toubanos, Πρόχειρο Τετράδιο.

Buzzdigmeblogspacedeliciousgoogle bookmarks

Popularity: 49% [?]

Οικο-Λόγια

ΚαμιάΦοράΤρομάζωΜεΤηΣκέψη:
ΠόσοΧαρτί,ΧώροΚαιΧρόνοΘαΕξοικονομούσεΗΑνθρωπότητα
ΑνΔενΥπήρχανΤαΚενάΑνάμεσαΣτιςΛέξεις.
ΑνΔηλαδήΟιΛέξειςΓράφοντανΔιαδοχικάΜεΜιαΆλληΣύμβασηΑντίΓιαΤοΚενόΝαΤιςΧωρίζει.
ΑςΠούμεΝαΣυντάσσονταιΜεΠρώτοΓράμμαΚεφαλαίο.
ΟλόκληραΚατεβατάΣτηνΚυριολεξία.

ΜαΚάποιαΛόγιαΠάλιΚενάΘαΜέναν.

Buzzdigmeblogspacedeliciousgoogle bookmarks

Popularity: 36% [?]

Next Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2010 amarkos|gr|blog | powered by WordPress with Barecity