process.args(...)
strictify(val,status)
&result
process.args()
et seq is called, if possible, to
massage the arguments into a form suitable for passing to .C()
.
For example, in function hyperg_0F1(c,x)
, one wants
hyperg_0F1(0.1, c(0.3,0.4))
and hyperg_0F1(c(0.1,0.2),
0.3)
and hyperg_0F1(c(0.1,0.2),c(0.3,0.4)
to behave sensibly.
Function process.arg()
does this by returning a list whose
elements are vectors of the same length. Most of the special
functions use process.args()
to ensure that the returned value
takes the attributes of the input argument with most elements where
possible.
Function strictify()
uses the status
value returned by
the error
a NaN
. In most of the
special functions, strictify()
is called if argument
strict
takes its default value of
TRUE
. Setting it to FALSE
sometimes returns a numerical
value as per the GSL reference manual. In most of the special functions, if argument give
takes its
default value of FALSE
, only a numerical value is returned.
If TRUE
, error information and the status (see preceding
paragraph) is also returned.
Package version numbers match GSL library numbers, in that gsl package
x.y-z will require gsl library version x.y. Neither forward nor
backward compatibility is guaranteed, although the configure.ac file
specifies a minimum GSL version (ie it specifies a version >= 1.5, or
whatever).
The function naming scheme directly copies the GSL manual except that
leading gsl_sf_
and, if present, the trailing _e
is
stripped: thus gsl_sf_Airy_Ai_e
goes to R function
airy_Ai()
; however, some functions retain the prefix to avoid
conflicts (viz gsl_sf_sin()
, gsl_sf_cos()
,
gsl_sf_gamma()
, gsl_sf_ choose()
, gsl_sf_beta()
).
R function arguments have the same names as in the GSL reference
manual, except for the quasirandom functions documented in the
Qrng
manpage.
The package is organized into units corresponding to GSL header files;
the .c
, .R
, and .Rd
filenames match the GSL header
filenames, except that the .Rd
files are capitalized. Functions
appear in all files in the same order as the GSL reference manual, which
precludes the use of the tidying method given in section 3.1 of R-exts.
Error forms of GSL functions (_e
versions) are used if available.
In general, documentation is limited to: (a), a pointer to the GSL reference book, which would in any case dominate any docs here; and (b), re-productions of some tables and figures in Abramowitz and Stegun (June 1964).