Ana M Aparicio Carrasco wrote:
> I need help about how to obtain the max by row in a matrix.
> For example if I have the following matrix:
> 2 5 3
> 8 7 2
> 1 8 4
>
> The max by row will be:
> 5
> 8
> 8
>
matrix(apply(m, 1, max), nrow(m))
vQ
__
R-he
?apply
> x <- rbind(c(2,5,3),c(8,7,2),c(1,8,4))
> apply(x, 1, max)
[1] 5 8 8
>
>
On Sat, Mar 28, 2009 at 7:54 PM, Ana M Aparicio Carrasco
wrote:
> I need help about how to obtain the max by row in a matrix.
> For example if I have the following matrix:
> 2 5 3
> 8 7 2
> 1 8 4
>
> The max by row
Of Wacek Kusnierczyk
Sent: Saturday, March 28, 2009 5:22 PM
To: Ana M Aparicio Carrasco
Cc: r-help@r-project.org
Subject: Re: [R] Matrix max by row
Ana M Aparicio Carrasco wrote:
> I need help about how to obtain the max by row in a matrix.
> For example if I have the following matrix:
> 2 5
project.org] On
Behalf Of Wacek Kusnierczyk
Sent: Saturday, March 28, 2009 5:22 PM
To: Ana M Aparicio Carrasco
Cc: r-help@r-project.org
Subject: Re: [R] Matrix max by row
Ana M Aparicio Carrasco wrote:
I need help about how to obtain the max by row in a matrix.
For example if I have the follow
essage-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Rolf Turner
Sent: Monday, 30 March 2009 1:39 PM
To: Bert Gunter
Cc: 'Wacek Kusnierczyk'; r-help@r-project.org
Subject: Re: [R] Matrix max by row
I tried the following:
m <- matrix(runif
>>
>> Hint:The man page for ?data.frame says:
>> "A data frame is a list of variables of the same length with unique row
>> names, given class 'data.frame'."
>>
>> Cheers,
>> Bert
>>
>> Bert Gunter
>> Genentech Nonclinica
Sent: Monday, March 30, 2009 2:33 AM
To: Rolf Turner
Cc: Bert Gunter; 'Ana M Aparicio Carrasco'; r-help@r-project.org
Subject: Re: [R] Matrix max by row
Rolf Turner wrote:
> I tried the following:
>
> m <- matrix(runif(10),1000,100)
> junk <- gc()
> print(system.t
Bert Gunter wrote:
>
> Serves me right, I suppose. Timing seems also very dependent on the
> dimensions of the matrix. Here's what I got with my inadequate test:
>
>
>> x <- matrix(rnorm(3e5),ncol=3)
>>
> ## via apply
>
>> system.time(apply(x,1,max))
>>
>user system elapsed
MarcioRibeiro wrote:
>
> Hi listers,
> I am having some trouble in a matrix multiplication...
> I have already checked some posts, but I didn't find my problem...
> I have the following code...
> But I am not getting the right multiplication...
> I checked the dimension and they are fine...
>
I think your problem is with R's behavior of dropping array indices
when dim==1.
Simulating that
> m1 <- matrix(1:2,nrow=2)
> m2 <- matrix(1:2,ncol=2)
> m1 %*% m2
[,1] [,2]
[1,]12
[2,]24
> m1[,] %*% m2[,]
[,1]
[1,]5
[1,]5
> m1[,,drop=FALSE] %*% m2[,,drop=
Hi again...
I will get an array with 5 matrix 2x2, with dimension 2x2x5
This code below works fine... And I am applying the same procedure...
The problem might be when I do the permutation of the array, but I checked
the dimension and its all right...
array1 <- array(1:30,dim=c(3,2,5))
array2 <-
MarcioRibeiro wrote:
Hi listers,
I am having some trouble in a matrix multiplication...
I have already checked some posts, but I didn't find my problem...
I have the following code...
But I am not getting the right multiplication...
I checked the dimension and they are fine...
id_y <- array(1:
Hello
This may have been answered elsewhere, and I have looked on the web, but
nothing helps. I am trying to do the following:
X<-matrix(c(1:15),nrow=3,byrow=T)
Y<-matrix(c(2,4,6,8,10),ncol=1)
I need to sum the product of each row of X by the remaining j rows multiplied
by j y values (i.e s
Hi again,
I understood what you guys explained...
But, there isn't a way to do a multiplication of matrix with a FOR command
or otherelse where one o my dimension is ONE...
Well, as my data file is small, I did the procedure at the excel... But,
this is not the good procedure...
Thanks,
Marcio
U
You need to put in calls to 'as.matrix'. It's
a bit tricky though -- what you want depends
on whether it is the first or second subscript
that has length 1.
as.matrix(id_y[,,i])
if the second dimension has length 1.
t(as.matrix(id_y[,,i]))
if the first dimension has length 1.
Patrick Burns
I think this works in general, although it's
a little bit clunky:
id_y <- array(1:10,dim=c(2,1,5))
id_yt <- aperm(id_y,c(2,1,3))
m_id <- array(dim=c(dim(id_y)[1],dim(id_y)[1],dim(id_y)[3]))
for (i in 1:dim(id_y)[3]){
m1 <- array(id_y[,,i],dim=dim(id_y)[1:2])
m2 <- array(id_yt[,,i],dim=di
Kia ora Juan
?merge
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Juan Pablo Fededa
> Sent: Wednesday, 8 April 2009 8:55 a.m.
> To: r-help@r-project.org
> Subject: [R] ma
Dear All
I new to using R and am struggling with some matrix multiplication.
I have two matrices, one containing random numbers, these are multiplied
together to get another matrix which is different each time. When I put in
another for loop to repeat this process a multiple times the matrices
I spent a lot of time searching and came up empty handed on the
following query. Is there an equivalent to rowSums that does product or
cumulative product and avoids use of apply or looping? I found a rowProd
in a package but it was a convenience function for apply. As part of a
likelihood calc
Maybe there is a more elegant solution, but here is one possibility:
mat1[is.na(mat1)]<-mat2[is.na(mat1)]
mat2[is.na(mat2)]<-mat1[is.na(mat2)]
(mat1+mat2)/2
On Nov 21, 2007 12:30 PM, Gregory Gentlemen <[EMAIL PROTECTED]> wrote:
> Hello fellow R users,
>
> I have a matrix computation that I imagi
On Wed, 2007-11-21 at 14:30 -0500, Gregory Gentlemen wrote:
> Hello fellow R users,
>
> I have a matrix computation that I imagine should be relatively easy
> to do, however I cannot figure out a nice way to do it. I have two
> matrices, for example
>
> mat1 <- matrix(c(1:5,rep(NA,5), 6:10), nro
Hallo
>From a variable "x" that defines, say, four classes, I would like to define
the matrix "mat" of dummy variables indicating the classes, i.e.
x <- c(1,1,1,1,2,2,2,3,3,3,4,4)
mat <- matrix(c(1,0,0,0,
1,0,0,0,
1,0,0,0,
1,0,0,0,
0,1,0,0,
0,1,0,0,
0,1,0,0,
0,0,1,0,
0,0,1,0,
0,0,1,0,
0,0,0,1,
0
Perhaps something like this:
> idx <- 1:2
> lm(as.matrix(iris[idx]) ~., iris[-idx])
Call:
lm(formula = as.matrix(iris[idx]) ~ ., data = iris[-idx])
Coefficients:
Sepal.Length Sepal.Width
(Intercept) 3.682982 3.048497
Petal.Length0.905946 0.154676
Pet
You can look at the components of the output using str and pick out
what you want
using $ and attr.
idx <- 1:2
z <- lm(as.matrix(iris[idx]) ~., iris[-idx])
str(z)
str(summary(z))
On Nov 23, 2007 1:10 PM, Morgan Hough <[EMAIL PROTECTED]> wrote:
> Hi Gabor,
>
> Thanks for your reply. I have it work
Hi Gabor,
Thanks for your reply. I have it working now. A couple of follow-ups if
I may.
I have a shell script parsing the output to find the brain areas where
there is a significant effect of diagnosis but its a bit of a hack. I
was wondering whether there are R specific tools for parsing/sum
R-helpers:
I am experiencing some odd behavior with the 'matrix' function that I have
not experienced before and was wondering if there is something that I was
missing in my code.
-
> sessionInfo()
R version 2.6.1 (2007-11-26)
i386-pc-mingw32
locale:
LC_COLLATE
Well, mat doesn't have any dimensions / isn't a matrix, and we don't
know what p is supposed to be. But leaving aside those little details,
do you perhaps want something like this:
x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)
p <- 5
mat<- matrix(0, nrow=p, ncol=length(x))
for(
One of those more elegant ways:
outer(x, 1:p, "^")
Charlotte
On Fri, Jan 9, 2009 at 4:24 PM, Sarah Goslee wrote:
> Well, mat doesn't have any dimensions / isn't a matrix, and we don't
> know what p is supposed to be. But leaving aside those little details,
> do you perhaps want something like th
Charlotte: I ran your code because I wasn't clear on it and your way
would cause more matrices than the person requested. So
I think the code below it, although not too short, does what the person
asked. Thanks though because I understand outer better now.
temp <- matrix(c(1,2,3,4,5,6),ncol=2)
On Fri, Jan 9, 2009 at 6:36 PM, wrote:
> Charlotte: I ran your code because I wasn't clear on it and your way would
> cause more matrices than the person requested.
Bhargab gave us
x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)
and said: "I want to have a matrix with p columns such that each
c
Thanks Kingsford. I thought the column power was supposed to be just for
that column but you're probably correct. English has its oddities
because if one reads the actual sentence the person wrote it's still not
clear, atleast to me.
"Actually I want to have a matrix with p columns such that
Hello,
I am using a number of large matrices in a project. I read a couple of the
matrices using the read.csv command. However in some instances, R does not
recognize the resulting matrices as consisting of numerical values (I
suspect R considers them as strings or factors)
for instance when I
Generally unambiguous questions get answered quickly. Perhaps other
readers are having the same difficulties I am experiencing. So let's
try to parse what you are asking:
On Apr 2, 2009, at 8:26 AM, Kutlwano Ramaboa wrote:
Hello
This may have been answered elsewhere, and I have looked on t
Agree, it is ambiguous. Will try again
Suppose I have the following
X<-matrix(c(1:20),nrow=4,byrow=T), hence this is a 4 by 5 matrix
Y<-matrix(c(2,4,6,8),ncol=1), and this is a 4 by 1 vector, each value denote
y1, y2,y3, y4
Step 1 - write each row of X as a vector, so I have vectors t(x_
On Apr 3, 2009, at 1:36 AM, Kutlwano Ramaboa wrote:
Agree, it is ambiguous. Will try again
Suppose I have the following
X<-matrix(c(1:20),nrow=4,byrow=T), hence this is a 4 by 5 matrix
Y<-matrix(c(2,4,6,8),ncol=1), and this is a 4 by 1 vector, each
value denote y1, y2,y3, y4
Step 1
Hello All,
I am working on graph object using IGRAPH package wanted to do Bonacich
Power. This is my graph object.
The file 'Graph.RData' (4.2 MB) is available for download at
http://dropbox.unl.edu/uploads/20090424/cfe4fcb854bb17f2/Graph.RData
Graph size
Vertices: 20984
Edges: 326033
Direct
Hello All,
I am working on graph object using IGRAPH package wanted to do Bonacich
Power. This is my graph object.
The file 'Graph.RData' (4.2 MB) is available for download at
http://dropbox.unl.edu/uploads/20090424/cfe4fcb854bb17f2/Graph.RData
Graph size
Vertices: 20984
Edges: 326033
Direct
If m is a matrix and s is a logical matrix of the same dimensions, I'd
like to be able to update m with
m[s] <- 0
If m2 is another matrix, I'd also like to be able to do
m[s] <- m2
where elements of m for which s is TRUE get the corresponding element of
m2.
However, this doesn't work in R 2.7.1.
I am not sure what you mean by being the same each time. If I make
successive calls to the function, I get different results:
> z
[,1]
[1,] 0.
[2,] 0.
[3,] 201.6382
[4,] 0.
[5,] 0.
[6,] 0.
[7,] 0.
> matmult(InitialPop,1)
[,1]
[1,] 0.000
[2,]
RFish wrote:
>
> I new to using R and am struggling with some matrix multiplication.
>
I'm not sure what you're trying to print, but you could place this vector in
an expression
mat3<-expression(c(0,rnorm(1,0.6021,0.0987),0,0,0,0,0,0,0,rnorm(1,0.6021,0.0987),0,0,0,0,1.9,0,0,rnorm(1,0.6021,0.
Sorry I probably wasn't clear with my description. The reason i put for loop
in was that I want to do the matrix multiplication about 1000 times to get a
1000 different matrices. Therefore I was hoping the for loop would be able
to automate this then use write.table to write to an external documen
Hi
Sorry I don't seem to have explained what I'm trying to do very clearly.
The piece of code below multiplies the two matrices together a number of
times based on the value in the matmult(InitialPop,1) term in this case one
(year), this gives me the end population for the analysis.
InitialPop<
If I understand you can use replicate:
replicate(10, matmult(InitialPop, 1))
On Fri, Sep 11, 2009 at 1:11 PM, RFish wrote:
>
> Hi
>
> Sorry I don't seem to have explained what I'm trying to do very clearly.
> The piece of code below multiplies the two matrices together a number of
> times base
On Sun, 17 Aug 2008, Jeff Laake wrote:
I spent a lot of time searching and came up empty handed on the following
query. Is there an equivalent to rowSums that does product or cumulative
product and avoids use of apply or looping? I found a rowProd in a package
but it was a convenience function
needed to multiply N pairs of
numbers.
--- On Mon, 18/8/08, Jeff Laake <[EMAIL PROTECTED]> wrote:
> From: Jeff Laake <[EMAIL PROTECTED]>
> Subject: [R] matrix row product and cumulative product
> To: r-help@r-project.org
> Received: Monday, 18 August, 2008, 12:49 PM
Thanks for the tips on inline, jit and Reduce. The latter was exactly
what I wanted although the loop
is still the fastest for the simple product (accumulate=TRUE for
reduce). With regards to Moshe's comment,
I was just surprised by the timing difference. I tend to use apply
without giving it
Sorry a correction to my last posting. I had accumulate switched
between prod and cumprod and I had also forgotten to included time for
conversion from list back to matrix for cumprod. Now as Chuck stated
the results for Reduce are about the same or worse than a loop.
regards--jeff
)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: "Serguei Kaniovski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 22, 2007 11:14 AM
Brant Inman wrote:
> R-helpers:
>
> I am experiencing some odd behavior with the 'matrix' function that I have
> not experienced before and was wondering if there is something that I was
> missing in my code.
>
> -
> > sessionInfo()
> R version 2.6.1 (2007-11-26
On Sun, 20 Jan 2008, Brant Inman wrote:
>
> Note the problems in rows 15, 21, 37 and 43. They should read [0.5, 45.5],
> [14.5, 21.5], etc... The matrix function seems to be rounding the second
> column up to the next integer. Why would this occur? Can I do something to
> prevent this?
>
> I
Check your getOption("digits"). Default is typically 7. Either you
or a package/function sets it to a small value. You get that
**output** with options(digits=n) where n=1,2,3.
/Henrik
On Jan 20, 2008 7:13 PM, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Sun, 20 Jan 2008, Brant Inman wrote:
>
*As usual, the R-helpers were bang on. Some package must have modified my
digits option without me noticing.*
**
*--*
**
*> test <- matrix(c(7,47,4,38,20,96,1,14,10,48,2,101,12,161,
+ 1,28,1,19,22,49,25,162,31,200,9,39,22,193,
+ 0.5,45.5,31,131,4,75,31,220,7,55,3,91,14.5,
+ 25.5,3,
Brant Inman gmail.com> writes:
>
> *As usual, the R-helpers were bang on. Some package must have modified my
> digits option without me noticing.*
I'm pretty certain that the arm package is the problem.
> options("digits")
$digits
[1] 7
> library(arm)
Loading required package: MASS
Loadin
Hello all,
When I create a matrix, is there a way to make it start at [0,0],
instead of [1,1]?
That way, a 2x2 matrix would go from [0,0] to [1,1], instead of [1,1]
to [2,2].
Best,
Guillaume
__
R-help@r-project.org mailing list
https://stat.ethz.
On 9/17/07, snapperball <[EMAIL PROTECTED]> wrote:
> I am using a number of large matrices in a project. I read a couple of the
> matrices using the read.csv command. However in some instances, R does not
> recognize the resulting matrices as consisting of numerical values (I
> suspect R considers
On 17-Sep-07 13:18:10, snapperball wrote:
>
> Hello,
>
> I am using a number of large matrices in a project. I read a
> couple of the matrices using the read.csv command. However
> in some instances, R does not recognize the resulting matrices
> as consisting of numerical values (I suspect R con
Dear UseRs,
here is an example scenario presenting my problem:
Multiplying a dsyMatrix with a numeric vector results in an error
(unfortunately in German due to my locale):
> (M1 <- Matrix( c( 1, 2, 2, 2, 1, 2, 2, 2, 1), nrow = 3))
3 x 3 Matrix of class "dsyMatrix"
[,1] [,2] [,3]
[1,]
> "SS" == Surendar Swaminathan
> on Mon, 20 Apr 2009 12:10:47 -0700 writes:
SS> Hello All, I am working on graph object using IGRAPH
SS> package wanted to do Bonacich Power. This is my graph
SS> object.
SS> The file 'Graph.RData' (4.2 MB) is available for
SS> dow
Hello Martin,
Thanks for looking in to the problem. My mistake, I pasted the code for
sparse matrix for the graph that was created by
test.g <- simplify(ba.game(1000,m=2))
What I was intending to show was I have a graph object "g" created by
IGRPAH. Please find the link that has the graph objec
On Jul 16, 2009, at 6:41 PM, Ross Boylan wrote:
If m is a matrix and s is a logical matrix of the same dimensions, I'd
like to be able to update m with
m[s] <- 0
If m2 is another matrix, I'd also like to be able to do
m[s] <- m2
where elements of m for which s is TRUE get the corresponding
el
Dear list,
As a minimal test of a more complex grid layout, I'm trying to find a
clean and efficient way to arrange text grobs in a rectangular layout.
The labels may be expressions, or text with a fontsize different of
the default, which means that the cell sizes should probably be
calculated usi
Hi,
I would like to create a matrix. Say 5*4.
The first column is integer, the second column is date, the third column
is character and the rest columns are integers.
So it's a combination of different types.
I am wondering how can I do that? "matrix" command only allow one type.
**
If you are willing to use character instead of numeric you can:
> xx <- matrix(1:4, 2, 2, dimnames = list(as.character(0:1), as.character(0:1)))
> xx
0 1
0 1 3
1 2 4
> xx["0", "1"]
[1] 3
On Wed, Oct 15, 2008 at 9:29 PM, Guillaume Filteau <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> When I creat
On 16/10/2008, at 2:29 PM, Guillaume Filteau wrote:
Hello all,
When I create a matrix, is there a way to make it start at [0,0],
instead of [1,1]?
That way, a 2x2 matrix would go from [0,0] to [1,1], instead of [1,1]
to [2,2].
First, see fortune(36).
Then, if you ***MUST***, install packag
As the posting guide says:
If you are using an old version of R and think it does not work properly.
upgrade to the latest version and try that, before posting.
This works in current R and current Matrix (0.999375-3)
It also says
If the question relates to a contributed package , e.g.,
A few amendments might make this improved code more readable,
e = expression(alpha,"testing very large width", hat(beta),
integral(f(x)*dx, a, b))
library(grid)
rowMax.units <- function(u, nrow){ # rowMax with a fake matrix of units
matrix.indices <- matrix(seq_along(u), nrow=nrow)
do.call(uni
Hello.
I am trying to invert a matrix, and I am finding that I can get different
answers depending on whether I set LAPACK true or false using "qr". I had
understood that LAPACK is, in general more robust and faster than LINPACK,
so I am confused as to why I am getting what seems to be invalid an
?data.frame
Lists and data.frames allow mixed components, matrices do not
--- On Thu, 10/2/08, ZHU, Justin <[EMAIL PROTECTED]> wrote:
> From: ZHU, Justin <[EMAIL PROTECTED]>
> Subject: [R] matrix with different type of column [SEC=UNCLASSIFIED]
> To: r-help@r-project.org
Dear R-users,
I am searching to the "best" way to compute a series of n matrix
multiplications between each matrix (mXm) in an array (mXmXn), and each
column of a matrix (mXn).
Please find below an example with four possible solutions.
The first is a simple for-loop which one might avoid; the se
>
> Hello All,
>
Please help me with this problem.I have been having this problem for over a
month now and I could not find any information.I later realised that error
is with MATRIX package.
I am working on graph object using IGRAPH version 0.5.2-2 package & wanted
to do Bonacich Power.
What I
> "SS" == Surendar Swaminathan
> on Fri, 15 May 2009 15:55:23 -0700 writes:
>> Hello All,
>>
SS> Please help me with this problem.I have been having this problem for
over a
SS> month now and I could not find any information.I later realised that
error
SS> is wit
Hello Martin,
Thank you very much for the reply. Thanks for solving the problem earlier
I was not aware of it.I did not receive any message and that is what made me
to post it again. Thank you once again.
I will let the person know about the solve(a,Matrix(b))
I still have this doubt.I still g
Subject
RE: [R] Matrix inversion-different
answers from LAPACK a
As you seem to be aware, the matrix is poorly conditioned:
> kappa(PLLH,exact=TRUE)
[1] 115868900869
It might be worth your while to think about reparametrizing.
albyn
On Wed, Jun 17, 2009 at 11:37:48AM -0400, avraham.ad...@guycarp.com wrote:
>
> Hello.
>
> I am trying to invert a matrix, and
On Wed, Jun 17, 2009 at 2:02 PM, Albyn Jones wrote:
> As you seem to be aware, the matrix is poorly conditioned:
>
>> kappa(PLLH,exact=TRUE)
> [1] 115868900869
>
> It might be worth your while to think about reparametrizing.
Also, if it is to be a variance-covariance matrix then it must be
positiv
am.ad...@guycarp.com,
r-help@r-project.org
06/17/2009 05:55 Subject
PM Re: [R] Matrix inversion-different
answers fro
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of avraham.ad...@guycarp.com
Sent: Wednesday, June 17, 2009 6:11 PM
To: Douglas Bates
Cc: dmba...@gmail.com; r-help@r-project.org
Subject: Re: [R] Matrix
-help-boun...@r-project.org] On
Behalf Of avraham.ad...@guycarp.com
Sent: Wednesday, June 17, 2009 6:11 PM
To: Douglas Bates
Cc: dmba...@gmail.com; r-help@r-project.org
Subject: Re: [R] Matrix inversion-different answers from LAPACK and LINPACK
I will be the first one to admit I may be doing s
Subject
RE: [R] Matrix inversion-different
- Original Message -
From: avraham.ad...@guycarp.com
Date: Thursday, June 18, 2009 10:54 am
Subject: RE: [R] Matrix inversion-different answers from LAPACK and LINPACK
To: Ravi Varadhan
Cc: r-help@r-project.org
> Thank you. One question, though. In the case where I have closed form
> f
edu/agingandhealth/People/Faculty_personal_pages/Varadhan.h
tml
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of avraham.ad...@guycarp.com
Sent: Wednesday, June
alf Of avraham.ad...@guycarp.com
Sent: Wednesday, June 17, 2009 11:38 AM
To: r-help@r-project.org
Subject: [R] Matrix inversion-different answers from LAPACK and LINPACK
Hello.
I am trying to invert a matrix, and I am finding that I can get different
answers depending on whether I set LAPACK
cc
Subject
RE: [R] Matrix inversion-different
eople/Faculty_personal_pages/Varadhan.h
tml
-Original Message-
From: avraham.ad...@guycarp.com [mailto:avraham.ad...@guycarp.com]
Sent: Wednesday, June 17, 2009 1:10 PM
To: Ravi Varadhan
Cc: r-help@r-project
Hello
I've stumbled upon a problem for inversion of a matrix with large values,
and I haven't found a solution yet... I wondered if someone could give a
hand. (It is about automatic optimisation of a calibration process, which
involves the inverse of the information matrix)
code:
***
On Wed, 11 Mar 2009, Camarda, Carlo Giovanni wrote:
Dear R-users,
I am searching to the "best" way to compute a series of n matrix
multiplications between each matrix (mXm) in an array (mXmXn), and each
column of a matrix (mXn).
Please find below an example with four possible solutions.
The fi
Thursday, March 12, 2009 4:25 PM
To: Camarda, Carlo Giovanni
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] matrix multiplication, tensor product, block-diagonal and fast
computation
On Wed, 11 Mar 2009, Camarda, Carlo Giovanni wrote:
> Dear R-users,
>
> I am searching to the "bes
Hello R Folks...
I have a list with the following structure:
> str(df)
List of 3
$ y: num [1:4, 1:1242] -0.005379 0.029874 -0.023274 0.000655 -0.004537
..
$ x: num [1:1242] 501 503 505 507 509 ...
$ names: Factor w/ 4 levels "PC Loading 1",..: 1 2 3 4
I want to plot each row of df$y a
On 3/5/2008 8:21 AM, gerardus vanneste wrote:
> Hello
>
> I've stumbled upon a problem for inversion of a matrix with large values,
> and I haven't found a solution yet... I wondered if someone could give a
> hand. (It is about automatic optimisation of a calibration process, which
> involves the
Sorry, I meant to send this to the whole list.
On Mar 5, 2008, at 8:46 AM, Charilaos Skiadas wrote:
> The problem doesn't necessarily have to do with the range of data.
> At first level, it has to do with the simple fact that dfdb has
> rank 6 at most, (7 at most in general, though in your ca
On Wed, Mar 5, 2008 at 7:43 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> On 3/5/2008 8:21 AM, gerardus vanneste wrote:
> > Hello
> >
> > I've stumbled upon a problem for inversion of a matrix with large values,
> > and I haven't found a solution yet...
Someone with experience in numerical l
I'm not exactly sure what structure df has. Here's my effort to
duplicate it:
df <- data.frame(y=matrix(rnorm(24), nrow=6), x=1:6)
> df
y.1y.2y.3y.4 x
1 0.1734636 0.2348417 -1.2375648 -1.3246439 1
2 1.9551669 -1.1027262 -0.7307332 0.3953752 2
3 -0.7645778 1
Thanks David, your way of constructing df is much more compact than what I
was using, so I've incorporated it. I also had my rows and columns
transposed relative to how xyplot wanted them (though I had tested for that,
other problems interfered).
In my case, I may have varying numbers of y column
For the example df below this also works:
library(lattice); library(zoo)
xyplot(zoo(df[1:4], df$x), type = "p")
On Sun, Sep 6, 2009 at 12:51 AM, David Winsemius wrote:
> I'm not exactly sure what structure df has. Here's my effort to duplicate
> it:
>
> df <- data.frame(y=matrix(rnorm(24), nrow=6
On Sat, Sep 5, 2009 at 10:43 PM, Bryan Hanson wrote:
> Thanks David, your way of constructing df is much more compact than what I
> was using, so I've incorporated it. I also had my rows and columns
> transposed relative to how xyplot wanted them (though I had tested for that,
> other problems int
On Sep 6, 2009, at 12:51 AM, David Winsemius wrote:
I'm not exactly sure what structure df has. Here's my effort to
duplicate it:
df <- data.frame(y=matrix(rnorm(24), nrow=6), x=1:6)
> df
y.1y.2y.3y.4 x
1 0.1734636 0.2348417 -1.2375648 -1.3246439 1
2 1.9551
As context, I am a newbie, but preparing for a moderately deep dive into
new areas af analysis while becoming familiar with R, at the same time.
I have looked at the dependencies, amd imports for the Baysean and
Econometrics View related analytics in R and have found that the Matrix
package refere
Sorrry for re-sending this message as 1) a non-subscriber initially,
then 2) from an un-subscribed e-mail.
As context, I am a newbie, but preparing for a moderately deep dive into
new areas af analysis while becoming familiar with R, at the same time.
I have looked at the dependencies, amd im
201 - 298 of 298 matches
Mail list logo