Revision: 532
          http://rpy.svn.sourceforge.net/rpy/?rev=532&view=rev
Author:   lgautier
Date:     2008-05-24 00:31:06 -0700 (Sat, 24 May 2008)

Log Message:
-----------
Moved the documentation to Sphinx

Added Paths:
-----------
    branches/rpy_nextgen/doc/Makefile
    branches/rpy_nextgen/doc/build/
    branches/rpy_nextgen/doc/source/
    branches/rpy_nextgen/doc/source/_static/
    branches/rpy_nextgen/doc/source/_templates/
    branches/rpy_nextgen/doc/source/conf.py
    branches/rpy_nextgen/doc/source/index.rst
    branches/rpy_nextgen/doc/source/overview.rst
    branches/rpy_nextgen/doc/source/preface.rst
    branches/rpy_nextgen/doc/source/rinterface.rst
    branches/rpy_nextgen/doc/source/robjects.rst
    branches/rpy_nextgen/doc/source/rpy_classic.rst
    branches/rpy_nextgen/doc/source/rpy_logo_header.png

Added: branches/rpy_nextgen/doc/Makefile
===================================================================
--- branches/rpy_nextgen/doc/Makefile                           (rev 0)
+++ branches/rpy_nextgen/doc/Makefile   2008-05-24 07:31:06 UTC (rev 532)
@@ -0,0 +1,70 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
+
+help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html      to make standalone HTML files"
+       @echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
+       @echo "  htmlhelp  to make HTML files and a HTML help project"
+       @echo "  latex     to make LaTeX files, you can set PAPER=a4 or 
PAPER=letter"
+       @echo "  changes   to make an overview over all 
changed/added/deprecated items"
+       @echo "  linkcheck to check all external links for integrity"
+
+clean:
+       -rm -rf build/*
+
+html:
+       mkdir -p build/html build/doctrees
+       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
+       @echo
+       @echo "Build finished. The HTML pages are in build/html."
+
+pickle:
+       mkdir -p build/pickle build/doctrees
+       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
+       @echo
+       @echo "Build finished; now you can process the pickle files or run"
+       @echo "  sphinx-web build/pickle"
+       @echo "to start the sphinx-web server."
+
+web: pickle
+
+htmlhelp:
+       mkdir -p build/htmlhelp build/doctrees
+       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
+       @echo
+       @echo "Build finished; now you can run HTML Help Workshop with the" \
+             ".hhp project file in build/htmlhelp."
+
+latex:
+       mkdir -p build/latex build/doctrees
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
+       @echo
+       @echo "Build finished; the LaTeX files are in build/latex."
+       @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+             "run these through (pdf)latex."
+
+changes:
+       mkdir -p build/changes build/doctrees
+       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
+       @echo
+       @echo "The overview file is in build/changes."
+
+linkcheck:
+       mkdir -p build/linkcheck build/doctrees
+       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
+       @echo
+       @echo "Link check complete; look for any errors in the above output " \
+             "or in build/linkcheck/output.txt."


Property changes on: branches/rpy_nextgen/doc/Makefile
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/rpy_nextgen/doc/source/conf.py
===================================================================
--- branches/rpy_nextgen/doc/source/conf.py                             (rev 0)
+++ branches/rpy_nextgen/doc/source/conf.py     2008-05-24 07:31:06 UTC (rev 
532)
@@ -0,0 +1,161 @@
+# -*- coding: utf-8 -*-
+#
+# rpy2 documentation build configuration file, created by
+# sphinx-quickstart on Fri May 23 22:16:57 2008.
+#
+# This file is execfile()d with the current directory set to its containing 
dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed 
automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be 
extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'rpy2'
+copyright = '2008, Laurent Gautier'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0a0'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directories, that shouldn't be 
searched
+# for source files.
+#exclude_dirs = []
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# The name of an image file (within the static path) to place at the top of
+# the sidebar.
+html_logo = 'rpy_logo_header.png'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'rpy2doc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class 
[howto/manual]).
+latex_documents = [
+  ('index', 'rpy2.tex', 'rpy2 Documentation', 'Laurent Gautier', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+latex_logo = 'rpy_logo_header.png'
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True


Property changes on: branches/rpy_nextgen/doc/source/conf.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/rpy_nextgen/doc/source/index.rst
===================================================================
--- branches/rpy_nextgen/doc/source/index.rst                           (rev 0)
+++ branches/rpy_nextgen/doc/source/index.rst   2008-05-24 07:31:06 UTC (rev 
532)
@@ -0,0 +1,25 @@
+.. rpy2 documentation master file, created by sphinx-quickstart on Fri May 23 
22:16:57 2008.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to rpy2's documentation!
+================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   preface
+   overview
+   rpy_classic
+   robjects
+   rinterface
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

Added: branches/rpy_nextgen/doc/source/overview.rst
===================================================================
--- branches/rpy_nextgen/doc/source/overview.rst                                
(rev 0)
+++ branches/rpy_nextgen/doc/source/overview.rst        2008-05-24 07:31:06 UTC 
(rev 532)
@@ -0,0 +1,41 @@
+Overview
+========
+
+`Python`_ is a popular 
+all-purpose scripting language, while `R`_
+is a scripting language mostly popular for data analysis, statistics, and
+graphics.
+
+.. _Python: http://www.python.org
+.. _R: http://www.r-project.org
+
+The RPy project is an effort to have access to R from within Python, 
+
+The RPy code was initially inspired in RSPython, which is part of
+the `Omegahat project`_.
+
+.. _Omegahat project: http://www.omegahat.org/RSPython
+
+RPy2 is inspired by RPy, as well as A. Belopolskys's contributions to RPy.
+A compatibility layer with RPy is provided.
+
+FIXME: write a section about what changed
+
+
+
+The package is made of several elements:
+
+
+:mod:`rpy_classic`
+    Higher-level interface similar to the one in RPy-1.x
+
+:mod:`robjects`
+    Higher-level interface, when ease-of-use matters most
+
+
+:mod:`rinterface`
+    Low-level interface to R, when speed and flexibility
+    matter most. Here the programmer gets close to R's C
+    API, and can use R's function faster than within an R session.
+
+

Added: branches/rpy_nextgen/doc/source/preface.rst
===================================================================
--- branches/rpy_nextgen/doc/source/preface.rst                         (rev 0)
+++ branches/rpy_nextgen/doc/source/preface.rst 2008-05-24 07:31:06 UTC (rev 
532)
@@ -0,0 +1,20 @@
+Preface
+=======
+
+This presentation describes RPy2, a rewrite of
+the RPy package.
+
+It is developped for R-2.7 (and is not expected to work
+with a previous version), together with Python 2.5. Compatibility
+with Python 2.4 is expected but not tested when writing
+those lines.
+
+Acknowledgements go to:
+
+Walter Moreira, and Gregory Warnes
+    For the original RPy and its maintainance through the years.
+ 
+Alexander Belopolsky. 
+    The contributed code of Alexander Belopolsky, who contributed
+    a first rewrite to RPy is acknowledged. I have found great
+    inspiration in reading that code.

Added: branches/rpy_nextgen/doc/source/rinterface.rst
===================================================================
--- branches/rpy_nextgen/doc/source/rinterface.rst                              
(rev 0)
+++ branches/rpy_nextgen/doc/source/rinterface.rst      2008-05-24 07:31:06 UTC 
(rev 532)
@@ -0,0 +1,263 @@
+.. index::
+   module: rinterface
+
+**********
+rinterface
+**********
+
+Overview
+========
+
+A lower-level interface is provided for cases where
+the use-cases addressed by :mod:`robjects` are not covered,
+and for the cases where the layer in :mod:`robjects`
+has an excessive cost in term of performances.
+
+The package can be imported with:
+
+>>> import rpy2.rinterface as rinterface
+
+.. index::
+   single: initialize
+
+:func:`initEmbeddedR`
+---------------------
+
+One has to initialize R before much can be done.
+The function :func:`initEmbeddedR` lets one initialize
+the embedded R:
+
+>>> rinterface.initEmbeddedR()
+
+Initialization should only be performed once and in the case
+of a second call to :func:`initEmbeddedR`, to avoid unpredictable results
+when using the embedded R, an exception is be fired.
+
+Parameters for the initialization are in the module variable
+initOptions.
+
+R space and Python space
+------------------------
+
+When using the RPy2 package, two realms are co-existing: R and Python.
+
+The :class:`Sexp_Type` objects can be considered as Python enveloppes pointing
+to data stored and administered in the R space.
+
+globalEnv
+---------
+
+The global environment can be seen as the root (or topmost) environment,
+and is in fact a list, that is a sequence, of environments.
+
+When an R library (package in R's terminology) is loaded,
+is it added to the existing sequence of environments. Unless
+specified, it is inserted in second position. The first position
+always remains attributed to the global environment
+(FIXME: there is a bit of circulariry in this definition - check
+how to present it a clear(er) way).
+The library is said to be attached to the current search path.
+
+.. index::
+   single: Sexp
+
+:class:`Sexp`
+=============
+
+Methods:
+
+
+typeof()
+    Type of the object
+
+do_slot([name])
+    Access attribute *name* for the object
+
+:meth:`typeof`
+--------------
+
+The internal R type in which an object is stored can be
+accessed with the method :meth:`typeof`.
+
+>>> letters.typeof()
+
+FIXME: talk about the all the types.
+
+
+:meth:`do_slot`
+---------------
+
+R objects can be given attributes. In R the function
+*attr* lets one access attribute, while called :meth:`do_slot`
+in the C interface to R. 
+
+
+>>> matrix = rinterface.globalEnv.get("matrix")
+>>> letters = rinterface.globalEnv.get("letters")
+>>> ncol = rinterface.SexpVector([2, ], rinterface.INTSXP)
+>>> m = matrix(letters, ncol = ncol)
+>>> [x for x in m.do_slot("dim")]
+[13, 2]
+>>>
+
+.. index::
+   single: SexpVector
+
+:class:`SexpVector`
+===================
+
+Overview
+--------
+
+In R all scalars are in fact vectors.
+Anything like a one-value variable is a vector of
+length 1.
+
+To use again the constant *pi*:
+
+>>> pi = rinterface.globalEnv.get("pi")
+>>> len(pi)
+1
+>>> pi
+<rinterface.SexpVector - Python:0x2b20325d2660 / R:0x16d5248>
+>>> pi[0]
+3.1415926535897931
+>>>
+
+Important note: The *__getitem__* operator *[*
+is returning a Python scalar. Because of that casting
+an *SexpVector* into a list is only a matter of calling
+the constructor *list*.
+
+The letters of the (western) alphabet are:
+
+>>> letters = rinterface.globalEnv.get("letters") 
+>>> len(letters)
+26
+>>> LETTERS = rinterface.globalEnv.get("LETTERS") 
+
+Names
+-----
+
+In R, vectors can be named, that is each value in the vector
+can be given a name (that is be associated a string).
+The names are added to the other as an attribute (conveniently
+called names), and can be accessed as such:
+
+>>> options = rinterface.globalEnv.get("options")()
+>>> option_names = options.do_slot("names")
+>>> [x for x in options_names]
+
+
+
+Numeric, numarray, numpy (and future possible names)
+----------------------------------------------------
+
+The SexpVector objects are made to behave like arrays as defined
+in the Python packages Numeric, numarray, and numpy.
+
+The functions *array* and *asarray* is all that is needed:
+
+>>> import Numeric
+>>> rx = rinterface.SexpVector([1,2,3,4], rinterface.INTSXP)
+>>> nx = Numeric.array(rx)
+>>> nx_nc = Numeric.asarray(rx)
+
+
+Important note: when using *asarray*, the data are not copied.
+
+>>> nx_nc[2] = 42
+>>> rx[2]
+42
+>>>
+
+.. index::
+   single: SexpEnvironment
+
+:class:`SexpEnvironment`
+========================
+
+:meth:`get`
+-----------
+
+Whenever a search for a symbol is performed, the whole
+search path is considered: the environments in the list
+are inspected in sequence and the value for the first symbol found
+matching is returned.
+
+>>> rinterface.globalEnv.get("pi")
+
+The constant pi is defined in the package base, that
+is by default in the search path.
+
+FIXME: get functions only
+
+
+:meth:`__getitem__` / :meth:`__setitem__`
+-----------------------------------------
+
+The *[* operator will only look for a symbol in the environment
+(FIXME: first in the list then ?),
+without looking into other elements in the list.
+
+The following will return an exception :class:`LookupError`:
+
+>>> rinterface.globalEnv["pi"]
+
+The constant *pi* is defined in R's *base* package,
+and therefore cannot be found in the Global Environment.
+
+The assignment of a value to a symbol in an environment is as
+simple as assigning a value to a key in a Python dictionary:
+
+>>> x = rinterface.Sexp_Vector([123, ], rinterface.INTSXP)
+>>> rinterface.globalEnv["x"] = x
+
+note: a copy of the R object is made in the R space.
+
+:meth:`__iter__`
+----------------
+
+The object is made iter-able.
+
+For example, we take the base name space (that is the environment
+that contains R's base objects:
+
+>>> base = rinterface.baseNameSpace
+>>> basetypes = [x.typeof() for x in base]
+
+
+Note that in the current implementation the content of the environment
+is evaluated only once, when the iterator is created, and that adding 
+or removing elements to the environment after will not have any effect.
+
+:class:`SexpClosure`
+====================
+
+A function with a context
+-------------------------
+
+In R terminology, a closure is a function (with its enclosing
+environment). That enclosing environment can be thought of as
+a context to the function.
+
+>>> sum = rinterface.globalEnv.get("sum")
+>>> x = rinterface.SexpVector([1,2,3], rinterface.INTSXP)
+>>> s = sum(x)
+>>> s[0]
+6
+>>>
+
+closureEnv
+----------
+
+In the example below, we inspect the environment for the
+function *plot*, that is the namespace for the
+package *graphics*.
+
+>>> plot = rinterface.globalEnv.get("plot")
+>>> ls = rinterface.globalEnv.get("ls")
+>>> envplot_list = ls(plot.closureEnv())
+>>> [x for x in envplot_ls]
+>>>
+

Added: branches/rpy_nextgen/doc/source/robjects.rst
===================================================================
--- branches/rpy_nextgen/doc/source/robjects.rst                                
(rev 0)
+++ branches/rpy_nextgen/doc/source/robjects.rst        2008-05-24 07:31:06 UTC 
(rev 532)
@@ -0,0 +1,223 @@
+*************
+rpy2.robjects
+*************
+
+Overview
+========
+
+This module is intended for casual and general use.
+Its aim is to abstracts some of the details and provide an
+intuitive interface to R.
+
+
+>>> import rpy2.robjects as robjects
+
+
+:mod:`robjects` is written on the top of :mod:`rinterface`, and one
+not satisfied with it could easily build one's own flavor of a
+Python-R interface by modifying it.
+
+Classes
+=======
+
+:class:`Robject`
+  Parent class for R objects.
+
+:class:`Rvector`
+  An R vector
+
+:class:`Renvironment`
+  An R environment.
+
+:class:`Rfunction`
+  An R function.
+
+
+R
+-
+
+This class is currently a singleton, with
+its one representation instanciated when the
+module is loaded:
+
+>>> robjects.r
+>>> print(robjects.r)
+
+The instance can be seen as a window to an
+embedded R process.
+Readers familiar with the ctypes module for Python
+
+R vectors:
+
+>>> pi = robjects.r.pi
+>>> letters = robjects.r.letters
+
+
+R functions:
+
+>>> plot = robjects.r.plot
+>>> dir = robjects.r.dir
+
+The evaluation of R code in a string can also be performed
+FIXME: (not yet implemented/tested)
+
+:class:`Robject`
+----------------
+
+:class:`Rvector`
+----------------
+
+Beside functions, and environemnts, most of the objects
+an R user is interacting with are vector-like.
+For example, this means that any scalar is in fact a vector
+of length one.
+
+The class :class:`Rvector` has a constructor:
+
+>>> x = robjects.Rvector(3)
+
+
+Mathematical operations on vectors: the following operations
+are performed element-wise, recycling the shortest vector if
+necessary.
+
++-------+---------+
+| ``+`` | Add     |
++-------+---------+
+| ``-`` | Subtract|
++-------+---------+
+| ``*`` | Multiply|
++-------+---------+
+| ``/`` | Divide  |
++-------+---------+
+
+FIXME:
+Indexing
+
+This class is using the class :class:`rinterface.SexpVector`.
+
+Numpy, Numeric
+
+Vectors are understood as Numpy or Numeric arrays::
+
+  import numpy
+  ltr = robjects.r.letters
+  ltr_np = numpy.array(ltr)
+
+
+
+
+:class:`Renvironment`
+---------------------
+
+R environments can be described to the Python user as
+an hybrid of a dictionary and a scope.
+
+The first of all environments is called the Global Environment,
+that can also be referred to as the R workspace.
+
+>>> globalEnv = robjects.globalEnv
+
+
+An R environment in RPy2 can be seen as a kind of Python
+dictionnary.
+
+Assigning a value to a symbol in an environment has been
+made as simple as assigning a value to a key in a Python
+dictionary:
+
+>>> robjects.r.ls(globalEnv)
+>>> globalEnv["a"] = 123
+>>> robjects.r.ls(globalEnv)
+
+
+Care must be taken when assigning objects into an environment
+such as the Global Environment, as it can hide other objects
+with an identical name.
+For example:
+
+>>> globalEnv["pi"] = 123
+>>> robjects.r.pi
+123L
+>>>
+
+>>> robjects.r.rm("pi")
+>>> robjects.r.pi
+3.1415926535897931
+
+This class is using the class :class:`rinterface.SexpEnvironment`
+
+An environment is also iter-able, returning all the symbols
+(keys) it contains:
+
+>>> env = robjects.r.baseenv()
+>>> len([x for x in env])
+
+
+:class:`Rfunction`
+------------------
+
+>>> plot = robjects.r.plot
+>>> rnorm = robjects.r.rnorm
+>>> plot(rnorm(100), ylab="random")
+
+This class is using the class :class:`rinterface.SexpClosure`
+
+
+Mapping
+-------
+
+The mapping between low-level objects is performed by the
+functions XXX and XXX.
+
+A developper can easily add his own mapping XXX.
+
+
+Examples
+========
+
+Example::
+
+  import array
+
+  r = robjects.r
+
+  x = array.array('i', range(10))
+  y = r.rnorm(10)
+
+  r.X11()
+
+  r.par(mfrow=array.array('i', [2,2]))
+  r.plot(x, y, ylab="foo/bar", col="red")
+
+  kwargs = {'ylab':"foo/bar", 'type':"b", 'col':"blue", 'log':"x"}
+  r.plot(x, y, **kwargs)
+
+Principal component analysis
+----------------------------
+
+.. code-block:: r
+
+  m <- matrix(rnorm(100), ncol=5)
+  pca <- princomp(m)
+  plot(pca, main="Eigen values")
+  biplot(pca, main="biplot")
+
+.. code-block:: python
+
+  m = r.matrix(r.rnorm(100), ncol=5)
+  pca = r.princomp(m)
+  r.plot(pca, main="Eigen values")
+  r.biplot(pca, main="biplot")
+
+
+S4 classes
+----------
+
+.. code-block:: python
+
+  if not r.require("GO")[0]:
+      raise(Exception("Bioconductor Package GO missing"))
+
+  goItem = r.GOTERM["GO:0000001"]
+

Added: branches/rpy_nextgen/doc/source/rpy_classic.rst
===================================================================
--- branches/rpy_nextgen/doc/source/rpy_classic.rst                             
(rev 0)
+++ branches/rpy_nextgen/doc/source/rpy_classic.rst     2008-05-24 07:31:06 UTC 
(rev 532)
@@ -0,0 +1,69 @@
+***********
+rpy_classic
+***********
+
+The module aims at providing an API similar to
+the one in RPy-1.x.
+
+Loading the module can be done as:
+
+>>> from rpy2.rpy_classic import *
+
+
+The conversion system is still around:
+
+>>> set_default_mode(NO_CONVERSION)
+>>> set_default_mode(BASIC_CONVERSION)
+
+The ``r`` instance behaves like before:
+
+>>> r.help
+
+'dots' in the R name are translated to underscores:
+
+>>> r.wilcox_test
+
+>>> r.wilcox_test([1,2,3], [4,5,6])
+
+>>> x = r.seq(1, 3, by=0.5)
+>>> r.plot(x)
+
+An example::
+
+  degrees = 4
+  grid = r.seq(0, 10, length=100)
+  values = [r.dchisq(x, degrees) for x in grid]
+  r.par(ann=0)
+  r.plot(grid, values, type='l')
+
+  r.library('splines')
+
+  type(r.seq)
+
+Functions
+---------
+
+As in RPy-1.x, all R objects are callable:
+
+>>> callable(r.seq)
+True
+>>> callable(r.pi)
+True
+>>>
+
+>>> r.seq(1, 3)
+>>> r.seq(1, 3, by=0.5)
+>>> r['options'](show_coef_Pvalues=0)
+
+Whenever object is not a function, a runtime error
+is thrown by R.
+
+>>> r.pi()
+
+  
+
+
+>>> m = r.matrix(r.rnorm(100), 20, 5)
+>>> pca = r.princomp(m)
+>>> r.plot(pca, main = "PCA")
+

Added: branches/rpy_nextgen/doc/source/rpy_logo_header.png
===================================================================
(Binary files differ)


Property changes on: branches/rpy_nextgen/doc/source/rpy_logo_header.png
___________________________________________________________________
Name: svn:mime-type
   + image/png


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to