Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition
Neil, pls tell why do you need the correlation matrix? if you are trying to simulate correlated variables then you can go around the cholesky by using svd. if you really need the correlation ( I think it is always possible to avoid it ) then Rmetrics have a function to turn your matrix into positive semi-definite. you can also consider a factor model which will reduce the dimensionality tremendously. Stephen C. Bond On Apr 1, 2009, ngottl...@marinercapital.com wrote: Dear fellow R Users: I am doing a Cholesky decomposition on a correlation matrix and get error message the matrix is not semi-definite. Does anyone know: 1- a work around to this issue? 2- Is there any approach to try and figure out what vector might be co-linear with another in thr Matrix? 3- any way to perturb the data to work around this? Thanks for any suggestions. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] RMySQL compile
Jeff, Thank you so much for responding. I am ready to do a lot of tweaking. From your message it looks like you are asking me to provide assignments on the same line as R CMD but precede the command. I am using bash and the usual thing would be to export those variables and then run R CMD. I tried that and configure ignores the variables. If you know where is the actual makefile then I could try to finish this without using R CMD. calling ./configure directly works ( R CMD INSTALL is the problem and I do not know how to look into that) Stephen C. Bond On Mar 31, 2009, jeff.hor...@vanderbilt.edu wrote: Try this: PKG_CPPFLAGS=-I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include-I/usr/lib/gtk-2.0/include -I/usr/local/include PKG_LIBS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib -lmysqlclient R CMD INSTALL RMySQL I had to refresh my memory from the inst/INSTALL file on how to do this. You might have to tweak it a bit, and also please send the full output of the command next time. Best, Jeff sten...@go.com wrote: I am trying to install RMySQL on OpenSolaris and need to pass some options to configure. Tried the 3 recommended ways of doing it and nothing works, configure cannot find the headers and the libs. I ran configure manually and that worked fine ./configure CC=cc CFLAGS=-dalign -KPIC -xlic_lib=sunperf LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --with-mysql-inc=/usr/mysql/include/mysql --with-mysql-lib=/usr/mysql/lib/mysql checking mysql.h usability... yes checking mysql.h presence... yes checking for mysql.h... yes configure: creating ./config.status config.status: creating src/Makevars but then there is no makefile. Pls advise how to run make manually or help with the syntax: I tried with quotes after the second = and the first = and neither worked RCMDINSTALL--configure-args=CC=cc --configure-args=CFLAGS=-dalign -KPIC -xlic_lib=sunperf --configure-args=LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib --configure-args=CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --configure-args=--with-mysql-inc=/usr/mysql/include/mysql --configure-args=--with-mysql-lib=/usr/mysql/lib/mysql RMySQL_0.7-3.tar.gz ## does not work Stephen C. Bond __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- http://biostat.mc.vanderbilt.edu/JeffreyHorner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] RMySQL compile
Jeff, it still cannot find mysql.h * Installing to library '/export/home/scb/R/i386-pc-solaris2.11-library/2.8' * Installing *source* package 'RMySQL' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for compress in -lz... yes checking for getopt_long in -lc... yes checking for mysql_init in -lmysqlclient... yes checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking mysql.h usability... no checking mysql.h presence... no checking for mysql.h... no configure: creating ./config.status config.status: creating src/Makevars is there a way to look at the makefile directly? Stephen C. Bond Mar 31, 2009 05:37:17 AM, jeff.hor...@vanderbilt.edu wrote: Try this: PKG_CPPFLAGS=-I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include-I/usr/lib/gtk-2.0/include -I/usr/local/include PKG_LIBS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib -lmysqlclient R CMD INSTALL RMySQL I had to refresh my memory from the inst/INSTALL file on how to do this. You might have to tweak it a bit, and also please send the full output of the command next time. Best, Jeff sten...@go.com wrote: I am trying to install RMySQL on OpenSolaris and need to pass some options to configure. Tried the 3 recommended ways of doing it and nothing works, configure cannot find the headers and the libs. I ran configure manually and that worked fine ./configure CC=cc CFLAGS=-dalign -KPIC -xlic_lib=sunperf LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --with-mysql-inc=/usr/mysql/include/mysql --with-mysql-lib=/usr/mysql/lib/mysql checking mysql.h usability... yes checking mysql.h presence... yes checking for mysql.h... yes configure: creating ./config.status config.status: creating src/Makevars but then there is no makefile. Pls advise how to run make manually or help with the syntax: I tried with quotes after the second = and the first = and neither worked RCMDINSTALL--configure-args=CC=cc --configure-args=CFLAGS=-dalign -KPIC -xlic_lib=sunperf --configure-args=LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib --configure-args=CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --configure-args=--with-mysql-inc=/usr/mysql/include/mysql --configure-args=--with-mysql-lib=/usr/mysql/lib/mysql RMySQL_0.7-3.tar.gz ## does not work Stephen C. Bond __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- http://biostat.mc.vanderbilt.edu/JeffreyHorner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] RMySQL compile
I am trying to install RMySQL on OpenSolaris and need to pass some options to configure. Tried the 3 recommended ways of doing it and nothing works, configure cannot find the headers and the libs. I ran configure manually and that worked fine ./configureCC=ccCFLAGS=-dalign-KPIC-xlic_lib=sunperf LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib CPPFLAGS=-I/usr/local/lib/R/include-I/usr/mysql/5.0/include/mysql -I/opt/csw/include-I/usr/sfw/include-I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --with-mysql-inc=/usr/mysql/include/mysql --with-mysql-lib=/usr/mysql/lib/mysql checking mysql.h usability... yes checking mysql.h presence... yes checking for mysql.h... yes configure: creating ./config.status config.status: creating src/Makevars but then there is no makefile. Pls advise how to run make manually or help with the syntax: I tried with quotes after the second = and the first = and neither worked R CMD INSTALL --configure-args=CC=cc --configure-args=CFLAGS=-dalign -KPIC -xlic_lib=sunperf --configure-args=LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib --configure-args=CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --configure-args=--with-mysql-inc=/usr/mysql/include/mysql --configure-args=--with-mysql-lib=/usr/mysql/lib/mysql RMySQL_0.7-3.tar.gz ## does not work Stephen C. Bond __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] unable to compile package
I am trying to install RMySQL on OpenSolaris and need to pass some options to configure. Tried the 3 recommended ways of doing it and nothing works, configure cannot find the headers and the libs. I ran configure manually and that worked fine ./configureCC=ccCFLAGS=-dalign-KPIC-xlic_lib=sunperf LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib CPPFLAGS=-I/usr/local/lib/R/include-I/usr/mysql/5.0/include/mysql -I/opt/csw/include-I/usr/sfw/include-I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --with-mysql-inc=/usr/mysql/include/mysql --with-mysql-lib=/usr/mysql/lib/mysql checking mysql.h usability... yes checking mysql.h presence... yes checking for mysql.h... yes configure: creating ./config.status config.status: creating src/Makevars but then there is no makefile. Pls advise how to run make manually or help with the syntax: I tried with quotes after the second = and the first = and neither worked R CMD INSTALL --configure-args=CC=cc --configure-args=CFLAGS=-dalign -KPIC -xlic_lib=sunperf --configure-args=LDFLAGS=-L/usr/sfw/lib -L/usr/lib -L/usr/local/lib -L/opt/csw/lib --configure-args=CPPFLAGS=-I/usr/local/lib/R/include -I/usr/mysql/5.0/include/mysql -I/opt/csw/include -I/usr/sfw/include -I/usr/X11/include -I/usr/lib/gtk-2.0/include -I/usr/local/include --configure-args=--with-mysql-inc=/usr/mysql/include/mysql --configure-args=--with-mysql-lib=/usr/mysql/lib/mysql RMySQL_0.7-3.tar.gz ## does not work Thank you Stephen C. Bond __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.