<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://biowerkzeug.org/index.php?action=history&amp;feed=atom&amp;title=R</id>
	<title>R - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://biowerkzeug.org/index.php?action=history&amp;feed=atom&amp;title=R"/>
	<link rel="alternate" type="text/html" href="https://biowerkzeug.org/index.php?title=R&amp;action=history"/>
	<updated>2026-04-21T16:23:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://biowerkzeug.org/index.php?title=R&amp;diff=75&amp;oldid=prev</id>
		<title>Orbeckst at 19:43, 30 June 2008</title>
		<link rel="alternate" type="text/html" href="https://biowerkzeug.org/index.php?title=R&amp;diff=75&amp;oldid=prev"/>
		<updated>2008-06-30T19:43:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:43, 30 June 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l110&quot;&gt;Line 110:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 110:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Python]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Python]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Software]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Orbeckst</name></author>
	</entry>
	<entry>
		<id>https://biowerkzeug.org/index.php?title=R&amp;diff=72&amp;oldid=prev</id>
		<title>Orbeckst: from Woolf Wiki (main author Juan R Perilla)</title>
		<link rel="alternate" type="text/html" href="https://biowerkzeug.org/index.php?title=R&amp;diff=72&amp;oldid=prev"/>
		<updated>2008-06-30T19:40:31Z</updated>

		<summary type="html">&lt;p&gt;from Woolf Wiki (main author Juan R Perilla)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[http://www.r-project.org/ R] (also known as the &amp;#039;&amp;#039;&amp;#039;R project&amp;#039;&amp;#039;&amp;#039;) is a free software environment and language for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. &amp;#039;&amp;#039;R&amp;#039;&amp;#039; is a free implementation of the statistical programming language &amp;#039;&amp;#039;S&amp;#039;&amp;#039; and &amp;#039;&amp;#039;S-Plus&amp;#039;&amp;#039; developed at Bell labs on the 80-90s. It is object oriented and provides several tools for statistical analysis, however it can be used for data manipulation, calculation and graphical display as well. &lt;br /&gt;
&lt;br /&gt;
Notably, it can be used from [[python]] using &amp;#039;&amp;#039;&amp;#039;[[rpy]]&amp;#039;&amp;#039;&amp;#039; which makes all R functions available to python.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
Essential reading&lt;br /&gt;
&lt;br /&gt;
* [http://cran.r-project.org/doc/manuals/R-intro.html An introduction to R]&lt;br /&gt;
* [http://cran.r-project.org/doc/manuals/R-admin.html Installation and administration]&lt;br /&gt;
&lt;br /&gt;
Additional reading &lt;br /&gt;
&lt;br /&gt;
* [http://cran.r-project.org/manuals.html Manuals]&lt;br /&gt;
* [http://cran.r-project.org/faqs.html FAQ] &lt;br /&gt;
* [http://wiki.r-project.org/ Wiki]&lt;br /&gt;
* [http://www.r-project.org/doc/bib/R-books.html Books]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
First obtain R from one of the [http://cran.r-project.org/mirrors.html CRAN mirrors]. Or alternatively use one of the following links:&lt;br /&gt;
&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/bin/windows/base/release.htm Base for wintendo]&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/bin/linux/ Linux]&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/bin/macosx/ OS-X]&lt;br /&gt;
&lt;br /&gt;
Windows and Mac users most likely want the precompiled binaries listed above, not the source code. The sources have to be compiled before you can use them. If you do not know what this means, you probably do not want to do it!&lt;br /&gt;
&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/src/base/R-latest.tar.gz Source code]&lt;br /&gt;
&lt;br /&gt;
Then follow the instructions in:&lt;br /&gt;
&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/doc/manuals/R-admin.html#Installing-R-under-Windows Windows]&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/doc/manuals/R-admin.html#Installing-R-under-Mac-OS-X OS-X]&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/doc/manuals/R-admin.html#Installing-R-under-Unix-alikes Proper *NIX]&lt;br /&gt;
&lt;br /&gt;
== Using R ==&lt;br /&gt;
&lt;br /&gt;
Probably the coolest &amp;#039;&amp;#039;feature&amp;#039;&amp;#039; in R is its object oriented design: almost everything is an object in &amp;#039;&amp;#039;R&amp;#039;&amp;#039;. Hierarchy, operator/function overcharge and OOP in general is highly and elegantly used, thus if you are familiar with OO languages you&amp;#039;ll have a lot of fun.  &lt;br /&gt;
&lt;br /&gt;
=== Package management ===&lt;br /&gt;
&lt;br /&gt;
R is upgradeable via third-party packages. This packages can be updated/delete &amp;#039;&amp;#039;a la&amp;#039;&amp;#039; perl. That is, packages can be downloaded and installed from within R. First set the option CRAN to your nearest CRAN mirror using chooseCRANmirror(). Then download and install packages pkg1 and pkg2 by&lt;br /&gt;
&lt;br /&gt;
     &amp;gt; install.packages(c(&amp;quot;pkg1&amp;quot;, &amp;quot;pkg2&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
The essential dependencies of the specified packages will also be fetched. Unless the library is specified (argument lib) the first library in the library search path is used: if this is not writable, R will ask the user (in an interactive session) if the default user library should be created, and if allowed to will install the packages there.&lt;br /&gt;
&lt;br /&gt;
If you want to fetch a package and all those it depends on that are not already installed, use e.g.&lt;br /&gt;
&lt;br /&gt;
     &amp;gt; install.packages(&amp;quot;Rcmdr&amp;quot;, dependencies = TRUE)&lt;br /&gt;
&lt;br /&gt;
In case you want to compile packages yourself use&lt;br /&gt;
 &lt;br /&gt;
    &amp;gt; install.packages(c(&amp;quot;pkg1&amp;quot;,...), type=&amp;quot;source&amp;quot;)    &lt;br /&gt;
&lt;br /&gt;
Removing packages is easy as well, from a running R process they can be removed by&lt;br /&gt;
&lt;br /&gt;
     &amp;gt; remove.packages(c(&amp;quot;pkg1&amp;quot;, &amp;quot;pkg2&amp;quot;),&lt;br /&gt;
                       lib = file.path(&amp;quot;path&amp;quot;, &amp;quot;to&amp;quot;, &amp;quot;library&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;tt&amp;gt;update.packages()&amp;lt;/tt&amp;gt; is the simplest way to ensure that all the packages on your system are up to date.&lt;br /&gt;
&lt;br /&gt;
* [http://lib.stat.cmu.edu/R/CRAN/doc/manuals/R-admin.html#Add-on-packages More information on package installation]&lt;br /&gt;
&lt;br /&gt;
=== Data structures ===&lt;br /&gt;
&lt;br /&gt;
There are several different structures in R namely:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Numbers&amp;#039;&amp;#039;&amp;#039; : 1,2,3,5,8 ... &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Vectors&amp;#039;&amp;#039;&amp;#039; : myvec &amp;lt;- c(1,2,3)&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Matrices&amp;#039;&amp;#039;&amp;#039; : x &amp;lt;- array(1:20, dim=c(4,5)) &amp;#039;&amp;#039;&amp;#039;or&amp;#039;&amp;#039;&amp;#039;  x &amp;lt;- matrix(c(1:20),4,5)&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Lists&amp;#039;&amp;#039;&amp;#039; : Lst &amp;lt;- list(name=&amp;quot;Fred&amp;quot;, wife=&amp;quot;Mary&amp;quot;, no.children=3,&lt;br /&gt;
                   child.ages=c(4,7,9))&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Tables&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Matrices&amp;#039;&amp;#039;&amp;#039; are different structures and cannot be indistinctively used. Individual elements of an array, matrix or list can be accessed in a C-like way:&lt;br /&gt;
Thus for the examples above the individual elements can be accessed as:&lt;br /&gt;
&lt;br /&gt;
 myvec&amp;lt;nowiki&amp;gt;[[2]]&amp;lt;/nowiki&amp;gt; and is the number 2&lt;br /&gt;
 x&amp;lt;nowiki&amp;gt;[3,2]&amp;lt;/nowiki&amp;gt; and is the number 7&lt;br /&gt;
 Lst$name is the same as Lst&amp;lt;nowiki&amp;gt;[[1]]&amp;lt;/nowiki&amp;gt; and is the string &amp;quot;Fred&amp;quot;,&lt;br /&gt;
 Lst$wife is the same as Lst&amp;lt;nowiki&amp;gt;[[2]]&amp;lt;/nowiki&amp;gt; and is the string &amp;quot;Mary&amp;quot;,&lt;br /&gt;
 Lst$child.ages&amp;lt;nowiki&amp;gt;[1]&amp;lt;/nowiki&amp;gt; is the same as Lst&amp;lt;nowiki&amp;gt;[[4]][1]&amp;lt;/nowiki&amp;gt; and is the number 4. &lt;br /&gt;
&lt;br /&gt;
== Reading a file ==&lt;br /&gt;
&lt;br /&gt;
Say you have a file &amp;#039;&amp;#039;ufsr.plot&amp;#039;&amp;#039;, which is a two column file then you might want to read it as&lt;br /&gt;
&lt;br /&gt;
 filename=&amp;quot;ufsr.plot&amp;quot;&lt;br /&gt;
 mytable &amp;lt;- read.table(filename,header=FALSE)&lt;br /&gt;
 myvec1 &amp;lt;- mytable&amp;lt;nowiki&amp;gt;[[1]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 myvec2 &amp;lt;- mytable&amp;lt;nowiki&amp;gt;[[2]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or alternatively &lt;br /&gt;
&lt;br /&gt;
 a=matrix(scan(filename,what=0),200,200,byrow=TRUE)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Emacs Speaks Statistics ==&lt;br /&gt;
&lt;br /&gt;
For emacs junkies. This package provides highlighting and other cool interfaces to R (and other statistical analysis packages) &lt;br /&gt;
&lt;br /&gt;
* [http://ess.r-project.org/ ESS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Analysis]]&lt;br /&gt;
[[Category:Statistics]]&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Orbeckst</name></author>
	</entry>
</feed>