ftp.nice.ch/pub/next/developer/languages/r/R.0.12.N.b.tar.gz#/R-0.12.N.b

BUGS
 
CHANGES
 
COPYING
 
INSTALL
 
Makefile
 
Mirror-sites
 
README
 
README_NEXTSTEP
 
bin/
 
cmd/
 
data/
 
demos/
 
etc/
 
help/
 
html/
 
library/
 
psmetrics/
 

README

README - R ALPHA PRE-RELEASE
----------------------------

This directory contains the Unix source code tree for the R language.
R is a language which is not entirely unlike the S language developed
at AT&T Bell Laboratories by Rick Becker, John Chambers and Allan
Wilks.  Indeed in the (present) absence of an R manual, you can
(mostly) get along by using the S manual.

Currently the software is pre-alpha test state and we are seeking
comments and bug reports.  Please send comments and reports to

	R@stat.auckland.ac.nz

In the case of bugs it would be very helpful to have code which
reliably reproduces the problem.  Some bugs can be very hard to fix
without this.

Thanks to Martin Maechler there is also a mailing list

	"r-testers@stat.math.ethz.ch"

to which you can subscribe to obtain to receive announcements of
new versions, bug fixes etc.  To subscribe (or unsubscribe) to the
mailing list send

	subscribe  (or unsubscribe)

(in the "body", not the subject !) to:

	r-testers-request@stat.math.ethz.ch

R is free software distributed under a GNU-style copyleft.


WHERE WE STAND
--------------

We have implemented most of the functionality in the first S book
(the "Blue Book") and many of the applications.  In addition, we
have implemented a certain amount of functionality from the second
S book (the "White Book").  In particular we have a functioning
versions of "lm" and "glm" and their associated "summary" and
"anova" methods (it would be nice to have "drop1", "add1" and
"step", but there hasn't been time to complete these yet).
Regression diagnostics have been implemented in the "ls.diag" form,
but not extended to "lm" and "glm".

What we have in the way of manual is in the directory src/manual/man
in an "output independent" form which can be used to create versions
for HTML, LaTeX, troff etc.


WHERE WE ARE GOING
------------------

Our aim at the start of this project was to demonstrate that it was
possible to produce an S-like environment which did not suffer from
the memory-demands and performance problems which S does.  It is only
recently that we have started trying to turn R into a "real" system.
In the short term we hope to create a small portable free system which
will provide most of the functionality of S and perhaps some
extensions.

Our present plan of attack is as follows:

1.  Re-implement parts of the system to make things more modular
    so that data sets can be saved and restored on an individual
    basis and so that we have a real library facility.
    (Done).

2.  Move the user interface to an event driven basis.  This will
    enable users to interact with the system in a much more
    graphical way.  It also raises the possibility that we can
    borrow the graphics technology in LispStat.
    (Design phase).

3.  Add functionality in the form of new functions.
    (Ongoing).

4.  The present documentation is written using our own format into 
    files which can be processed by a combination of sed and m4 into
    a variety of formats (nroff, latex, html).  We should use a real
    SGML description of our format and develop techniques for more
    generally translating into other formats.


Long-term we are hoping to move to a new implementation technology
which offers the prospect of big performance gains.  We are currently
evaluating a number of candidate technology.  These include Dylan,
Rscheme, Java and Common Lisp.


SOME DIFFERENCES BETWEEN R AND S
--------------------------------

1. R has no "complex" data type (yet).  We did this to try and keep
   things small and simple.

2. In R, "factor" and "ordered factor" are primitive vector types.
   This means in particular that they can be shaped as arrays.

3. In R a list is a Lisp-style list composed of dotted pairs, rather
   than a vector of generic elements as in S.  This means that list
   subscripting can be rather inefficient.  However, lists are rarely
   large and so we have not (yet) bothered to implement a matching
   "generic vector" type, even though this could be quite useful.

	Robert Gentleman + Ross Ihaka

README_NEXTSTEP

-----------------------------------------------------------------------
README - R ALPHA PRE-RELEASE for NEXTSTEP version 3.3 (M68k and Intel)
-----------------------------------------------------------------------
This is a NEXTSTEP port of the R language for statistical programming.
NEXTSTEP support for the statistical programs SAS and S-PLUS was
dropped when NeXT stopped making hardware, leaving statisticians
running NEXTSTEP in an awkward position. R is an extremely
powerful alternative to these commercial packages. Read the README
file with this distribution to find out more about R. Note that users
of S and S-PLUS will find R very easy to use. If you don't know S,
check out "The New S Language"  (Becker R, Chambers J, Wilks A;
Wadsworth, 1988) to help you get started.

To install R, copy the all of the directories into
a new "RHOME" directory (e.g. ~/usr/local/R). Place the
bin/R start-up script somewhere on your path (e.g. /usr/local/bin, ~/bin)
and modify to set the "RHOME" variable to point to the installation
directory chosen above. (I have decided not to include the source code
at the request of the developers because R is in a very preliminary stage of
development.)

You'll need X11 drivers to view graphics. I have used R with both
CubXWindows and co-Xist X11 emulation under NEXTSTEP. R will run
from any shell (e.g. Terminal or Stuart), but graphics will have
to be written out using the Postscript driver. R also accepts
commands from std. input and writes to std. output. All of the available
functions are listed in the help directory. The help files are viewed
by typing "help(function_name)" at the R prompt. New functions
are defined exactly as in S. Quit R by typing q(). If requested, an
image of the current session will be saved in the file .RData in the
current directory. This will automatically be read in the next time
R is invoked in this directory.

Disclaimer:

This is a pre-alpha version. I am releasing it because of the total lack
of statistical software for NEXTSTEP. I have only tested the binary under
NS 3.3 on m68K and Intel architecture. I have not tested it extensively 
-- so far, it seems to be working properly. However, there will be bugs,
so use at your own risk! If you want to build R for another architecture,
you are on your own.


#########################################################################
Stephen Shiboski                          email: steve@biostat.ucsf.edu
Division of Biostatistics                 voice: 415-476-0533
University of California San Francisco    fax:   415-476-6014
500 Parnassus Avenue, MU 420-W;  San Francisco, CA 94143-0560
#########################################################################

---------------------------------------------------
                   ADDENDUM
Modifications necessary to compile R under NS 3.3:
---------------------------------------------------

I have chosen not to include the source code with this distribution because
R is in a very preliminary stage of development and changes regularly.
The source can be obtained from StatLib <http://temper.stat.cmu.edu/R/> .
Note that these instructions assume that gcc 2.7.2 or later is being used
and that the X11R6 libraries and headers are available (I used CubXWindow from
Intuitive Systems <http://www.intuisys.com/>). A lot of these 
changes are just crude hacks to make R compile. More elegant fixes are 
certainly possible. Note that I couldn't get things to compile using
the NeXT C compiler -- there are things in the code which seem to require
at least version 2.7.0 of gcc.



(1) Get the latest source code from StatLib .
  

(2) Make new system files NEXTSTEP and NEXTSTEP.h (in src/System) .
    (I've included examples below.)

(3) Modify src/include/Mathlib.h and src/include/Defn.h as follows:

  old: #include <math.h>

  new: #include <math2.h>
      (math2.h is a modified header which simply comments out the
       log, lgamma and fmod functions. I placed this in /usr/include/ansi.)

(4) Modify the functions asform and negarg in src/math/lgamma.c by commenting
    out the declarations indicated below:

static double asform(arg)
double arg;
{
/*      double log(); */
        double n, argsq;
        int i;

        argsq = 1. / (arg * arg);
        for (n = 0, i = M - 1; i >= 0; i--) {
                n = n * argsq + p1[i];
        }
        return ((arg - .5) * log(arg) - arg + hl2pi + n / arg);
}

static double negarg(arg)
double arg;
{
        double temp;
/*        double log(), sin(), posarg(); */
          double  sin(), posarg();

        arg = -arg;
        temp = sin(xpi * arg);
        if (temp == 0.0) {
                errno = EDOM;
                return DBL_MAX;
        }


(5)  Comment out the "atof()" call on the last line of src/unix/dataentry.c;
     modify src/unix/datentry.h to call the right X11 include files.

(6)  Modify src/main/arithmetic.c to include <float.h> rather than <floatingpoint.h>.
     Also, comment out the following line in this file:
	      fpresetsticky(~0);

(7) NS doesn't support dynamic loading. It is possible to include new functions
    in the src/stat source for R. And recompile them in. This involves changes in
    src/stat/ROUTINES and running the src/stat/makeheaders script. The files
    src/include/ForeignTab.h and src/include/ForeignDecl.h also have to list the
    new symbols for loading. I have added new routines successfully.

 (8) Below are copies of the src/System files (NEXTSTEP, NEXTSTEP.h)
     needed to configure for NEXTSTEP:

############### NEXTSTEP ###################
# X11 include and library directories
X11INC= /usr/X11R6/include
X11LIB= /usr/X11R6/lib

# C Compiler and Options (-g and/or -O)
CC= gcc
CFLAGS= -g -I../include

# Fortran Compiler and Options (-g and/or -O)
##### You'll need to use f2c to add FORTRAN code.          #####
##### (The f77 script here is just a front-end to f2c.)    ####
##### This won't be used unless you add FORTRAN routines.  #######
F77= f77
FFLAGS= -g -w

# Yacc (Note: Bison does not work, get byacc).
YACC=yacc

# Command to Create Libraries from Object Files
MKLIB= ../tools/library.bsd

# Create an Executable from Objects and Libraries
LD= gcc -g

# Libraries to Load Against
# -lsocket needed for Solaris;  dl for dlopen, etc.
# For non GNU readline support use the following
# Remove the "-lf2c" if you aren't planning on adding
# any FORTRAN code and/or don't have libf2c.a installed.
LIBS= -L$(X11LIB) -lX11 -lf2c  -lm
############################################################

################# NEXTSTEP.h ###############################

		/*NEXTSTEP (v 3.3)  M68k  or Intel */

#ifndef _PLATFORM_H_
#define _PLATFORM_H_

#define NEXTSTEP
#define Unix
/* #define Readline			/* uncomment for readline support */
#define IEEEArith
/* #define DLSupport */
#define Proctime
#define F77_SYMBOL(x)	x ## _
#define F77_QSYMBOL(x)	#x ## "_"

#endif
############################################################


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.