search for: anovp

Displaying 1 result from an estimated 1 matches for "anovp".

Did you mean: anova
2011 Sep 04
1
generating multiple dataset and applying function and output multiple output dataset......
...= TRUE), ncol = 10) mydata <- data.frame(var, yvar, matrix) } gdt <- lapply (seed, datagen) # resulting list (I believe is correct term) has 10 dataframes: gdt[1] .......to gdt[10] # my function, this will perform anova in every component data frames and output probability coefficients... anovp <- function(x){ ind <- 3:ncol(x) out <- lm(gdt[x]$yvar ~ gdt[x][, ind[ind]]) pval <- out$coefficients[,4][2] pval <- do.call(rbind,pval) } plist <- lapply (gdt, anovp) Error in gdt[x] : invalid subscript type 'list' This...