[R] Solving a tridiagonal system

Douglas Bates bates at stat.wisc.edu
Wed Oct 1 19:11:08 CEST 2003


"Liaw, Andy" <andy_liaw at merck.com> writes:

> I see that the LAPACK routine DGTSV is in the R source, and defined in
> R_ext/lapack.h,  but I don't know how to get to it from R.

You need to write a separate package containing C or Fortran wrapper
functions if you want to access Lapack routines reliably.  (There is
another way but it is system dependent.)  This is peculiar to Lapack
routines and is a result of the way that we configure them as a
separate shared object or DLL.  We have discussed incorporating Lapack
in the R executable rather than as a separate shared object but that
would nearly double the size of the executable.  As we migrate more of
the linear algebra in R to Lapack we may be forced to do that.  It
shouldn't be a problem for those with a reasonable amount of
memory. On my system it would change the executable from 1.2 MB to 2.1
MB but I have 1.5 GB of memory so that isn't a big deal to me.
However we still have as an objective that R should be able to run on
machines with limited amounts of memory, as small as 8 MB.

We would like to know if users are still running R on computers with
very limited amounts of memory, say less than 32 MB.  If that is not
the case then it may be better for us to incorporate Lapack in the
executable.

If anyone wants to communicate off-list on exactly what the package
would contain I can describe that.




More information about the R-help mailing list