nsub=30000
nr=nsub
ncol=nsub
dummy_datamatrix <- data.frame(pc1=rnorm(nsub), pc2=rnorm(nsub),studytype=round(runif(nsub)))
distmat <- matrix(rnorm(nsub^2),ncol=nsub,nrow=nsub)
library(vegan)
adon1 <- adonis(distmat~pc1+pc2+studytype,data=dummy_datamatrix,parallel=8)
10000 people = 3.3 g of ram
30k people = 30 g
so ram scales qudratically
with the number of people.
it said it couldnt allocate a matrix of this size, but i think I have 32 g of ram - either ram being used or r limits somehow
use a grm based on the overlap?
ok seems to top out at 30k people