search for: concov

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

2009 Apr 22
2
function output with for loop and if statement
...loop was the culprit, but when I only ran the part of the code with the for loop with no if statement I still had the above problem (works outside function, fails when wrapped into a function). Below is the code and example output. Please help! Thanks, Aaron concov.test<-function(vegetation,specieslist) { test.veg<-vegetation names(test.veg)<-specieslist$LifeForm tmp<-matrix(nrow=nrow(test.veg),ncol=length(unique(names(test.veg)))) for (i in unique(names(test.veg))) {test.out<-apply(test.veg[,names(test.veg)==i],1,sum) tmp.match<-uniqu...