[R] Can someone please help me understand this? (Was Re: calling R's optimization routines from C)

2006-03-29 Thread Globe Trotter
Dear list, Can someone please help me here? Is it not possible to use the R library for optimization and other routines calling from C? Thank you!! AarEm Trotter --- Globe Trotter [EMAIL PROTECTED] wrote: Hi, I have read R's Writing Extensions manual and am still confused about how

[R] calling R's optimization routines from C

2006-03-28 Thread Globe Trotter
Hi, I have read R's Writing Extensions manual and am still confused about how to use some of the routines there when I call from C. Specifically, I am writing a little test function which I will optimize using the nmmin function which underlies R's optim() with Nelder-Mead. I guess I wonder what

[R] using R's optimization routines from C

2006-03-23 Thread Globe Trotter
Dear all, I have been trying to use R's optimization routines from C and I have some questions. Specifically, I am testing the usage of nmmin which performs Nelder-Mead optimization in order to learn how to do the above exercise. I understand from the notes in Chapter 5 that the declaration for

Re: [R] library file for R's nmath routines

2006-03-02 Thread Globe Trotter
, someone claiming to be `Globe Trotter' wrote: Hi, I am wondering where the library file for R's nmath routines are? Doing a search on libR gave me the following: /usr/lib/libRKC16.so.1.2.0 /usr/lib/libRKC.so.1.2.0 /usr/lib/R/lib/libRlapack.so /usr/lib/R/lib/libR.so /usr/lib/libRKC.so

Re: [R] library file for R's nmath routines

2006-03-02 Thread Globe Trotter
is to tell people how to go about learning. Many thanks for all your help! I have downloaded the libRmath RPM but (as you point out), it is not necessary. So, thank you again!! Best wishes. --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 2 Mar 2006, Globe Trotter wrote: Dear Profesor Ripley

[R] calling R's library using C

2006-03-02 Thread Globe Trotter
Hi, Thanks, everyone for all the help! So, here is my calling function in C (called test.c): #includestdio.h #includestdlib.h #includeRmath.h int main(void) { printf(%f \n,pchisq(2.,7., 1, 0)); printf(%f \n,pnchisq(2.,7.,0., 1, 0)); return EXIT_SUCCESS; } I

Re: [R] library file for R's nmath routines

2006-03-02 Thread Globe Trotter
Hi, Thanks! --- Jos� Matos [EMAIL PROTECTED] wrote: I guess that you intended to send this message to the list. :-) On 02/03/06, Globe Trotter [EMAIL PROTECTED] wrote: Hi, Thanks, everyone for all the help! So, here is my calling function in C (called test.c

[R] Fwd: Re: calling R's library using C

2006-03-02 Thread Globe Trotter
Sorry, forgot to switch the header to the R group --- Globe Trotter [EMAIL PROTECTED] wrote: Date: Thu, 2 Mar 2006 19:35:21 -0800 (PST) From: Globe Trotter [EMAIL PROTECTED] Subject: Re: [R] calling R's library using C To: Dirk Eddelbuettel [EMAIL PROTECTED] Hi, Dirk: Thanks

Re: [R] Fwd: Re: calling R's library using C

2006-03-02 Thread Globe Trotter
I'd do it now. Really. Not later. *Now*. Like the Posting Guide recommends. You may have heard of the sites www.r-project.org and cran.r-project.org. If you look closely, you will discover a link 'Manuals' on the left. You'd be surprised. All that you are griping about here is in Section

[R] library file for R's nmath routines

2006-03-01 Thread Globe Trotter
Hi, I am wondering where the library file for R's nmath routines are? Doing a search on libR gave me the following: /usr/lib/libRKC16.so.1.2.0 /usr/lib/libRKC.so.1.2.0 /usr/lib/R/lib/libRlapack.so /usr/lib/R/lib/libR.so /usr/lib/libRKC.so.1 /usr/lib/libRKC16.so.1 None of these have the

[R] callling R from C

2006-02-09 Thread Globe Trotter
Can anyone please provide me with a simple example on calling R from C? Many thanks and best wishes! GT __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] OT: code for non-central t-density/cdf

2006-01-30 Thread Globe Trotter
Hi, This is not an R question, but can anyone please point me to C/Fortran (C preferred) code which calculates the non-central t-density or the cdf? Many thanks and best wishes! GT __ R-help@stat.math.ethz.ch mailing list

[R] OT: algorithm for generating all possible combinations with replacement

2005-11-24 Thread Globe Trotter
Dear all, I have n objects and I want to select k of these with replacement. Do you know of code which would generate all the possible arrangements? Note that this is different from the selection of k of n objects without replacement and wanting to generate all the possible permutations. Any

[R] OT: on the DFT of a periodic Gaussian kernel (analytic representation?)

2005-11-08 Thread Globe Trotter
Hi, I have a one-dimensional N-coordinate periodic Gaussian kernel defined by dnorm(c(0:N/2,(N/2-1):1),sd = h) where h is the bandwidth/smoothing parameter/FWHM. I want to calculate the Fourier transform of this, which can be done using a FFT. But my question is: is it possible to get the

[R] trouble installing AnalyzeFMRI package: please help

2005-10-07 Thread Globe Trotter
Hi, Tried to install AnalyzeFMRI on Linux (FC-4) and got the following: install.packages(AnalyzeFMRI) trying URL 'http://rh-mirror.linux.iastate.edu/CRAN/src/contrib/AnalyzeFMRI_1.1-4.tar.gz' Content type 'application/x-gzip' length 308066 bytes opened URL

Re: [R] trouble installing AnalyzeFMRI package: please help

2005-10-07 Thread Globe Trotter
process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Globe Trotter Sent: Friday, October 07, 2005 3:52 PM To: r-help@stat.math.ethz.ch Subject: [R] trouble installing AnalyzeFMRI package: please help Hi

[R] eigen-decomposition of symmetric BCCB matrices

2005-08-31 Thread Globe Trotter
Hi, Can anyone please point to how to decompose BCCB (Block-Circulant-Circulant-Block) matrices? I am interested in the derivations: I do know that this can be numerically done using 2-dimensional FFTs. Many thanks and best wishes! __

[R] code for gap statistic

2005-08-05 Thread Globe Trotter
Hi, Can anyone point me to code for the gap statistic? Many thanks and best wishes! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] use of color for hclust

2005-08-05 Thread Globe Trotter
Hi, I have a grouping of some observations. I want to cluster them using hierarchical clustering and compare how the hierarchical clustering shows up vis-a-vis the groupings. Is it possible to do this in color? I guess what I am looking for is a way to color the labels of a hierarchical

RE: Fwd: Re: [R] eigenvalues of a circulant matrix

2005-05-03 Thread Globe Trotter
Thanks for looking into this! Sure, I will try and provide more info, but sorry I seem to be doing really badly with posting Having cutpasted from the data placed in the body of the message (omitted here) I get 216 numbers. Having put these in a vector x (in my own way): length(x)

RE: Fwd: Re: [R] eigenvalues of a circulant matrix

2005-05-03 Thread Globe Trotter
--- Prof Brian Ripley [EMAIL PROTECTED] wrote: I think we need to make clear that eigen() by default relies on LAPACK routines and they in turn rely on BLAS routines. We have seen several instances in which LAPACK/BLAS return NaNs when they should not, but all that I am aware of are when

Re: [R] eigenvalues of a circulant matrix

2005-05-03 Thread Globe Trotter
Of Globe Trotter Sent: Tuesday, 3 May 2005 10:51 AM To: r-help@stat.math.ethz.ch Subject: Re: [R] eigenvalues of a circulant matrix OK, here we go: I am submitting two attachments. The first is the datafile called kinv used to create my circulant matrix, using the following

RE: [R] eigenvalues of a circulant matrix

2005-05-03 Thread Globe Trotter
--- Huntsinger, Reid [EMAIL PROTECTED] wrote: Under Linux run ldd on the binary to see what shared libraries the binary has been linked against and will attempt to load. The command you run is a shell script which sets and exports LD_LIBRARY_PATH and then runs R, so to be sure first start R

Re: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
Dear Professor Ripley: Lets do this professionally, shall we? --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 1 May 2005, someone who didn't give his name wrote: It is my understanding that the eigenvectors of a circulant matrix are given as follows:

Re: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
OK, lets redo this again, and ensure that we start with a row that will indeed lead to a symmetric matrix for the circulant matrix: x-scan(kinv) y-x[c(109:1,2:108)] X=toeplitz(y) Z=y for (i in 2:216) Z=rbind(Z,y[c((216-i+2):216,1:(216-i+1))]) range(X-Z) [1] 0 0 eigen(X) is the same as

Re: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
--- Rolf Turner [EMAIL PROTECTED] wrote: I just Googled around a bit and found definitions of Toeplitz and circulant matrices as follows: A Toeplitz matrix is any n x n matrix with values constant along each (top-left to lower-right) diagonal. matrix has the form a_0 a_1 . . .

RE: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
to the entries in v. This is the finite Fourier transform of v, by the way, and takes real values when the coefficients are real and symmetric, ie when the matrix is symmetric. Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Globe

RE: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
, May 02, 2005 10:43 AM To: 'Globe Trotter'; Rolf Turner Cc: r-help@stat.math.ethz.ch Subject: RE: [R] eigenvalues of a circulant matrix It's hard to argue against the fact that a real symmetric matrix has real eigenvalues. The eigenvalues of the circulant matrix with first row v

RE: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
The example that I submitted earlier in the day. Would you like me to send again? Thanks! --- Huntsinger, Reid [EMAIL PROTECTED] wrote: For which X? Reid Huntsinger -Original Message- From: Globe Trotter [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 2:34 PM

Re: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
OK, here we go: I am submitting two attachments. The first is the datafile called kinv used to create my circulant matrix, using the following commands: x-scan(kinv) y-x[c(109:1,0:108)] X=toeplitz(y) eigen(X) write(X,ncol=216,file=test.dat) reports the following columns full of NaN's: 18, 58,

Fwd: Re: [R] eigenvalues of a circulant matrix

2005-05-02 Thread Globe Trotter
-03 -2.24634E-03 -1.16863E-03 -2.24284E-03 Thanks! --- Globe Trotter [EMAIL PROTECTED] wrote: Date: Mon, 2 May 2005 19:51:24 -0700 (PDT) From: Globe Trotter [EMAIL PROTECTED] Subject: Re: [R] eigenvalues of a circulant matrix To: r-help@stat.math.ethz.ch OK, here we go: I am

[R] eigenvalues of a circulant matrix

2005-05-01 Thread Globe Trotter
Hi, It is my understanding that the eigenvectors of a circulant matrix are given as follows: 1,omega,omega^2,,omega^{p-1} where the matrix has dimension given by p x p and omega is one of p complex roots of unity. (See Bellman for an excellent discussion on this). The matrix created by