This is the README for R.0.12.N.b.tar.gz [Download] [Browse] [Up]
----------------------------------------------------------------------- README - R ALPHA PRE-RELEASE for NEXTSTEP version 3.3 (M68k and Intel) 3 October, 1996 ----------------------------------------------------------------------- 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. (I have included some instructions below.) ######################################################################### 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.