[R] Matrix Inversion

2007-12-12 Thread Wang Chengbin
I got the following error: a = read.csv("mat.csv") b = as.matrix(a) tb = t(b) bb = tb %*% b dim(bb) ibb = solve(bb) bb %*% ibb > ibb = solve(bb) Error in solve.default(bb) : system is computationally singular: reciprocal condition number = 1.77573e-19 > Are there any ways to find more informati

[R] load non-default libraries during start-up

2007-10-11 Thread Wang Chengbin
Are there ways to load a set of non-default libraries (i.e. MASS, etc.) when R is launched? Thanks for the help. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

[R] R API - optim

2007-10-13 Thread Wang Chengbin
I am trying to use the R API to call optim functions (nmmin, vmmin, lbfgsb, etc.) through a C program but I couldn't find the shared library to link under the R-2.6.0 build which is compiled under Linux (REL5). main.cpp:35: undefined reference to `Rf_initEmbeddedR(int, char**)' main.cpp:41: undefi

Re: [R] R API - optim

2007-10-14 Thread Wang Chengbin
The attached code is compiled properly. The error happens at the linking stage. It seems that R shared library is not built by configure/make. 2007/10/14, Dirk Eddelbuettel <[EMAIL PROTECTED]>: > > > On 14 October 2007 at 05:58, Wang Chengbin wrote: > | I am trying to use