>
> Also, you probably get less data copying by using a for() or while() loop
> than by using apply() in this context.
Why may there be less data copying with "for" and "while" compared to apply?
>
> Finally, the overhead of formula parsing and model matrix construction
> repeated thousands of
On 10 Nov 2009, at 17:16, tlum...@u.washington.edu wrote:
On Tue, 10 Nov 2009, jim holtman wrote:
Have you tried something like this:
my.results = apply(chr, 2, function(x){
result <- try(anova(lrm( cpstc.f ~ x + time.cpstc + age + sex +
mri))[1,3])
if (inherits(result, "try-error")) r
On Tue, 10 Nov 2009, jim holtman wrote:
Have you tried something like this:
my.results = apply(chr, 2, function(x){
result <- try(anova(lrm( cpstc.f ~ x + time.cpstc + age + sex + mri))[1,3])
if (inherits(result, "try-error")) return(NULL)
result
})
This should catch the error and hav
Have you tried something like this:
my.results = apply(chr, 2, function(x){
result <- try(anova(lrm( cpstc.f ~ x + time.cpstc + age + sex + mri))[1,3])
if (inherits(result, "try-error")) return(NULL)
result
})
This should catch the error and have NULL in that list element.
On Tue, No
Dear All,
I'm using apply to do some genetic association analysis along a chromosome, with
many thousands markers. For each marker the analysis is the same, so I was
planning to use apply(chrom, 2, somefunction)
In the specific case I do:
my.results = apply(chr, 2, function(x){anova(lrm( cps
5 matches
Mail list logo