Re: [R] Multiply List by a Numeric

2009-08-24 Thread Peter Ehlers
Try lapply(abc, function(x) x*3) Peter Ehlers Brigid Mooney wrote: I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop.

Re: [R] Multiply List by a Numeric

2009-08-24 Thread Marc Schwartz
On Aug 24, 2009, at 10:58 AM, Brigid Mooney wrote: I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop. Everything e