Skip to content

bug in prcomp (PR#8994)

3 messages · Bill Szkotnicki, Brian Ripley

#
The default method for prcomp does not have an na.action argument:

Usage:

      prcomp(x, ...)

      ## S3 method for class 'formula':
      prcomp(formula, data = NULL, subset, na.action, ...)

      ## Default S3 method:
      prcomp(x, retx = TRUE, center = TRUE, scale. = FALSE, tol = NULL, ...)

so this is as documented.  In general only formula-based interfaces do 
have subset and na.action.
On Fri, 16 Jun 2006, KjetilBrinchmannHalvorsen at gmail.com wrote:

            

  
    
#
Hello,

I am trying to make use of the R standalone library in mu own c and fortran
code. ( fedora core linux )

Unfortunately I am unable to link and create an executable.
See below.
It is the example file in "src/nmath/standalone"
Does anyone see what I might be missing?

% R CMD COMPILE tr.c
gcc -I/usr/local/lib64/R/include -I/usr/local/lib64/R/include
-I/usr/local/include   -fpic  -g -O2 -std=gnu99 -c tr.c -o tr.o

% R CMD LINK tr.o
libtool: link: unable to infer tagged configuration
libtool: link: specify a tag with `--tag'

Thanks,
 
Bill
#
On Sat, 17 Jun 2006, Bill Szkotnicki wrote:

            
There is no such file in current R:
/users/ripley/R/svn/R-devel/src/nmath/standalone
gannet% ls
Makefile.in   Makefile.win* README        sunif.c       test.c

and README contains (correct) information on how to use it.
Where exactly did you see that recommended?  See R CMD LINK --help for how 
to use it (and not for this purpose).  I suspect you want

% gcc -o tr tr.o -L/path/to/libRmath -lRmath -lm