Oj\n\B\ff<(CG)Times>\fs<14>\ll<2>\ps<100>\t<0>\FpA XLISP-STAT on UNIX\MSystems\b\fs<12>
\jfThis tutorial has dealt primarily with the Macintosh version of XLISP-STAT. XLISP-STAT is also available on UNIX systems. If it has been installed in a directory in your search path you should be able to start it up by typing
\B\ff<(CG)Courier>xlispstat\b\ff<(CG)Times>
at the UNIX\Mshell level. There are a few differences between the Macintosh and UNIX versions. On UNIX systems:
\T
\po UNIX versions of XLISP-STAT are desinged to run on a standard terminal and therefore do not provide parenthesis matching or indentation support. If you use the GNU \B\ff<(CG)Courier>emacs\b\ff<(CG)Times> editor you can obtain both these features by running XLISP-STAT from within \ff<(CG)Courier>emacs\ff<(CG)Times>. Otherwise for editing files with vi you can use the \B\ff<(CG)Courier>-l\b\ff<(CG)Times> flag to get some Lisp editing support.
\T\T\T\T\T\T
To quit from the program type
\ll<-3>
\s\B\ff<(CG)Courier>(exit)\b\ff<(CG)Times>
\ll<2>
\sOn most systems you can also quit by typing a \IControl-D\i.
\T
You can interrupt a calculation that is taking too long or was started in error by typing a \IControl-C\i.
\T\T\T\T
Data and example files are located in the \B\ff<(CG)Courier>Data\b\ff<(CG)Times> and \B\ff<(CG)Courier>Examples\b\ff<(CG)Times> subdirectories of the library tree. The functions \B\ff<(CG)Courier>load-data\b\ff<(CG)Times> and \B\ff<(CG)Courier>load-examples\b\ff<(CG)Times> will look in these directories, so
\swill load the data sets for the tutorial. Within XLISP-STAT the variable *default-path* shows the root directory of the library; you can look there if you want to examine the examples files.
\T
The \B\ff<(CG)Courier>require\b\ff<(CG)Times> function can be used to load program modules not loaded at startup. To load the nonlinear regression module, for example, use the expression
\pnOn basic UNIX systems the only graphics available are the functions plot-points and plot-lines. These functions assume you are using a \ITektronix\i terminal or emulator.
\BA.1 XLISP-STAT Under the \IX11\i Window System\b
Window based graphics are available in XLISP-STAT on a workstation running the \IX11\i window system. Graphics under \IX11\i are fairly similar to Macintosh graphics as documented in this tutorial. A few points to note:
\po\T
Plot menus are popped up using a menu button in the top right corner of a plot.
\T\T
In plot interaction you can use any of the mouse buttons. Normally clicking amy button in a plot unselects all selected points. To extend a selection, or have a rotating plot continue rotating after the button is released, hold down the shift key as you press any mouse button.
\T
How plot windows are opened in response to a graphics command depends on the window manager you are using. Unde \B\ff<(CG)Courier>uwm\b\ff<(CG)Times>, the default window manager on many systems, a little corner will appear which you can use to choose the position of your plot window.\ll<0>
\ll<2>
\T
Slider dialog items are the only items that assume a three button mouse. In the central part of the slider the right button increases and the left button decreases the slider value. The middle button drags the thumb indicator.\ll<0>
\ll<2>
\T\T\T\T\T\T
Postscript images of plots can be saved by selecting the \BSave to File\b item on a plot menu. The postscript file can then be printed using a standard printing command.
\BA.1.1 More Advanced \IX11\i Features\b\ll<0>
\ll<2>
You can have XLISP-STAT use an alternate display for its graphics by setting the \B\ff<(CG)Courier>DISPLAY\b\ff<(CG)Times> environment variable before starting XLISP-STAT. At present this is the only way to set an alternate display. You can specify alternate fonts and a few other options using the \IX11\i resource management facilities. Resources controlling appearance are
\ll<0>
\s\s\B\ff<(CG)Courier>xlisp*menu*titles:\b\ff<(CG)Times>\s\s\Ion\i for a title on a menu, \I off\i otherwise\ll<2>
\s\s\B\ff<(CG)Courier>xlisp*menu*font:
\s\sxlisp*dialog*font:
\s\sxlisp*graph*font:\b\ff<(CG)Times>\ll<0>
\ll<2>
There are also a few experimental options controlling performance. These are
\ll<0>
\s\s\B\ff<(CG)Courier>xlisp*graph*fastlines:\b\ff<(CG)Times>\s\Ion\i to use 0 width li\ll<2>nes
\s\s\B\ff<(CG)Courier>xlisp*graph*fastsymbols:\b\ff<(CG)Times>\s\Ion\i to use \B\ff<(CG)Courier>DrawPoints\b\ff<(CG)Times> instead of bitmaps
\s\s\B\ff<(CG)Courier>xlisp*graph*motionsync:\b\ff<(CG)Times>\ll<0>\s\Ion\i to use \B\ff<(CG)Courier>XSync\b\ff<(CG)Times> during mouse motion
\ll<2>
By default all three options are \Ion\i. That seems to give the best performance on a \ISun 3/50\i. It may not be the best choice on other workstations. You can also use the function \B\ff<(CG)Courier>x11-options\b\ff<(CG)Times> to change these three options from within XLISP-STAT. The fastlines option will not take effect immediately when changed this way but will affect the next plot created. The other two options do take effect immediately.
\BA.2 XLISP-STAT Under the \ISunView\i Window System\b\ll<0>
\ll<2>
Window based graphics are also available when XLISP-STAT is run on a \ISun\i console running \B\ff<(CG)Courier>suntools\b\ff<(CG)Times>. Graphics under \B\ff<(CG)Courier>suntools\b\ff<(CG)Times> work like graphics on the Macintosh with the following changes:\ll<0>
\ll<2>
\T \po
To close or resize plots or dialogs use the frame menu or the standard suntools shortcuts (e.g. to resize a plot window drag the frame with the middle mouse button while holding down the \Icontrol\i key).\ll<0>
\ll<2>
\T\T\T
Plot menus are popped up by pressing the right mouse button in the interior of the plot. Check marks do not appear on menu items so it may not always be clear what state an item is in.\t<1>\ll<0>
\t<0>\ll<2>
\T
Clicking and dragging on the Macintosh corresponds to clicking and dragging with the left mousebutton. Shift-clicking or shift-dragging on the Macintosh (to extend a selection or cause a rotating plot to continue spinning when the button is released) corresponds to using the middle mouse button.
\T\T\T\T\T\T
Postscript images of plots can be saved by selecting the \BSave to File\b item on a plot menu.
\B\pnA.3 Running UNIX Commands from XLISP-STAT\b
The \B\ff<(CG)Courier>system\b\ff<(CG)Times> function can be used to run UNIX commands from within XLISP-STAT. This function takes a shell command string as its argument and returns the shell exit code for the command. For example, you can print the date using the UNIX \B\ff<(CG)Courier>date\b\ff<(CG)Times> comman:
\B\ff<(CG)Courier>> (system "data")
Wed Jul 19 11:06:53 CDT 1989
>\b\ff<(CG)Times>
The return value is 0, indicating successful completion of the UNIX command.
\BA.4 Dynamic Loading and Foreign Function Calling\b
Some UNIX implementations of XLISP-STAT also provide a facility to allow you to use your own C functions or FORTRAN subroutines from within XLISP-STAT. The facility, patterned after the approach used in the new \IS\i language [3], consists of the function \B\ff<(CG)Courier>dyn-load\b\ff<(CG)Times> for loading your code into a running XLISP-STAT process and the functions \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times>, \B\ff<(CG)Courier>call-fsub\b\ff<(CG)Times> and \B\ff<(CG)Courier>call-lfun\b\ff<(CG)Times> for calling subroutines in the loaded code. The \B\ff<(CG)Courier>dyn-load\b\ff<(CG)Times> function requires one argument, a string containing the name of a file to be linked and loaded. The file will be linked with standard C libraries before loading. If you need it to be linked with the standard FORTRAN libraries as well you can give the keyword argument \B\ff<(CG)Courier>:fortran\b\ff<(CG)Times> the value \B\ff<(CG)Courier>T\b\ff<(CG)Times>. Finally, if you need to link other libraries you can supply a string containing the library flags you would specify in a linking command as the value of the keyword argument \B\ff<(CG)Courier>:libflags\b\ff<(CG)Times>. For example, to include the library \B\ff<(CG)Courier>cmlib\b\ff<(CG)Times> use the string \B\ff<(CG)Courier>"-lcmlib".\b\SP\ff<(CG)Times>30\Sp
\piThe function \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times> takes a string identifying the C function you want to call, followed by additional arguments for your C function. The additional arguments must be integers, sequences of integers, real numbers or sequences of real numbers. Pointers to \B\ff<(CG)Courier>int\b\ff<(CG)Times> or \B\ff<(CG)Courier>double\b\ff<(CG)Times> data containing these values will be passed to your routine. After your routine returns the contents of the data referred to by these pointers are copied into lists and \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times> returns a list of these lists.
As an example, suppose the file \B\ff<(CG)Courier>foo.c\b\ff<(CG)Times> contains the following C function:
\B\ff<(CG)Courier>\pnfoo(n, x, sum)
\sint :n;
\sdouble *x, *sum;
\sint i;
\sfor\M(i=0, *sum=0.0; i<*n; i++){
\s*sum += x[i];
}\b\ff<(CG)Times>
After compiling the file \B\ff<(CG)Courier>foo.c\b\ff<(CG)Times> we can load it into XLISP-STAT using the expression
The third argument to \B\ff<(CG)Courier>foo\b\ff<(CG)Times> has been used to return the result.
The function \B\ff<(CG)Courier>call-fsub\b\ff<(CG)Times> is used for calling FORTRAN subroutines that have been loaded dynamically. A FORTRAN subroutine analogous to the C function \B\ff<(CG)Courier>foo\b\ff<(CG)Times> might be written as
\B\ff<(CG)Courier>\ssubroutine foo(n, x, sum)
\sinteger n
\sdouble precision x(n), sum
\sinteger i
\ssum - 0.0
\sdo 10 i = 1,m
\s\ssum = sum +x(i)
\T\T\T10 continue
\sreturn
\send\b\ff<(CG)Times>
After compiling and loading this routine it can be called using \B\ff<(CG)Courier>call-fsub\b\ff<(CG)Times>:
\piTwo C functions you may want to call from within your C functions are \B\ff<(CG)Courier>xscall_alloc\b\ff<(CG)Times> and \B\ff<(CG)Courier>xscall_fail\b\ff<(CG)Times>. The function \B\ff<(CG)Courier>xscall_alloc\b\ff<(CG)Times> is like \B\ff<(CG)Courier>calloc\b\ff<(CG)Times>, except it insures the allocated memory is garbage collected after the call to \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times> returns. The function \B\ff<(CG)Courier>xscall_fail\b\ff<(CG)Times> takes a character string as its argument. It prints the string and signals an error.
The function \B\ff<(CG)Courier>call-lfun\b\ff<(CG)Times> can be used to call C functions written using the internal XLISP conventions for obtaining arguments and returning results. This allows you to accept any kinds of arguments. Unfortunately, the source code is the only documentation for the internal calling conventions.
A note of caution may be appropriate at this point. Dynamically loaded code contains only the error checking you build into it. If a function is not called with the proper arguments it will most likely cause XLISP-STAT to crash, losing any varibales you have not saved.
At present the number of arguments you can pass to C functions or FORTRAN subroutines using \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times> or \B\ff<(CG)Courier>call-fsub\b\ff<(CG)Times> is limited to 15.
If dynloading is not available on your system you can still recompile XLISP-STAT with files of your own added to the source code. The functions \B\ff<(CG)Courier>call-cfun\b\ff<(CG)Times>, \B\ff<(CG)Courier>call-fsub\b\ff<(CG)Times> and \B\ff<(CG)Courier>call-lfun\b\ff<(CG)Times> can be used to call your functions or subroutines in this case as well.
\B\fs<14>\pnB Graphical Interface Tools\b\fs<12>
One of the characterisitc features of the Macintosh user interface is the use of menus and dialogs for interacting with the computer. XLISP-STAT allows you to construct your own menus and dialogs using Lisp commands. This appendix gives a very brief introduction to constructing menus and dialogs; further details will be given in [17]. A few of the explanations and examples in this appendix use Lisp concepts that have not been covered in this tutorial.
\BB.1 Menus\b
As an illustration I wil outline how to construct a menu for sending some simple messages to a regression model. I will make the convention that these is a \Icurrent regression model\i, the value of the symbol \B\ff<(CG)Courier>*current-model*\b\ff<(CG)Times>.
\piMenus are created by sending the \B\ff<(CG)Courier>:new\b\ff<(CG)Times> message to the menu prototype, \B\ff<(CG)Courier>menu-proto\b\ff<(CG)Times>. The method for this message takes a single argument, the menu title. We can use this message to set up our menu:\pn
Macintosh menus can be installed in and removed from the menu bar by sending them the \B\ff<(CG)Courier>:install\b\ff<(CG)Times> and\B\ff<(CG)Courier> :remove\b\ff<(CG)Times> messages:
On other systems menus are \Ipopped up\i; this can be accomplished by sending the \B\ff<(CG)Courier>:popup\b\ff<(CG)Times> message to a menu. This message requires two argumenst, the \Ix\i and \Iy\i pixel coordinates of the left top corner of the menu, measured from the left top corner of the screen.
\piInitially the menu has no items in it. Items are created using the \B\ff<(CG)Courier>menu-item-proto\b\ff<(CG)Times> prototype. The initialization method requires one argument, the item's titile, and takes several keyword arguments, including\pn
\ll<-1>
\B\ff<(CG)Courier>:action\b\ff<(CG)Times> - a function to be called when the item is selected
\B\ff<(CG)Courier>:enabled\b\ff<(CG)Times> - true by default
\B\ff<(CG)Courier>:key\b\ff<(CG)Times> - a character to serve as the keyboard equivalent
\B\ff<(CG)Courier>:mark\b\ff<(CG)Times> - \B\ff<(CG)Courier>nil\b\ff<(CG)Times> (the default) or \B\ff<(CG)Courier>t\b\ff<(CG)Times> to indicate a check mark.
\ll<2>
Analogous messages are available for changing these values in existing menu items.
\piSuppose we would like to be able to use our menu to print a summary of the current model or obtain a residual plot. We can construct two menu items:\pn
Suppose we have assigned the \B\ff<(CG)Courier>bikes2\b\ff<(CG)Times> model of Section 7 to\B\ff<(CG)Courier> *current-model*\b\ff<(CG)Times>. You can force and item's action to be invoked by sending it the \B\ff<(CG)Courier>:do-action\b\ff<(CG)Times> message from the listener:
\B\ff<(CG)Courier>>\M(send summary :do-action)
Least Squares Estimates
Constant\s\s -16.41924\s(7.848271)
Variable 0\s\s 2.432667\s(0.9719626)
Variable 1\s\s -0.05339121\s(0.02922567)
R Squared:\s\s 0.9477923
Sigma hat:\s\s 0.5120859
Number of cases:\s\s10
Degrees of freedom\s\s 7
NIL\ff<(CG)Times>\fs<14>\pi
\b\fs<12>\pnOrdinarily you will not send this message this way: the system sends this message to the menu item when you select the item from a menu.
To add these items to the menu use the \B\ff<(CG)Courier>:append-items\b\ff<(CG)Times> message:
You can also use the \B\ff<(CG)Courier>:append-items\b\ff<(CG)Times> message to add items to a plot menu. The menu associated with a plot can be obtained by sending the plot the \B\ff<(CG)Courier>:menu\b\ff<(CG)Times> message with no arguments.
\piYou can enable and disable a menu item with the \B\ff<(CG)Courier>:enabled\b\ff<(CG)Times> message:\pn
\B\ff<(CG)Courier>> (send summary :enable)
>\M(send summary :enabled nil)
> (send summary :enabled t)
T\b\ff<(CG)Times>
\BB.2 Dialogs\b
Dialogs are similar to menus in that they are based on a dialog protoype and dialog item prototypes. There are, however many more variations. Fortunately most dialogs you need fall into one of several categories and can be produced by custom dialog construction functions.
\BB.2.1 Modal Dialogs\b
Modal dialogs are designed to ask specific questions and wait until they receive a response. All other interaction is disabled until the dialog is dismissed - they place the system in \Idialog mode\i. Six functions are available for producing some standard modal dialogs:
\T \po
\B\ff<(CG)Courier>(message-dialog <\Istring\i>)\b\ff<(CG)Times> - presents a message with an \BOK\b button; returns \B\ff<(CG)Courier>nil\b\ff<(CG)Times> when the button is pressed.
\T
\B\ff<(CG)Courier>(ok-or-cancel-dialog <\Istring\i>)\b\ff<(CG)Times> - presents a message with an \BOK\b and a \BCancel\b button; returns \B\ff<(CG)Courier>t\b\ff<(CG)Times> or \B\ff<(CG)Courier>NIL\b\ff<(CG)Times> according to the button pressed.
\T\T\T\T\T
\B\ff<(CG)Courier>(choose-item-dialog <\Istring\i> <\Istring-list\i>)\b\ff<(CG)Times> - presents a heading and a set of radio buttons for choosing one of the strings. Returns the index of the selected string on \BOK\b or \B\ff<(CG)Courier>nil\b\ff<(CG)Times> on \BCancel\b. Example:
\B\ff<(CG)Courier>(choose-subset-dialog <\Istring\i> <\Istring-list\i>)\b\ff<(CG)Times> - presents a heading and a set of check boxes for indicating which items to select. Returns a list of the list of selected indices on \BOK\b or \B\ff<(CG)Courier>nil\b\ff<(CG)Times> on \BCancel\b. Example:
\B\ff<(CG)Courier>(get-string-dialog <\Iprompt\i> [:inital ,\Iexpr\i>])\b\ff<(CG)Times> - presents a dialog with a prompt, and editable text field, an \BOK\b and a \BCancel\b button. The initial contents of the editable field is empty or the princ formatted version of \B\ff<(CG)Courier><\Iexpr\i>\b\ff<(CG)Times>. The result is a string or \B\ff<(CG)Courier>nil\b\ff<(CG)Times>. Example:
\s\B\ff<(CG)Courier>> (get-string-dialog "New variable label:"\M:initial "X")
\s"Tensile Strength"\b\ff<(CG)Times>
\T\T\T\T
\B\ff<(CG)Courier>(get-value-dialog <\Iprompt\i> [:initial <\Iexpr\i>])\b\ff<(CG)Times> - like \B\ff<(CG)Courier>get-string-dialog\b\ff<(CG)Times>, except
\s - the initial value expression is converted to a string with print formatting
\s - the result is interpreted as a lisp expression and is evaluated
\s - the result is a list of the value, or \B\ff<(CG)Courier>nil\b\ff<(CG)Times>
\sOn the Macintosh there are two additional dialogs for dealing with files:
\T
\B\ff<(CG)Courier>(open-file-dialog)\b\ff<(CG)Times> - presents a standard \BOpen File\b dialog and returns a file name string or \B\ff<(CG)Courier>nil\b\ff<(CG)Times>. Resets the working folder on \BOK.
\T \b
\B\ff<(CG)Courier>(set-file-dialog prompt)\b\ff<(CG)Times> - presents a standard \BSave File\b dialog. Returns a file name string or \B\ff<(CG)Courier>nil\b\ff<(CG)Times>. Resets the working folder on \BOK\b.
\BB.2.2 Modeless Dialogs\b
\pnTwo functions for constructing custom modeless dialogs are available also. They are the functions \B\ff<(CG)Courier>interval-slider-dialog\b\ff<(CG)Times> and \B\ff<(CG)Courier>sequence-slider-dialog\b\ff<(CG)Times> introduced above in Section 8.\B\fs<14>
\SP\pi30\Sp\MThere may be slight differences in the implementation of \B\ff<(CG)Courier>dyn-load\b\ff<(CG)Times> on different systems. The help information for this function should give information that is appropriate for your system.\pn
Returns the sum of all the elements of its arguments. Returns 0 if there are no arguments. Vector reducing.
(tan radians)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the tangent of RADIANS. Vectorized.
(truncate number)\s\s\s\s\s\s\s\s\s\s[Function]
Returns real NUMBER as an integer, rounded toward 0. Vectorized.\ll<2>
\BC.2 Constructing and Modifying Compound Data and Variables\b
\ll<1>(def var form)\s\s\s\s\s\s\s\s\s\s\s [Macro]
VAR is not evaluated and must be a symbol. Assigns the value of FORM to VAR and adds VAR to the list *VARIABLES* of def'ed variables. Returns VAR. If VAR is already bound and the global variable *ASK-ON-REDEFINE* is not nil then you are asked if you want to redefine the variable.
)if-else first x y)\s\s\s\s\s\s\s\s\s\s[Function]
Takes simple or compound data items FIRST, X and Y and returns result of elementswize selecting from X if FIRST is not NIL and from Y otherwise.
(iseq n m)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of consecutive integers from n to m. Examples:
(iseq 3 7) returns (3 4 5 6 7)
(iseq 3 -3) returns (3 2 1 0 -1 -2 -3)
(list &rest args)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of its arguments
(repeat vals times)\s\s\s\s\s\s\s\s\s\s[Function]
Repeats VALS. If TIMES is a number and VALS is a non-null, non-array atom, a list of length TIMES with all elements eq to VALS is returned. If VALS is a list and TIMES is a number then VALS is appended TIMES times. If TIMES is a list of numbers then VALS must be a list of equal length and the simpler version of repeat is mapped down the two lists. Examples:
(rseq a b num)\s\ll<2>\s\s\s\s\s\s\s\s\s\s[Function]\ll<1>
Returns a list of NUM equally spaced points starting at A and ending at B.\ll<2>
\ll<0>(select a &rest indices)\s\s\s\s\s\s\s\s\s[Function]
A can be a list or an array. If A is a list and INDICES is a single number then the appropriate element of A is returned. If is a list and INDICES is a list of numbers then the sublist of the corresponding elements is returned. If A in an array then the number of INDICES must match the ARRAY-RANK of A. If each index is a number then the appropriate array element is returned. Otherwise the INDICES must all be lists of numbers and the corresponding submatrix of A is returned. SELECT can be used in setf.
(undef symbol)\s\s\s\s\s\s\s\s\s\s[Function]
If SYMBOL is a defined variable it is unbound and removed from the list of defined variables and returns SYMBOL.
LOGPOST computes the logposterior density. It should return the function, or a list of the function value and gradient, or a list of the function value, gradient and Hessian. MODE is an initial guess for the mode. SCALE and DERIVSTEP are used for numerical derivatives and scaling. VERBOSE controls printing of iteration information during opimization, PRINT controls printing of summary information. If QUICK is T the summary is based on first order approximations.
(beta-cdf x alpha beta)\s\s\s\s\s\s\s\s\s[Function]
Returns the value of the Beta(ALPHA, BETA) distribution function at X.
Vectorized.
(beta-dens x alpha beta)\s\s\s\s\s\s\s\s\s[Function]
Returns the density at X of the Beta(ALPHA, BETA) distribution. Vectorized.
(beta-quant p alpha beta)\s\s\s\s\s\s\s\s\s[Function]
Returns the P-th quantile of the Beta(ALPHA, BETA) distribution. Vectorized.
(beta-rand n a b)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of N beta(A, B) random variables. Vectorized.
(binomial-cdf x n p)\s\s\s\s\s\s\s\s\s\s[Function]
Returns value of the Binomial(N, P) distribution function at X. Vectorized.
(binomial-pmf k n p)\s\s\s\s\s\s\s\s\s\s[Function]
Returns value of the Binomial(N, P) pmf function at integer K. Vectorized.
(binomial-quant x n p)\s\s\s\s\s\s\s\s\s[Function]
Returns the interquartile range of the elements of X.
(mean x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the mean of the elements x. Vector reducing.
(median x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the median of the elements of X.
(newtonmax f start &key scale derivstep (verbose 1) return-derivs)\s\s\s\s[Function]
Maximizes F starting from START using Newton's method with backtracking. If RETURN -DERIVS is NIL returns location of maximum; otherwise returns list of location, function value, gradient and hessian at maximum. SCALE should be a list of the typical magnitudes of the parameters. DERIVSTEP is used in numerical derivates and VERBOSE controls printing of iteration information. COUNT-LIMIT limits the number of iteractions.
Maximizes F using the Nelder-Mead simplex method. START can be a starting simplex - a list of N+1 points, with N=dimension of problem, or a single point. If start is a single point you should give the size of the initial simplex as SIZE, a sequence of length N. Default is all 1's. EPSILON is the convergence tolerance. ALPHA-DELTA can be used to control the behavior of simplex algorithm.
(normal-cdf x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the value of the standard normal distribution function at X.
Vectorized.\ll<-1>
\ll<0>
(normal-dens x)\s\s\s\s\s\s\s\s\s\s[Function]
Returns the density at X of the standard normal distribution. Vectorized.\ll<-1>
\ll<0>
(normal-quant p)\s\s\s\s\s\s\s\s\s\s[Function]
Returns the P-th quantile of the standard normal distribution. Vectorized.\ll<-1>
\ll<0>
(normal-rand n)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of N standard normal random numbers. Vectorized\ll<-1>.
\ll<0>
(nreg-model mean-function y theta &key (epsilon 0.0001)\M(coun-limit 20) (print t) parameter-names response-name case-labels weights included (verbose print))\s\s\s\s[Function]
Fits nonlinear regression model with MEAN-FUNCTION and response Y using initial parameter guess THETA. Returns model object.
(numgrad f x &optional scale derivstep)
Computes the numerical gradient of F at X.\s\s\s\s\s\s\s[Function]
(numhess f x &optional scale derivstep)\s\s\s\s\s\s\s[Function]
Computes the numerical Hessian matrix of F at X.
(oneway-model data &key (print t))\s\s\s\s\s\s\s\s[Function]
DATA: list of compound-data. Example:
(order x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns a sequence of the indices of elements in the sequence of numbers o\ll<2>r strings X in order.\ll<0>
Returns a list of all lisp objects in FILE. FILE can be a string or a symbol,
in which case the symbol'f print name is used.
(regression-model x y &key (intercept t) (print t) weights included predictor-names responsepname case-labels)\s\s\s\s\s\s\s\s\s\s\s[Function]
X - list of the independent variables or X matrix
Y - dependent variable
INTERCEPT - T to include (default), NIL for no intercept
PRINT - if not NIL print summary information
WEIGHTS - if supplied should be same length as y; error variances are assumed to be inversely proportional to WEIGHTS
PREDICTOR-NAMES
RESPONSE-NAME
CASE-LABELS - sequences of strings or symbols
INCLUDED - if supplied should be the same length as Y, with elements nil to skip a in computing estimates (but not in residual analysis)
Returns a regression model object. To examine the model further assign the result to a variable and send it messages. Example (data are in file absorbtion.lsp in the sample data directory/folder):
(def m (regression-model (list iron aluminum) absorbtion))
Returns a list of N uniform random variables from the range (0, 1). \ll<2>Vectorized.
\BC.4 Plotting Functions\b
\ll<0>(boxplot data &key (title "Box Plot"))\s\s\s\s\s\s\s[Function]
DATA is a sequence, a list of sequences or a matrix. Makes a boxplot of the sequence or a parallel box plot of the sequences in the list or the columns of the matrix.
(boxplot-x x data &key (title "Box Plot"))\s\s\s\s\s\s\s[Function]
DATA is a list of sequences or a matrix. X is a sequence with as many elements as DATA has elements or columns. Makes a parallel box plot of the sequences in the list or the columns of the matrix vs X.
(close-all-plots)\s\s\s\s\s\s\s\s\s\s[Function]
Close all plot windos.
(histogram data &key (title "Histogram"))\s\s\s\s\s\s\s[Function]
Opens a window with a histogram of DATA. TITLE is the window title. The number of bins used can be adjusted using the histogram menu. The histogram can be linked to other plots with the link-views command. Returns a plot object.
NAMES is a number or a list of character strings. Opens a window with a list of the supplied character strings or entries numbered from 0 to NAMES - 1. This display can be linked to plots with the link-views function. Returns a plot object.
(plot-function f xmin xmax &optional (num-points 50))\s\s\s\s\s[Function]
Plots function F of one real variable over the range between xmin and xmax. The function is evaluated at NUM-POINTS points.
(plot-lines x y &key (title "Line Plot") variable-labels)\s\s\s\s\s[Function]
Opens a window with a connected line plot of X vs Y, where X and Y are compound number-data. VARIABLE-LABELS, if supplied, should be lists of character strings. TITLE is the window title. The plot can be linked to other plots with the link-views command. Returns a plot object.
(plot-points x y &key (title "Scatter Plot") variable-labels point-labels)\s\s\s[Function]
Opens a window with a scatter plot of X vs Y, where X and Y are compound number-data. VARIABLE-LABELS and POINT-LABELS, if supplied, should be lists of character strings. TITLE is the window title. The plot can be linked to other plots with the link-views command. Returns a plo\ll<2>t object.
(probability-plot data &key (distribution-function (function normal-cdf)) (title "Probability Plot") point-labels)\s\s\s\s\s\s\s\s\s\s\s[Function]
\ll<0>(quantile-plot data &key (quantile-function (function normal-quant)) (title "Quantile Plot") point-labels)\s\s\s\s\s\s\s\s\s\s\s\s[Function]
(scatterplot-matrix data &key (title "Spinning Plot") variable-labels point-labels (scale t))\s[Function]
DATA is a list of two or more compound number-data objects of equal length .Opens a window with a brushable scatter plot matrix of the elements of DATA.VARIABLE-LABELS and POINT-LABELS, if supplied, should be lists of character strings. TITLE is the window title. If scale is NIL data are assumed to be between -1 and 1.The plot can be linked to other plots with the link-views command. Returns a plot object.
(spin-function f xmin xmax ymin ymax &optional (num-points 6))\s\s\s\s[Function]
Rotatable plot of function F of two real variables over the range between [xmin, xmax] x [ymin, ymax]. The function is evaluated at NUM-POINTS points.
(spin-plot data &key (title "Spinning Plot") variable-labels point-labels (scale t))\s\s[Function]
DATA is a list of three compound number-data objects of equal length. Opens a window with a rotating plot of the three elements of DATA. VARIABLE-LABELS and POINT-LABELS, if supplied, should be lists of character strings. TITLE is the window title. If scale is NIL data are assumed to be between -1 and 1. The plot can be linked to other plots with the link-views command. Returns a plot object.
With no argument, NIL means a case is not used in calculating estimates, and non-nil means it is used. NEW-INCLUDED is a sequence of length of y of nil and t to select cases. Estimates are recomputed.
With no argument returns T if the model includes an intercept term, nil if not. With an argument NEW-INTERCEPT the model is changed to include or exclude an intercept, according to the value of NEW-INTERCEPT, and estimates are recomputed.
:leverages\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the diagonal elements of the hat matrix.
:num-cases\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the number of cases in the model.
:num-coefs\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the number of coefficients in the fit model (including the intercept if the model includes one).
:num-included\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the number of cases used in the computations.
Opens a window with a plot of the standardized residuals and two standard error bars for the posterior distribution of the actual deviations from the line. See Chaloner and Brant. If X-VALUES are not supplied the fitted values are used. The plot can be linked to other plots with the link-views function. Returns a plot object.
Opens a window with a plot of the residuals. If X-VALUES are not supplied the fitted values are used. The plot can be linked to other plots with the link-views function. Returns a plot object.
Returns the raw residuals for a model without weights. If the model includes weights the raw residuals times the square roots of the weights are returned.
:sigma-hat\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the estimated standard deviation of the deviations about the regression line.
With no argument returns the weight sequence as supplied to m; NIL means ans unweighted model. NEW-W sets the weights sequence to NEW-W and recomputes the estimates.
:x-matrix\s\s\s\s\s\s\s\s\s\s [Object Method]
Returns the X matrix for the model, including a column of 1's, if appropriate. Columns of X matrix correspond to entries in basis.
\ll<1>:add-lines lines &key type (draw t)\s\s\s\s\s\s\s [Object Method]
Adds lines to plot. LINES is a list of sequences, the coordinates of the line starts. TYPE is normal or dashed. If DRAW is true the new lines are added to the screen.
Sets or retrieves the indices of the current content variables.
:do-mouse x y type extend option\s\s\s\s\s\s\s [Object Method]
Sends appropriate action message for mouse mode to plot.
:drag-grey-rect x y width height\s\s\s\s\s\s\s [Object Method]
Drags grey rectangle starting at (LIST (- X WIDTH) (- Y HEIGHT) WIDTH HEIGHT) while mouse button is down. Returns the final rectangle. Should be called when the mouse is down.\ll<2>
Calls fcn repeatedly while mouse button is down. FCN should take two arguments, the current x and y coordinates of the mouse. Returns NIL. Should be called when button is already down.
Sets or retrieves current acis label state. SHOWING and LABELED should be true or NIL; TICKS should be a number. All three should be supplied for setting a new state. A list of the three properties is returned.
Sets or retrieves current acis label state. SHOWING and LABELED should be true or NIL; TICKS should be a number. All three should be supplied for setting a new state. A list of the three properties is returned.\ll<2>
Adds points to plot. POINTS is a number or a list of sequences, POINT-LABELS a list of strings. If DRAW is true the new points are added to the screen.\ll<2>
\BC.5.5 Scatterplot Methods\b\ll<0>
\ll<2>
\ll<0>:abline a b\s\s\s\s\s\s\s\s\s\s [Object Method]
Adds the graph of the line A + B x to the plot.
:add-lines lines &key type (draw t)\s\s\s\s\s\s\s [Object Method]
Adds lines to plot. LINES is a list of sequences, the coordinates of the line starts. TYPE is normal or dashed. If DRAW is true the new lines are added to the screen.
The ARGS can be matrices, vectors, or lists. Arguments are bound into a matrix along their columns. Example: (bind-columns #2a((1 2)(3 4))\M#(5 6)) returns #2a((1 2 5)(3 4 6))
The ARGS can be matrices, vectors, or lists. Arguments are bound into a matrix \ll<2>along their rows. Example: (bind-rows #2a((1 2)(3 4))\M#(5 6)) returns #2a((1 2)(3 4)(5 6))
Modified Cholesky decomposition. \IA\i should be a square, symmetric matrix. Computes lower triangular matrix \IL\i such that \ILL\SPT\i\Sp =\I A\i + \ID\i where \ID\i is a diagonal matrix. If \IA\i is strictly positive definite \ID\i will be zero. Otherwise \ID\i is as small as possible to make \IA\i + \ID\i numerically strictly positive definite. Returns a list (\IL\i (\Imax\i \ID\i)).
(column-list m)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of the columns of M as vectors
(copy-array array)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a copy of ARRAY with elements eq to the elements of ARRAY.
Returns a copy of VECTOR with elements eq to the elements of VECTOR
(count-elements number &rest more-numbers)\s\s\s\s\s\s[Function]
Returns the number of its arguments. Vector reducing
(cross-product x)\s\s\s\s\s\s\s\s\s\s[Function]
If X is a matrix returns (MATMULT (TRANSPOSE X) X). If X is a vector returns (INNER-PRODUCT X X).
(determinant m)\s\s\s\s\s\s\s\s\s\s[Function]
Returns the determinant of the square matrix M.
(diagonal x)\s\s\s\s\s\s\s\s\s\s\s[Function]
If X is a matrix, returns the diagonal of X. If X is a sequence, returns a diagonal matrix of rank (length X) with diagonal elements eq to the elements of X.
(identity-matrix n)\s\s\s\s\s\s\s\s\s\s[Function]
Returns the identity matrix of rank N.
(inner-product x y)\s\s\s\s\s\s\s\s\s\s[Function]
Returns inner product of sequences X and Y.
(inverse m)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the inverse of the the square matrix M; signals an error if M is ill conditioned or singular
(lu-decomp a)\s\s\s\s\s\s\s\s\s\s\s[Function]
A is a square matrix of numbers (real or complex). Computes the LU decomposition of A and returns a list of the form (LU IV D FLAG), where LU is a matrix with the L part in the lower triangle, the U part in the upper triangle (the diagonal entries of L are taken to be 1), IV is a vector describing the row permutation used, D is 1 if the number of permutations is odd, -1 if even, and FLAG is T if A is numerically singular, NIL otherwise. Used bu LU-SOLVE.
(lu-solve lu b)\s\s\s\s\s\s\s\s\s\s\s[Function]\ll<2>
LU is the result of (LU-DECOMP A) for a square matrix A, B is a sequence. Returns the solution to the equation Ax = B. Signals an error if A is singular.
Creates and returns a list containing SIZE elements, each of which is initialized to INITIAL-ELEMENT.
\ll<1>(make-sweep-matrix x y &optional weights)\s\s\s\s\s\s\s[Function]
X is a matrix, Y and WEIGHTS are sequences. Returns the sweep matrix for the (possibly weighted) regression of Y on X.
(map-elements function data &rest more-data)\s\s\s\s\s\s[Function]
FUNCTION must take as many arguments as there are DATA arguments supplied. DATA arguments must either all be sequences or all be arrays of the same shape. The result is of the same type and shape as the first DATA argument, with elements the result of applying FUNCTION elementwise to the DATA arguments
(matmult a b)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the matrix product of matrices a and b. If a is a vector it is treated as a row vector; if b is a vector it is treated as a column vector.
(matrix dim data)\s\s\s\s\s\s\s\s\s\s[Function]
returns a matrix of dimensions DIM initialized using sequence DATA in row major order.
(matrixp m)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if M is a matrix, NIL otherwise.
(outer-product x y &optional (fcn (function *)))\s\s\s\s\s\s[Function]
Returns the generalized outer product of x and y, using fcn. Tat is, the result is a matrix of dimension ((length x) (length y)) and the (i j) element of the result is computed as (apply fcn (aref x i) (aref y j)).
(permute-array a p)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a copy of the array A permuted according to the permutation P.
(qr-decomp a)\s\s\s\s\s\s\s\s\s\s\s[Function]
A is a matrix of real numbers with at least as many rows as columns. Computes the QR factorization of A and returns the result in a list of the form (Q R).
(rcondest a)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns an estimate of the reciprocal of the L1 condition number of an upper triangular matrix a.
(row-list m)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of the rows of M as vectors
(solve a b)\s\s\s\s\s\s\s\s\s\s\s[Function]
Solves A x = B using LU decomposition and backsolving. B can be a sequence or a matrix.
(split-list list cols)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a list of COLS lists of equal length of the elements of LIST.
Returns the sum of all the elements of its arguments. Returns 0 if there are no arguments. Vector reducing.
(sv-decomp a)\s\s\s\s\s\s\s\s\s\s\s[Function]
A is a matrix of real numbers with at least as many rows as columns. Computes the singular value\ll<3> decomposition of A and returns a list of the form (U W V FLAG) where U and V are matrices whose columns are the left and right singular vectors of A and W is the sequence of singular values of A. FLAG is T if the algorithm converged, NIL otherwise.\ll<2>
\ll<0>(sweep-operator a indices &optional tolerances)\s\s\s\s\s\s[Function]
A is a matrix, INDICES a sequence of the column indices to be swept. Returns a list of the swept result and the list of the columns actually swept. (See MULTREG documentation.) If supplied, TOLERANCES should be a list of real numbers the same length as INDICES. An index will only be swept if its pivot element is larger than the corresponding element of TOLERANCES.
CFUN is a string naming a C function. The remaining arguments must be integers, sequences of integers, reals or sequences of reals. CFUN is called with the remaining arguments and a list of the lists of the values of the arguments after the call is returned. Arguments in the call will be pointers to ints or pointers of doubles. Not available on all implementations.
FSUB is a string naming a FORTRAN function. The remaining arguments must be integers, sequences of integers, reals or sequences of reals. FSUB is called with the remaining arguments and a list of the lists of the values of the arguments after the call is returned. Arguments in the call will be (arrays of) integers or double precision numbers. Not available on all implementations.
LFUN\Mis a C function written to conform to internal XLISP argument reading and value returning conventions. Applies LGUN to ARS and returns the result.
Links the object file FILE with standard C libraries and loads into the running XLISP-STAT process. If FORTRAN is not NIL also searches standard FORTRAN libraries. LIBFLAGS can be a string used to specify additional libraries, for example
(exit)\s\s\s\s\s\s\s\s\s\s\s\s[Function]
Exits from XLISP.
(expand number)\s\s\s\s\s\s\s\s\s\s[Function]
Expand memory by adding NUMBER segments. Returns the number of segments.
Prints the documentation associated with those symbols whose print names contain STRING as substring. STRING may be a symbol, in which case the print-name of that symbol is used.
Loads the file named by FILENAME into XLISP. Returns T if load succeeds, NIL if file does not exist.
(nodebug)\s\s\s\s\s\s\s\s\s\s\s[Function]
Disable breaking on error on.
(room)\s\s\s\s\s\s\s\s\s\s\s\s[Function]
Shows memory allocation statistics. Returns nil.
(save file)\s\s\s\s\s\s\s\s\s\s\s[Function]
Saves current memory image in FILE.wks. Does not work right with allocated objects.
(variables)\s\s\s\s\s\s\s\s\s\s\s[Function]
Prints the names of all def'ed variables\ll<2>
\BC.8 Some Basic Lisp Functions, Macros and Special Forms\b
\ll<0>Except where noted these functions should have a significant subset of their Common Lisp functionality as defined in Steele [15].
(and {form}*)\s\s\s\s\s\s\s\s\s\s\s [Macro]
Evaluates FORMs in order from left to right. If any FORM evaluates to NIL, returns immediately with the value NIL. Else, returns the value of the last FORM.
Evaluates KEYFORM and tries to find the KEY that is EQL to the value of KEYFORM. If one is found, then evaluates FORMs that follow the KEY and returns the value of the last FORM. If not, simply returns NIL.
(cdr list)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the cdr of LIST. Returns NIL if LIST is NIL.
Evaluates each TEST in order until one evaluates to a non-NIL value. Then evaluates the associated FORMs in order and returns the value of the last FORM. If no forms follow the TEST, then returns the value of the TEST. Returns NIL, if all TESTs evaluate to NIL.
(cons x y)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns a new cons (list node) whose car and cdr are X and Y, respectively.
(consp x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X is a cons; NIL otherwise.
(defmacro name defmacro-lambda-list [doc] {form}*)\s\s\s\s\s [\ll<2>Macro\ll<1>]
Defines a macro as the global definition of the symbol NAME. The complete syntax of a lambda-list is: (var* [&optional var*] [&rest var] [&aux var*]) The doc-string DOC, if supplied, is saved as a FUNCTION doc and can be retrieved by (documentation 'NAME 'function).
(defun name lambda-list [doc] {form}*)\s\s\s\s\s\s\s [\ll<2>Macro\ll<1>]
Defines a function as the global definition of the symbol NAME. The complete syntax of a lambda-list is: (var* [&optional var*] [&rest var] [&aux var*]) The doc-string DOC, if supplied, is saved as a FUNCTION doc and can be retrieved by (documentation 'NAME 'function).
(do ({(var [init [step]])}*) (endtest {result}*) {tag | statement}*)\s\s\s\s [\ll<2>Macro\ll<1>]
Creates a NIL block, binds each VAR to the value of the corresponding INIT, and then executes STATEMENTs repeatedly until ENDTEST is satisfied. After each iteration, assigns to each VAR the value of the corresponding STEP. When ENDTEST is satisfied, evaluates RESULTs as a PROGN and returns the value of the last RESULT (or NIL if no RESULTs are supplied). Performs variable bindings and assignments all at once, just like LET does.
(do* ({(var [init [step]])}*) (endtest {result}*) tag | statement*)\s\s\s\s [\ll<2>Macro\ll<1>]
Just like DO, but performs variable bindings and assignments in serial, just like LET* and SETQ do.
Executes STATEMENTs, with VAR bound to each number between 0 (inclusive) and the value of COUNTFORM (exclusive). Then returns the value of RESULT (which defaults to NIL).
\ll<0>(elt a &rest indices)\s\s\s\s\s\s\s\s\s\s[Function]
A can be a list or an array. If A is a list and INDICES is a single number then the appropriate element of A is returned. If is a list and INDICES is a list of numbers then the sublist of the corresponding elements is returned. If A in an array then the number of INDICES must match the ARRAY-RANK of A. If each index is a number then the appropriate array element is returned. Otherwise the INDICES must all be lists of numbers and the corresponding submatrix of A is returned. ELT can be used in setf.
(eq x y)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X and Y are the same identical object; NIL otherwise.
(eql x y)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X and Y are EQ, or if they are numbers of the same type with the same value, or if they are identical strings. Returns NIL otherwise.
(equal x y)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X and Y are EQL or if they are of the same type and corresponding components are EQUAL. Returns NIL otherwise. Arrays must be EQ to be EQUAL.
(equalp x y)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if (equal x y), or x, y are numbers and (= x y), or x and y are strings and (string-equal x y).
(first x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Equivalent to (CAR X).
(format destination control &rest args)\s\s\s\s\s\s\s[Function]
Very basic implementation of Common Lisp format function. Only A, S, D, F, E, and G can take two.
(funcall function &rest arguments)\s\s\s\s\s\s\s\s[Function]
Applies FUNCTION to the ARGUMENTs
(function x) or #'x\s\s\s\s\s\s\s\s\s [Special Form]
If X is a lambda expression, creates and returns a lexical closure of X in the current lexical environment. If X is a symbol that names a function, returns that function.
(getf place indicator &optional default)\s\s\s\s\s\s\s[Function]
Returns property value of INDICATOR in PLACE, or DEFAULT if not found.
(identity x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Simply returns X.
(if test then [else])\s\s\s\s\s\s\s\s\s\s [Macro]
If TEST evaluates to non-NIL, then evaluates THEN and returns the result. If not, evaluates ELSE (which defaults to NIL) and returns the result.
Initializes VARs, binding them to the values of VALUEs (which defaults to NIL) from left to right, then evaluates FORMs as a PROGN.
(listp x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X is either a cons or NIL; NIL otherwise.
(map result-type function sequence &rest more-sequences)\s\s\s\s\s[Function]
FUNCTION must take as many arguments as there are sequences provided. RESULT-TYPE must be the either the symbol VECTOR or the symbol LIST. The result is a sequence of the specified type such that the i-th element of the result is the result of applying FUNCTION to the i-th elements of the SEQUENCEs.
(mapc fun list &rest more-lists)\s\s\s\s\s\s\s\s[Function]
Applies FUN to successive cars of LISTs. Returns the first LIST.
(mapcar fun list &rest more-lists)\s\s\s\s\s\s\s\s[Function]
Applies FUN to successive cars of LISTs and returns the results as a list.
(mapl fun list &rest more-lists)\s\s\s\s\s\s\s\s[Function]
Applies FUN to successive cdrs of LISTs. Returns the first LIST.
(maplist fun list &rest more-lists)\s\s\s\s\s\s\s\s[Function]
Applies FUN to successive cdrs of LISTs and returns the results as a list.
(member item list key (test (function eql)) test-not)}\s\s\s\s\s\s[Function]
Returns the tail of LIST beginning with the first ITEM.
(not item)\s\s\s\s\s\s\s\s\s\s\s[Function]
Test if object is nil.
(nth n list)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the N-th element of LIST, where the car of LIST is the zero-th element.
(nthcdr n list)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns the result of performing the CDR operation N times on LIST.
(null x)\s\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X is NIL; NIL otherwise.
(numberp x)\s\s\s\s\s\s\s\s\s\s\s[Function]
Returns T if X is any kind of number; NIL otherwise.
Opens file named by string or symbol FNAME. DIRECTION is :INPUT or :OUTPUT.\ll<2>
(or {form}*)\s\s\s\s\s\s\s\s\s\s\s [Macro]
Evaluates FORMs in order from left to right. If any FORM evaluates to non-NIL, quits and returns that value. If the last FORM is reached, returns whatever value it returns.
(reduce function sequence &key initial-value)\s\s\s\s\s\s[Function]
Combines all the elements of SEQUENCE using a binary operation FUNCTION. If INITIAL-VALUE is supplied it is logically placed before SEQUENCE.
(remove item list &key (test (function eql)) test-not)\s\s\s\s\s\s[Function]
Returns a copy of LIST with ITEM removed.
(remove-if test list)\s\s\s\s\s\s\s\s\s\s[Function]
Returns a copy of LIST with elements satisfying TEST removed.
(remove-if-not test list)\s\s\s\s\s\s\s\s\s[Function]
Returns a copy of LIST with elements not satisfying TEST removed.
(require name)\s\s\s\s\s\s\s\s\s\s\s[Function]
Loads module NAME, unless it has already been loaded. If PATH is supplied it is used as the file name; otherwise NAME is used. If file NAME is not in the current directory *default-path* is searched.
Replaces the value in PLACE with the value of NEWVALUE, from left to right. Returns the value of the last NEWVALUE. Each PLACE may be a symbol that names a variable or function call form whose first element is the name of one of the following functions: nth, aref, subarray, sublist, select, elt, get, symbol-value, symbol-plist, documentation, slot-value, or\sc?r\sc??r\sc???r\sc????r where '?' stands for either 'a' or 'd'. defsetf can be used to define new setf methods.
VARs are not evaluated and must be symbols. Assigns the value of the first FORM to the first VAR, then assigns the value of the second FORM to the second VAR, and so on. Returns the last value assigned.