R is a program and environment for statistical computing and graphics. See project's webpage at http://www.r-project.org as well as a short Polish translation Co to jest R?.
On this page you will find:
- A collection of packages I wrote for R
- Information how to access my R repository containing my packages
- Miscelaneous notes
- Collection of links related to R
Packages
Some of the packages I wrote for R:
bojan- A rather loose collection of functions and data. Things that were once usefull, and probably will be in the future. See bojan.txt for a brief description of contents of the latest version of the package. The package manual (in PDF) is available here. Get the package through the R repository.
mbtools-
Set of miscelaneous tools, some of them moved-out from package
bojan. See mbtools.txt for a table of contents, and mbtools.pdf for the package reference manual. rgraph6- Interface to 'graph6' format for efficient storing of undirected graphs. Functions include converting square binary adjacency matrices into 'graph6' symbols and vice versa. Format is due too Brendan McKay (http://cs.anu.edu.au/people/bdm/data/formats.txt). The package is now available through R-Forge. You can view the description of the 1.2 version here: rgraph6.txt, and it's reference manual here. For the newer versions go to R-Forge, see this post on my weblog.
texer- Functions for exporting objects from R to LaTeX. See texer.txt for a description of contents of the latest version. The full package manual is available here. Get it through the R repository. (Still a lot of bugs!!!)
Repository
I have created a repository for my R packages as described in the section 6.6 of R Installation and Administration manual. You can install or download any of my packages directly from R and, moreover, have them automatically updated.
It contains source and windows binary distributions.
Downloading and installing
With a repository like mine you can download and/or install packages directly from R. You can either download a source or binary distribution without installation or directly install a package.
To download a package without installation you use the function
download.packages:
# to download the sources only
download.packages("bojan", destdir="c:/R",
repos="http://bojan.3e.pl/R", type="source")
# to download the binary version for windows
download.packages("bojan", destdir="c:/R",
repos="http://bojan.3e.pl/R", type="win.binary")
The argument destdir is the location where the file will be saved.
To install any of my packages directly you use a function
install.packages with appropriate arguments pointing to my
repository. For example to install package bojan you need to
type:
install.packages( "bojan", repos="http://bojan.3e.pl/R")
Package bojan will be downloaded and installed to the default
library tree. The default location is the one on the first position in the
vector returned by .LibPaths(). If there are no additional library
trees defined the default location is $RHOME/library.
Automatic updating
Another feature of using the repository is the possibility for automatic updating. With small addition to your personal configuration file R will automatically check my server for newer versions of any of my packages you have installed.
We need to create a user copy of Rprofile file in your user
directory. Under Windows system user directory probably is defined as
c:\documents and settings\userName\my documents.
If you are not sure
open R and type Sys.getenv("R_USER").
This will return the appropriate path.
If there is no copy of Rprofile in your user directory yet create
it by copying the Rprofile file from $RHOME/etc.
Now edit this file and add the following lines:
local({
r <- getOption("repos")
r["bojan"] <- "http://bojan.3e.pl/R"
options(repos=r)
})
This basically adds my repository to the list of places
in which R looks for packages if instructed to install
or update a package.
Now if you go to menu "Packages | Install package(s)..."
the list will include my packages as well. Also, if you use
update.packages then R will also
look on my server for newer versions.
Notes
Miscelaneous notes
- How to do analyzes with case weights (in Polish) Jak ważyć dane w R z przykładami dla PGSS
- Collection of resources for programming in S4 system
Links
- R hompage
- R Site Search integrated search of R documentation and e-mail list archives.
- R wiki
- R Graph Gallery
