INRA MIAJ nls2

 

Some details about the administration of NLS2 on Unix-alike systems

See also the french administration notes.

 

General characteristics

Contents of nls2: See the file CONTENTS

Pre-requisite : See the file available.html.

Interface to nls2:

nls2 can be used via R, Splus, C or Fortran programmes.

Installation:

The command R CMD INSTALL can be used, or a script INSTALL. The script INSTALL is specially devoted to adaptation to Splus and nls2C.
See install.html and the comments in file INSTALL.

R CMD INSTALL and the script INSTALL use the script configure
See the comments in file configure.

 

Some specific characteristics

Evaluation of the user model:

The user describes his statistical model in a formal-syntax file, from which either, a syntax tree is built and evaluated , or a C-program is generated, dynamically compiled and linked to the package.
In the last case, operating-system commands are called from a R-function "loadnls2", which use the Makefile and Makevars files located in the directory loaduser. This directory and files are created by the script configure.

The messages file:

To make possible translation of the output easier , all the messages are stored in the file FILEMESS

Derogations to the R conventions:

Not all of the R conventions about R-packages are satisfied.
(See the conventions in the help-file of R "Writing R Extensions").
This is due to the fact that nls2 was not designed for R, only.

The main derogations are:

* nls2 does not include the directory Rd.
Usually, the command R CMD INSTALL builds, from the Rd files which contain the helps, the directories html and eventually man.
Here, the html directory is already included in the provided package.

* The memory allocations/desallocations are done by the standard C subroutines:
malloc, calloc, realloc and free.

* To known if a number is finite,
we use the function 'finite()' from the file ieee754.h (Linux version) or ieeefp.h (Unix version).

* Fortran subroutines are declared and called from C by adding an underscore at the end of their names.

* The script configure should verify the pre-requisite.

* man-files should describe the examples (See "writing doc"; descriptions of the examples can be found in our book).
Note: To check conformity of the R conventions, in the directory up to nls2, type: R CMD check nls2 before creating the distribuable package by: R CMD build nls2