Re: [R] Adding numbers in Outputs

2010-12-11 Thread Petr PIKAL
provided by you. > > I apologize for taking the liberty of writing to you, but I shall be really > grateful to you, as I have just started getting the feel of 'R' and I know I > need to take lots of efforts to begin with. > > Thanks and eagerly waiting for your

Re: [R] Adding numbers in Outputs

2010-12-10 Thread jim holtman
g the liberty of writing to you, but I shall be really > grateful to you, as I have just started getting the feel of 'R' and I know I > need to take lots of efforts to begin with. > > Thanks and eagerly waiting for your guidance. > > Amelia Vettori > > --- On *Fri, 1

Re: [R] Adding numbers in Outputs

2010-12-10 Thread Amelia Vettori
o you, but I shall be really grateful to you, as I have just started getting the feel of 'R' and I know I need to take lots of efforts to begin with. Thanks and eagerly waiting for your guidance. Amelia Vettori --- On Fri, 10/12/10, jim holtman wrote: From: jim holtman Subject: Re: [

Re: [R] Adding numbers in Outputs

2010-12-10 Thread Jinyan Huang
X<-list(40,c(80,160),c(160,80,400)) Y<-list(10,c(10,30),c(5,18,20)) Z<-c(1,2,3) as.data.frame(do.call("rbind",X))->x as.data.frame(do.call("rbind",Y))->y x*y*Z->r r[upper.tri(r)] <- 0 rowSums(r) __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] Adding numbers in Outputs

2010-12-10 Thread Peter Ehlers
On 2010-12-10 02:41, Amelia Vettori wrote: two OutputsHello! I am Amelia from Auckland and work for a bank. I am new to R and I have started my venture with R just a couple of weeks back and this is my first mail to R-forum. I need following assistance Suppose my R code generates following ou

Re: [R] Adding numbers in Outputs

2010-12-10 Thread jim holtman
try this: > x <- list(40, c(80,160), c(160,80,400)) > y <- list(10, c(10,30), c(5,18,20)) > z <- c(1,2,3) > mapply(function(a1,a2,a3){ + a3 * sum(a1 * a2) + } + , x + , y + , z + ) [1] 400 11200 30720 On Fri, Dec 10, 2010 at 5:41 AM, Amelia Vettori wrote: > two OutputsHell

[R] Adding numbers in Outputs

2010-12-10 Thread Amelia Vettori
two OutputsHello! I am Amelia from Auckland and work for a bank. I am new to R and I have started my venture with R just a couple of weeks back and this is my first mail to R-forum. I need following assistance Suppose my R code generates following outputs as > X [[1]] [1] 40 [[2]] [1] 80