Re: [Rd] R + C + Lapack toy regression example

2009-09-25 Thread Douglas Bates
On Thu, Sep 24, 2009 at 2:09 PM, Vinh Nguyen vqngu...@uci.edu wrote: On Thu, Sep 24, 2009 at 11:49 AM, Simon Urbanek simon.urba...@r-project.org wrote: As Doug pointed out you don't want to be using .C(). As for matrix manipulations - they are usually done directly on the objects which are

Re: [Rd] R + C + Lapack toy regression example

2009-09-24 Thread Douglas Bates
On Wed, Sep 23, 2009 at 2:39 AM, Vinh Nguyen vqngu...@uci.edu wrote: dear list, since matrix manipulations is often of interest in statistical computations, i'd like to get a working example of using Lapack for regression.  However, i run into an error. My matrix-lapack-example.c file:

Re: [Rd] R + C + Lapack toy regression example

2009-09-24 Thread Vinh Nguyen
thank you William Dunlap and professor Bates for your responses. Since the first argument is always an N for linear regression, i just placed const char* trans = N; in my .c file and things worked. See some comments below. On Thu, Sep 24, 2009 at 5:50 AM, Douglas Bates ba...@stat.wisc.edu wrote:

Re: [Rd] R + C + Lapack toy regression example

2009-09-24 Thread Vinh Nguyen
On Thu, Sep 24, 2009 at 11:49 AM, Simon Urbanek simon.urba...@r-project.org wrote: As Doug pointed out you don't want to be using .C(). As for matrix manipulations - they are usually done directly on the objects which are vectors stored in column-major order. i meant .Call(). also, sorry for

[Rd] R + C + Lapack toy regression example

2009-09-23 Thread Vinh Nguyen
dear list, since matrix manipulations is often of interest in statistical computations, i'd like to get a working example of using Lapack for regression. However, i run into an error. My matrix-lapack-example.c file: #include R_ext/Lapack.h void reg(const char* trans, const int* m, const int*