Re: [Rd] Matrix 1.6.2+ versus Matrix 1.6.2-

2023-11-22 Thread Balasubramanian Narasimhan
Thanks Mikael. [I too wondered if this topic was appropriate for the list and in the end thought it might be. We can probably take this offline after this exchange and summarize if appropriate.] The actual source of the package is here: https://download.mosek.com/R/10.1/src/contrib/Rmosek_10

Re: [Rd] Matrix 1.6.2+ versus Matrix 1.6.2-

2023-11-22 Thread Mikael Jagan
Naras, Thanks. I'm a bit confused, because Rmosek does not declare Matrix as a dependency: > tools::package_dependencies("Rmosek", which = "all")[[1L]] [1] "pkgbuild" nor does it contain code needing compilation: > packageDescription("Rmosek", fields="NeedsCompilation") [1] "n

[Rd] Matrix 1.6.2+ versus Matrix 1.6.2-

2023-11-22 Thread Balasubramanian Narasimhan
Package Rmosek compiles fine using Matrix versions 1.6.2- but not with anything beyond Matrix 1.6.2.  (FYI, Rmosek provides R interfaces to the excellent MOSEK solver; academic licenses are free.) Here is the error message: rmsk_obj_matrices.cc:50:9: error: use of undeclared identifier 'Ma

Re: [Rd] Matrix issues when building R with znver3 architecture under GCC 11

2022-04-13 Thread Kieran Short
Hi Tomas, Many thanks for your thorough response, it is very much appreciated and what you say makes perfect sense to me. I was relying on the in-built R compilation checks, I have been working on the assumption that everything on the R side is correct (including the matrix package). Indeed, R 4

Re: [Rd] Matrix issues when building R with znver3 architecture under GCC 11

2022-04-12 Thread Kieran Short
Hi Henrik, It produces the same result. Regards, Kieran On Tue, 12 Apr 2022, 23:13 Henrik Bengtsson, wrote: > Shooting from the hip: What happens if you compile with -O2 instead of -O3? > > Henrik > > On Mon, Apr 11, 2022, 18:27 Kieran Short wrote: > >> Hello, >> >> I'm new to this list, and

Re: [Rd] Matrix package breaks as.matrix method

2017-01-30 Thread Robert McGehee
ing up and importing only stuff that you need. Best regards, Georgi Boshnakov -- Message: 15 Date: Fri, 27 Jan 2017 22:41:10 + From: Robert McGehee To: "r-devel@r-project.org" Subject: [Rd] Matrix package breaks as.matrix method Message-ID: &l

[Rd] Matrix package breaks as.matrix method

2017-01-27 Thread Robert McGehee
Hi, The Matrix package and the as.matrix method do not seem to be compatible inside of a package. Here's an example. I've created a simple package "mat" that defines an eponymous class and as.matrix method on that class. All is well, unless that package has the Matrix package in its Depends or

[Rd] Matrix loading hangs on AIX 5.3 with 3.1.2

2015-06-03 Thread derjones
Hi all, Yes, I know 5.3 is old, but it's a system I have to work with at present. I have the latest supported xlC + friends. gcc building is not an option on this system for other reasons. I have read the install instructions and set the env vars according to those and also am using the freeware

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Prof Brian Ripley
On 06/12/2013 15:51, Luis Carvalho wrote: And to be safer on a 64-bit platform #define INDEX(i,j) ((i) + rows*(R_xlen_t)(j)) since rows*j might overflow there. Shouldn't 'rows' be also a parameter? This is a macro, not a function. 'rows' (I would have use nr or nrows) is going to be the s

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Luis Carvalho
> And to be safer on a 64-bit platform > > #define INDEX(i,j) ((i) + rows*(R_xlen_t)(j)) > > since rows*j might overflow there. Shouldn't 'rows' be also a parameter? #define INDEX(rows,i,j) ((i) + (rows)*((R_xlen_t)(j))) Cheers, Luis -- Computers are useless. They can only give you answers.

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Prof Brian Ripley
On 06/12/2013 15:49, Gábor Csárdi wrote: On Fri, Dec 6, 2013 at 10:42 AM, Prof Brian Ripley wrote: On 06/12/2013 14:42, Gábor Csárdi wrote: On Fri, Dec 6, 2013 at 9:38 AM, Duncan Murdoch wrote: On 06/12/2013 8:21 AM, Larissa Hauer wrote: [...] I would not assume that a 2D matrix in C

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Luis Carvalho
Hi Larissa, > I'm trying to pass a matrix from R to C, where some computation is > done for performance reasons, and back to R for evaluation. But I've > run into the problem that R and C seem to have different ways of > representing the matrix in main memory. The C representation of a 2D > matrix

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Gábor Csárdi
On Fri, Dec 6, 2013 at 10:42 AM, Prof Brian Ripley wrote: > On 06/12/2013 14:42, Gábor Csárdi wrote: >> >> On Fri, Dec 6, 2013 at 9:38 AM, Duncan Murdoch >> wrote: >>> >>> On 06/12/2013 8:21 AM, Larissa Hauer wrote: >> >> [...] >>> >>> >>> >>> I would not assume that a 2D matrix in C doesn't have

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Prof Brian Ripley
On 06/12/2013 14:42, Gábor Csárdi wrote: On Fri, Dec 6, 2013 at 9:38 AM, Duncan Murdoch wrote: On 06/12/2013 8:21 AM, Larissa Hauer wrote: [...] I would not assume that a 2D matrix in C doesn't have gaps in it between the rows. Let C treat it as a vector, and write a little macro that does

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Gábor Csárdi
On Fri, Dec 6, 2013 at 9:38 AM, Duncan Murdoch wrote: > On 06/12/2013 8:21 AM, Larissa Hauer wrote: [...] > > > I would not assume that a 2D matrix in C doesn't have gaps in it between the > rows. Let C treat it as a vector, and write a little macro that does the > indexing. For example, > > #de

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Duncan Murdoch
On 06/12/2013 8:21 AM, Larissa Hauer wrote: Hi everybody, I'm trying to pass a matrix from R to C, where some computation is done for performance reasons, and back to R for evaluation. But I've run into the problem that R and C seem to have different ways of representing the matrix in main memor

Re: [Rd] Matrix memory layout R vs. C

2013-12-06 Thread Lorenz, David
Larissa, So is the problem "in the matrix reference is mat[col][row] whereas in R it is mar[row, col]?" The solution is just recognizing the difference in references. Dave On Fri, Dec 6, 2013 at 7:21 AM, Larissa Hauer wrote: > > Hi everybody, > > I'm trying to pass a matrix from R to C, wher

[Rd] Matrix memory layout R vs. C

2013-12-06 Thread Larissa Hauer
Hi everybody, I'm trying to pass a matrix from R to C, where some computation is done for performance reasons, and back to R for evaluation. But I've run into the problem that R and C seem to have different ways of representing the matrix in main memory. The C representation of a 2D matrix in

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Simon Urbanek
On Feb 15, 2013, at 6:13 PM, Hin-Tak Leung wrote: > FWIW, extracting snapshot source elsewhere outside svn, run > "tools/rsync-recommended" then just plain "./configure && make" doesn't work > either. Nothing to do with building inside checkout nor extra configure > options. > Can you define

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Hadley Wickham
> Although it goes a long way, it doesn't always work -- it assumes that the > directory structure did not change in the project between the revisions - > distclean may not clean things that have changed since you updated the SVN > (note that to address that you should run distclean *before* the

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Simon Urbanek
On Feb 16, 2013, at 8:03 AM, Roger Bivand wrote: > Hin-Tak Leung users.sourceforge.net> writes: > >> >> --- On Fri, 15/2/13, Simon Urbanek r-project.org> wrote: >> >>> On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: >>> Look. I don't see this as "my" problem - as far as I am >>> conc

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Roger Bivand
Hin-Tak Leung users.sourceforge.net> writes: > > --- On Fri, 15/2/13, Simon Urbanek r-project.org> wrote: > > > On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: > > > > > Look. I don't see this as "my" problem - as far as I am > > concerned, I have donated my time - and over and over - to >

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Joshua Ulrich
On Fri, Feb 15, 2013 at 12:19 PM, Kasper Daniel Hansen wrote: > I build from svn daily and I have not had this problem. I build in a > tree separate from the source tree. > > I do think Hin-Tak has a point about clearly specifying that this is > how you should do it, in the manual (if that has no

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Kasper Daniel Hansen
On Fri, Feb 15, 2013 at 1:25 PM, Joshua Ulrich wrote: > On Fri, Feb 15, 2013 at 12:19 PM, Kasper Daniel Hansen > wrote: >> I build from svn daily and I have not had this problem. I build in a >> tree separate from the source tree. >> >> I do think Hin-Tak has a point about clearly specifying tha

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Hin-Tak Leung
FWIW, extracting snapshot source elsewhere outside svn, run "tools/rsync-recommended" then just plain "./configure && make" doesn't work either. Nothing to do with building inside checkout nor extra configure options. This is fedora 18, x86_64. --- On Fri, 15/2/13, Hin-Tak Leung wrote: > Some

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Hin-Tak Leung
--- On Fri, 15/2/13, Simon Urbanek wrote: > On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: > > > Look. I don't see this as "my" problem - as far as I am > concerned, I have donated my time - and over and over - to > testing pre-released code. I am not using pre-released code > for production

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Simon Urbanek
On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: > Look. I don't see this as "my" problem - as far as I am concerned, I have > donated my time - and over and over - to testing pre-released code. I am not > using pre-released code for production work. If the released code in 3.0 does > not wor

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Hin-Tak Leung
Look. I don't see this as "my" problem - as far as I am concerned, I have donated my time - and over and over - to testing pre-released code. I am not using pre-released code for production work. If the released code in 3.0 does not work correctly in 6 weeks' time, I just don't upgrade. No loss

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Kasper Daniel Hansen
I build from svn daily and I have not had this problem. I build in a tree separate from the source tree. I do think Hin-Tak has a point about clearly specifying that this is how you should do it, in the manual (if that has not already happened). As a casual user, I would expect make clean to cle

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Simon Urbanek
On Feb 15, 2013, at 11:36 AM, Hin-Tak Leung wrote: > --- On Fri, 15/2/13, Simon Urbanek wrote: > >> On Feb 15, 2013, at 9:11 AM, Hin-Tak >> Leung wrote: >> >>> Somebody else had written separately about this before, >> and so have I a couple of months ago. I assumed this will be >> fixed before

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Hin-Tak Leung
--- On Fri, 15/2/13, Simon Urbanek wrote: > On Feb 15, 2013, at 9:11 AM, Hin-Tak > Leung wrote: > > > Somebody else had written separately about this before, > and so have I a couple of months ago. I assumed this will be > fixed before the next R. Since R 3.0 is supposedly only 6 > weeks away, e

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Simon Urbanek
On Feb 15, 2013, at 9:11 AM, Hin-Tak Leung wrote: > Somebody else had written separately about this before, and so have I a > couple of months ago. I assumed this will be fixed before the next R. Since R > 3.0 is supposedly only 6 weeks away, even if it is fixed now it doesn't leave > much room

[Rd] Matrix does not build with R trunk since Oct.

2013-02-15 Thread Hin-Tak Leung
Somebody else had written separately about this before, and so have I a couple of months ago. I assumed this will be fixed before the next R. Since R 3.0 is supposedly only 6 weeks away, even if it is fixed now it doesn't leave much room for testing. Anyway neither Matrix 1.0-11 (current) nor

Re: [Rd] matrix bands

2011-08-26 Thread Martin Maechler
> Jeremy David Silver > on Fri, 26 Aug 2011 15:08:03 +0200 writes: > Thanks for the suggestion, Martin! I looked at both > Matrix::band and Matrix::bandSparse. Maybe I misunderstand the > help pages and the examples, but from what I can see neither of > them provides

Re: [Rd] matrix bands

2011-08-26 Thread Jeremy David Silver
Thanks for the suggestion, Martin! I looked at both Matrix::band and Matrix::bandSparse. Maybe I misunderstand the help pages and the examples, but from what I can see neither of them provides the functionality I was looking for. For the getter version of the function I was looking for, I can

Re: [Rd] matrix bands

2011-08-26 Thread Martin Maechler
> Jeremy David Silver > on Fri, 26 Aug 2011 13:23:43 +0200 writes: > Dear R developers, I was looking for a function analogous > to base::diag() for getting and setting bands of a > matrix. The closest I could find was Matrix::band(), but > this was not exactly what I

[Rd] matrix bands

2011-08-26 Thread Jeremy David Silver
Dear R developers, I was looking for a function analogous to base::diag() for getting and setting bands of a matrix. The closest I could find was Matrix::band(), but this was not exactly what I wanted for two reasons. Firstly, Matrix::band() returns a matrix rather than just the specified band

Re: [Rd] matrix multiplication speed R

2011-05-10 Thread aftar
Hi Can we use BLAS in R X64 for windows? Regards Aftar -- View this message in context: http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3509596.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.

Re: [Rd] matrix multiplication speed R

2011-05-10 Thread Prof Brian Ripley
On Mon, 9 May 2011, Sharpie wrote: aftar wrote: Hi Can we use BLAS in R X64 for windows? Regards Aftar You are already using BLAS in R as R includes its own BLAS library. On Windows the 64-bit DLL is located at R_HOME\bin\x64\Rblas.dll. If you are asking about swapping that out for an o

Re: [Rd] matrix multiplication speed R

2011-05-09 Thread Sharpie
aftar wrote: > > Hi > > Can we use BLAS in R X64 for windows? > > Regards > Aftar > You are already using BLAS in R as R includes its own BLAS library. On Windows the 64-bit DLL is located at R_HOME\bin\x64\Rblas.dll. If you are asking about swapping that out for an optimized BLAS, you will

Re: [Rd] matrix not positive definite (while it should be)

2011-05-06 Thread Arthur Charpentier
sorry, my mistake... since I build up a correlation matrix, I forgot the fact that the diagonal should be one NR=2 CORRELATION=matrix(c(0.4,-0.25, -0.25,0.3),NR,NR) REGION=sample(1:NR,size=n,replace=TRUE) SIGMA=CORRELATION[REGION,REGION] diag(SIGMA)=1 > min(eigen(SIGMA)$val

Re: [Rd] matrix not positive definite (while it should be)

2011-05-06 Thread Arthur Charpentier
thanks for the tip actually, I know that the covariance matrix has rank 2, but it should still be definite positive (not strictly positive, but positive) my problem is that Cholesky needs a positive matrix... my concern is that I have > min(eigen(SIGMA)$values) [1] -2.109071e-17 while theoretically

Re: [Rd] matrix not positive definite (while it should be)

2011-05-06 Thread Petr Savicky
On Thu, May 05, 2011 at 02:31:59PM -0400, Arthur Charpentier wrote: > I do have some trouble with matrices. I want to build up a covariance matrix > with a hierarchical structure). For instance, in dimension n=10, I have two > subgroups (called REGION). > > NR=2; n=10 > CORRELATION=matrix(c(0.4,-0

[Rd] matrix not positive definite (while it should be)

2011-05-05 Thread Arthur Charpentier
I do have some trouble with matrices. I want to build up a covariance matrix with a hierarchical structure). For instance, in dimension n=10, I have two subgroups (called REGION). NR=2; n=10 CORRELATION=matrix(c(0.4,-0.25, -0.25,0.3),NR,NR) REGION=sample(1:NR,size=n,replace=TR

Re: [Rd] matrix multiplication speed R

2011-01-14 Thread oyvfos
Thanks very much, Uwe. The calculation time is now comparable with matlab. Oyvind -- View this message in context: http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3217539.html Sent from the R devel mailing list archive at Nabble.com. ___

Re: [Rd] matrix multiplication speed R

2011-01-14 Thread Uwe Ligges
On 14.01.2011 11:38, Joris Meys wrote: Please give the code you used for the matrix multiplication. 5 times is a bit much. No, it is reasonable for matrix multiplication: Matlab ships with optimized BLAS for various CPU types. In R, you have to get an optimized BLAS yourself. How to link

Re: [Rd] matrix multiplication speed R

2011-01-14 Thread Joris Meys
Please give the code you used for the matrix multiplication. 5 times is a bit much. On Fri, Jan 14, 2011 at 9:09 AM, oyvfos wrote: > > Hi, > A quick bench-mark of an R matrix muliplication 500by500 X 500by1, all > random variates, with matlab reveals a huge difference in speed (5 times at >

[Rd] matrix multiplication speed R

2011-01-14 Thread oyvfos
Hi, A quick bench-mark of an R matrix muliplication 500by500 X 500by1, all random variates, with matlab reveals a huge difference in speed (5 times at least). Is there anything that can be done in R to speed up the multiplication? Kind regards, Oyvind -- View this message in context: http:/

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Prof Brian Ripley
On Fri, 17 Sep 2010, Thomas Petzoldt wrote: On 17.09.2010 20:04, Prof Brian Ripley wrote: I'm not sure why end users would be using R-devel rather than R-alpha at this point, but I have already changed R-devel to allow Matrix to get updated before it fails. Yes I realized the update and succe

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Thomas Petzoldt
On 17.09.2010 20:04, Prof Brian Ripley wrote: I'm not sure why end users would be using R-devel rather than R-alpha at this point, but I have already changed R-devel to allow Matrix to get updated before it fails. Yes I realized the update and successfully recompiled it. Many thanks. "End user

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Prof Brian Ripley
I'm not sure why end users would be using R-devel rather than R-alpha at this point, but I have already changed R-devel to allow Matrix to get updated before it fails. Warning: R-devel tends to be particularly unstable during the period when we are in alpha/beta/RC phases. On Sat, 18 Sep 201

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Thomas Petzoldt
On 17.09.2010 19:22, Uwe Ligges wrote: On 17.09.2010 16:04, Thomas Petzoldt wrote: Dear R-Devel, I've just tried to compile the fresh R-devel and found that the install of package Matrix failed: - ** help *** installing help indices ** building pac

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Uwe Ligges
On 17.09.2010 19:54, Berwin A Turlach wrote: G'day Uwe, On Fri, 17 Sep 2010 19:22:04 +0200 Uwe Ligges wrote: On 17.09.2010 16:04, Thomas Petzoldt wrote: Dear R-Devel, I've just tried to compile the fresh R-devel and found that the install of package Matrix failed: -

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Berwin A Turlach
G'day Uwe, On Fri, 17 Sep 2010 19:22:04 +0200 Uwe Ligges wrote: > > > On 17.09.2010 16:04, Thomas Petzoldt wrote: > > Dear R-Devel, > > > > I've just tried to compile the fresh R-devel and found that the > > install of package Matrix failed: > > > >

Re: [Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Uwe Ligges
On 17.09.2010 16:04, Thomas Petzoldt wrote: Dear R-Devel, I've just tried to compile the fresh R-devel and found that the install of package Matrix failed: - ** help *** installing help indices ** building package indices ... Error in require(Matrix

[Rd] Matrix install fails because of defunct save in require

2010-09-17 Thread Thomas Petzoldt
Dear R-Devel, I've just tried to compile the fresh R-devel and found that the install of package Matrix failed: - ** help *** installing help indices ** building package indices ... Error in require(Matrix, save = FALSE) : unused argument(s) (save

Re: [Rd] matrix algebra in c

2009-07-22 Thread Markus Jochmann
> 1. use F77_CALL() to call matrix multiplication functions from blas. > This should be ok as long as I remember that c and FORTRAN store > matrices differently. Concerning 1. you might want to look at some C++ wrapper for BLAS and Lapack like http://flens.sourceforge.net, this makes things easie

[Rd] matrix algebra in c

2009-07-14 Thread Richard D. Morey
I'd like to use some matrix algebra in my c code that is called from R. I need matrix multiplication, transposition, and Cholesky decomposition. I haven't come across any easy way to do this, but from browsing the web and R-devel a few options come to mind: 1. use F77_CALL() to call matrix multipl

Re: [Rd] Matrix with random number

2009-07-03 Thread Fabio Mathias
Thanks very much! Fábio Mathias Corrêa   UFLA --- Em qua, 1/7/09, Kjell Konis escreveu: De: Kjell Konis Assunto: Re: [Rd] Matrix with random number Para: "Fabio Mathias" Cc: r-devel@r-project.org Data: Quarta-feira, 1 de Julho de 2009, 8:30 Hi Fa

Re: [Rd] Matrix with random number

2009-07-01 Thread Kjell Konis
Hi Fabio, Your function myrbeta returns void so assigning the output isn't going to work. Instead you need to call it like a FORTRAN subroutine. Also, I added arguments for the parameters of the beta and moved the fseedi and fseedo calls outside of the loop. This is a pretty basic FORTR

[Rd] Matrix with random numbers

2009-07-01 Thread Fábio Corrêa
Hello! I have a program in Fortran and would like to build a matrix with random numbers, I have a function in C. However, I have problems with the use of function in R. Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so Code in C. #include #include void F77_SUB(fseedi)(void){ GetRNGst

Re: [Rd] Matrix with random number

2009-06-30 Thread Fabio Mathias
Thanks Mr. Barry Rowlingson However, the matrix appears to zeros! Notice the code below! Please! Code in fortran     subroutine mat(x,l,c,a)     integer l,c     double precision x(l,c), a     integer i,j      do j = 1, c        do i = 1, l         call fseedi()     x(i,j) = myrbeta(a,1,2

Re: [Rd] Matrix with random number

2009-06-30 Thread Barry Rowlingson
>     x(i,j) = call myrbeta(1,4,5) ! It's correct? > The code of the error in R is: > dyn.load("func.so") > Error in dyn.load("func.so") : >   unable to load shared library > '/home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so': >   /home/julio/Orientados/Fabio/Fortran/mat-fortran/func

[Rd] Matrix with random number

2009-06-30 Thread Fabio Mathias
Hello! I have a program in Fortran and would like to build a matrix with random numbers, I have a function in C. However, I have problems with the use of function in R. Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so Code in C. #include #include void F77_SUB(fseedi)(void){  

[Rd] Matrix with random number

2009-06-30 Thread Fabio Mathias
Hello! I have a program in Fortran and would like to build a matrix with random numbers, I have a function in C. However, I have problems with the use of function in R. Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so Code in C. #include #include void F77_SUB(fseedi)(void){  

[Rd] Matrix vignette error in June 24 RC

2009-06-24 Thread Paul Gilbert
I am getting the following problem with make check-all on the June 24 rc. I realize I could probably fix it by installing/setting a path to the sty file, but I don't remember having to do that for make check-all in the past. Paul Gilbert ___ checking package 'Matrix' * checking fo

Re: [Rd] Matrix dimnames crash (PR#13361)

2008-12-03 Thread Prof Brian Ripley
D] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent: Wednesday, December 03, 2008 9:14 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [Rd] Matrix dimnames crash (PR#13361) On Wed, 3 Dec 2008, [EMAIL PROTECTED] wrote: In Windows XP, the matrix() f

Re: [Rd] Matrix dimnames crash (PR#13361)

2008-12-03 Thread William Dunlap
) is fine: this change to array.c:do_matrix just avoids the call. Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley > Sent: Wednesday, Decembe

Re: [Rd] Matrix dimnames crash (PR#13361)

2008-12-03 Thread Prof Brian Ripley
On Wed, 3 Dec 2008, [EMAIL PROTECTED] wrote: In Windows XP, the matrix() function crashes the program when 'dimnames' is an empty list: matrix(1:4, nrow=2, dimnames=list()) # R has encountered a problem and needs to close ... This bug is specific to WinXP, as Linux64 handles this situation

[Rd] Matrix dimnames crash (PR#13361)

2008-12-03 Thread arnima
In Windows XP, the matrix() function crashes the program when 'dimnames' is an empty list: matrix(1:4, nrow=2, dimnames=list()) # R has encountered a problem and needs to close ... This bug is specific to WinXP, as Linux64 handles this situation more gracefully: matrix(1:4, nrow=2, di

Re: [Rd] matrix name

2008-08-09 Thread mel
Martin Maechler a écrit : Well, dimnames can be named : Thanks Martin and Gabor for the trick. And apologies for not thinking on it. Thanks Vincent __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] matrix name

2008-08-09 Thread Martin Maechler
> Vincent Nijs <[EMAIL PROTECTED]> > on Sat, 09 Aug 2008 18:34:09 +0200 writes: >>> Hello, >>> Presently, we are able to add additionnal info to a matrix >>> thanks to the nice comment() and attr() functions. >>> Maybe I miss some other functions ? >>> Since there

Re: [Rd] matrix name

2008-08-09 Thread Gabor Grothendieck
Try this: > matrix(1:9, 3, dim = list(x = letters[1:3], y = LETTERS[1:3])) y x A B C a 1 4 7 b 2 5 8 c 3 6 9 On Sat, Aug 9, 2008 at 12:34 PM, mel <[EMAIL PROTECTED]> wrote: > Hello, > > Presently, we are able to add additionnal info to a matrix > thanks to the nice comment() and attr(

[Rd] matrix name

2008-08-09 Thread mel
Hello, Presently, we are able to add additionnal info to a matrix thanks to the nice comment() and attr() functions. Maybe I miss some other functions ? Since there is a always a little remaining place on the top left when one print a matrix, I was wondering if it won't be interesting to offer t

Re: [Rd] matrix

2008-04-16 Thread Martin Maechler
> "YJ" == Yuan Jian <[EMAIL PROTECTED]> > on Wed, 16 Apr 2008 18:42:53 -0700 (PDT) writes: YJ> thanks, YJ> can I ask another basic question? yes, but *NOT* on R-devel. PLEASE! There seems to be a recent tendency to misuse R-devel for things that *REALLY* *ONLY* belong to

Re: [Rd] matrix

2008-04-16 Thread Yuan Jian
thanks, can I ask another basic question? I have a matrix (1 X 6). 1 rows and 6 columns. I want to remove rows that have sd(col1, col2,col3) <1 or sd(col4,col5,col6) <1. what is the simple way? Yu Duncan Murdoch <[EMAIL PROTECTED]> wrote: On 16/04/2008 7:33 PM, Yuan

Re: [Rd] matrix

2008-04-16 Thread Duncan Murdoch
On 16/04/2008 7:33 PM, Yuan Jian wrote: > Hello, > I have a matrix, I want to change value to 0 when a element in the matrix > has less than 10. > do you know how to do it without using loops? A[A < 10] <- 0 Remember that matrices are just vectors with dimensions, so you can index one like

[Rd] matrix

2008-04-16 Thread Yuan Jian
Hello, I have a matrix, I want to change value to 0 when a element in the matrix has less than 10. do you know how to do it without using loops? - [[alternative HTML version deleted]] __

Re: [Rd] Matrix multiplication in a C code

2008-04-13 Thread Mathieu Ribatet
First, sorry for the delayed reply. You were right matprod will do exactly what I want. Thanks. On another point, are you aware about a BLAS routine to test for semi-definite positive matrix ? This is required for my loglikelihood and thus should return -\infty if not. Best, Mathieu Prof Bri

Re: [Rd] Matrix multiplication in a C code

2008-04-07 Thread mel
Mathieu Ribatet a écrit : > Dear list members, > > I've got a small question on matrix multiplications in a C code. Because > of a really cpu demanding likelihood, I had to use a C code within an R > function wrapper. I'm pretty sure that there is already one good code > for matrix multipli

Re: [Rd] Matrix multiplication in a C code

2008-04-06 Thread Prof Brian Ripley
On Sun, 6 Apr 2008, Mathieu Ribatet wrote: >Dear list members, > > I've got a small question on matrix multiplications in a C code. Because > of a really cpu demanding likelihood, I had to use a C code within an R > function wrapper. I'm pretty sure that there is already one good code > for ma

[Rd] Matrix multiplication in a C code

2008-04-06 Thread Mathieu Ribatet
Dear list members, I've got a small question on matrix multiplications in a C code. Because of a really cpu demanding likelihood, I had to use a C code within an R function wrapper. I'm pretty sure that there is already one good code for matrix multiplication in C - maybe in the R source co

[Rd] Matrix exponential in R

2007-11-17 Thread Vincent Goulet
Dear developeRs, The topic has been raised quite a few times in r-devel and r-help before: calculation of matrix exponentials in R. We needed it in the actuar package at the C level and ended up cooking up our own solution based on expm() of package Matrix (which is itself based on Octave's)

Re: [Rd] Matrix package: compilation error

2007-04-02 Thread Hin-Tak Leung
Rainer Hurling wrote: > Thank you Hin-Tak Leung, > > on Saturday, 31th, Brian Ripley and Martin Maechler showed me the use of > gmake without linking make against gmake: > > setenv MAKE gmake > R CMD INSTALL Matrix_0.9975-11.tar.gz > unsetenv MAKE > R CMD INSTALL spdep_0.4-2.tar.gz > >

Re: [Rd] Matrix package: compilation error

2007-04-02 Thread Rainer Hurling
Thank you Hin-Tak Leung, on Saturday, 31th, Brian Ripley and Martin Maechler showed me the use of gmake without linking make against gmake: setenv MAKE gmake R CMD INSTALL Matrix_0.9975-11.tar.gz unsetenv MAKE R CMD INSTALL spdep_0.4-2.tar.gz Everything works fine now. However, on m

Re: [Rd] Matrix package: compilation error

2007-04-02 Thread Hin-Tak Leung
Rainer Hurling wrote: > Thanks, Brian and Martin, > > I think you are both right, Matrix tries to use BSD make (/usr/bin/make) > on FreeBSD instead of GNU make (/usr/local/bin/gmake). > > Sorry, but I don't know how to persuade the configure script to use > gmake :-( easy - mkdir ~/mynewbin l

Re: [Rd] Matrix package: compilation error

2007-03-31 Thread Rainer Hurling
Thank you Andrew, 'setenv MAKE gmake' did it. Now I can use latest spdep package :-) Rainer Andrew Robinson schrieb: > Hi Rainer, > > check the following post for an alternative solution: > > http://tolstoy.newcastle.edu.au/R/help/06/01/18908.html > > if you would like more detailed instruc

Re: [Rd] Matrix package: compilation error

2007-03-31 Thread Andrew Robinson
Hi Rainer, check the following post for an alternative solution: http://tolstoy.newcastle.edu.au/R/help/06/01/18908.html if you would like more detailed instructions, let me know. Andrew On Sat, Mar 31, 2007 at 10:10:45PM +0200, Rainer Hurling wrote: > Thanks, Brian and Martin, > > I think y

Re: [Rd] Matrix package: compilation error

2007-03-31 Thread Rainer Hurling
Thanks, Brian and Martin, I think you are both right, Matrix tries to use BSD make (/usr/bin/make) on FreeBSD instead of GNU make (/usr/local/bin/gmake). Sorry, but I don't know how to persuade the configure script to use gmake :-( Rainer Prof Brian Ripley schrieb: > This is because of the G

Re: [Rd] Matrix package: compilation error

2007-03-31 Thread Martin Maechler
> "Rainer" == Rainer Hurling <[EMAIL PROTECTED]> > on Sat, 31 Mar 2007 19:03:44 +0200 writes: Rainer> Trying to compile the package Rainer> Matrix_0.9975-11.tar.gz Rainer> with newest R-2.5.0 alpha Rainer> (2007-03-31 r40986) on FreeBSD 7.0-CURRENT (i386) does FreeBS

Re: [Rd] Matrix package: compilation error

2007-03-31 Thread Prof Brian Ripley
This is because of the GNUism in Matrix/src/Makefile ## get rid of this, once we have 'Depends: R (>= 2.5.0)': ifeq (, $(findstring -lRlapack, $(LAPACK_LIBS))) SOURCES_LAPACK = else SOURCES_LAPACK = zpotf2.f zpotrf.f zlacgv.f endif I guess you know what you need to do to fix it for BSD make? On

[Rd] Matrix package: compilation error

2007-03-31 Thread Rainer Hurling
Trying to compile the package Matrix_0.9975-11.tar.gz with newest R-2.5.0 alpha (2007-03-31 r40986) on FreeBSD 7.0-CURRENT (i386) I get the following error: - R CMD INSTALL Matrix_0.9975-11.tar.gz * Installing to library '/usr/local/lib/R/library' * Installing *source* package 'Matrix' ... *

[Rd] Matrix subsetting {was "... vectorized nested loop..."}

2007-01-24 Thread Martin Maechler
Hi Jose, I'm answering your second batch of questions, since Chuck Berry has already well done so with the first one > "Jose" == Jose Quesada <[EMAIL PROTECTED]> > on Tue, 23 Jan 2007 21:46:27 +0100 writes: [] Jose> # example Jose> library(Matrix) Jose> x = as(x,"

Re: [Rd] Matrix*vector: coercing sparse to dense matrix for arithmetic

2006-11-29 Thread Douglas Bates
On 11/29/06, Tamas K Papp <[EMAIL PROTECTED]> wrote: > I have a sparse Matrix (kronecker product of spline design matrices), > and I need to multiply each row by a number to get another matrix. If > the matrix is A and the numbers are stored in a vector k, with plain > vanilla matrices I would do

[Rd] Matrix*vector: coercing sparse to dense matrix for arithmetic

2006-11-29 Thread Tamas K Papp
Hi, I have a sparse Matrix (kronecker product of spline design matrices), and I need to multiply each row by a number to get another matrix. If the matrix is A and the numbers are stored in a vector k, with plain vanilla matrices I would do A*k But when using the Matrix package (class of A is "

[Rd] matrix/array types, extending R API?

2006-10-30 Thread Na Li
In writing R packages, I need some rudimentary support for matrix/array in C code and I would also like to use Blas/Lapack functions. Previously I just rolled out my own (simple) C++ classes. But it becomes troublesome for multiple packages (having duplicated files and needing to keep them in sy

[Rd] Matrix package in R-2.4.0alpha

2006-09-07 Thread Kjetil Halvorsen
In a newly downloaded version (today) of R-2-4-0alpha, with all packages from CRAN also installed today, I get: > library(Matrix) Erro en loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'Matrix' methods specified for export, but none defined: BIC, anova, c

Re: [Rd] Matrix package in R-2.4.0alpha

2006-09-07 Thread John Chambers
Sounds like you don't have a version Matrix installed from source for 2.4.0. As mentioned earlier on this list, the caching mechanism has changed for methods, and all packages need to be installed from source to get the correct objects. Works fine for me with an installation of Matrix from sou

Re: [Rd] Matrix package in R-2.4.0alpha

2006-09-07 Thread Prof Brian Ripley
As you may know from the R-devel list, things are very fluid re S4 just now. Which CRAN mirror did you use? Windows 2.4 packages are only just on the master and may not have got to mirrors yet. It does work for me compiling from source: you may want to try that. B. On Thu, 7 Sep 2006, Kjetil

Re: [Rd] Matrix inner product crashes on x86_64 (PR#8715)

2006-03-27 Thread ripley
On Mon, 27 Mar 2006, Jussi T Lindgren wrote: > On Mon, 27 Mar 2006, Prof Brian Ripley wrote: > >> Not reproducible for me (and do you really think that something as simple as >> this would not have been found on x86_64 long before now?) >> This is almost certainly caused by your use of an inapprop

  1   2   >