[R-sig-eco] Mantel

Chris Howden chris at trickysolutions.com.au
Fri Apr 20 03:12:06 CEST 2012


I can't comment on vegan but R in general can handle a matrix with about
2*10^9 elements (for more R memory info look at
http://stat.ethz.ch/R-manual/R-devel/library/base/html/Memory-limits.html)

I believe distance matrices usually only store either the lower or upper
diagonal. So the number of elements in a distance matrix are approx 1/2
the number of elements in a matrix.

I use the following code to see if my data is too big for R.

## # CHECK: IS DISTANCE MATRIX TOO BIG FOR MEMORY?
## # What is the min memory required for the distance matrix, assuming 1
bit for each distance (which is actually too small)
## # CHECK RESULT GB: requires 8GB which is too big for my computer
## dim(segment.input)
## (nrow(segment.input)^2)/2
## (nrow(segment.input)^2)/(2*1000000000)

## # CHECK RESULT vector length, keeping in mind that I think distance
matrices only require half the matrix to
## # store all the data, max is 2*10^9: Its bigger
## (nrow(segment.input)^2)/2 - 2*10^9


## ## interstingly nrow(segment.input)*nrow(segment.input) won't work for
large numbers we get
## ## > nrows*nrows
## ## [1] NA
## ## Warning message:
## ## In nrows * nrows : NAs produced by integer overflow


Chris Howden B.Sc. (Hons) GStat.
Founding Partner
Evidence Based Strategic Development, IP Commercialisation and Innovation,
Data Analysis, Modelling and Training
(mobile) 0410 689 945
(fax) +612 4782 9023
chris at trickysolutions.com.au




Disclaimer: The information in this email and any attachments to it are
confidential and may contain legally privileged information. If you are
not the named or intended recipient, please delete this communication and
contact us immediately. Please note you are not authorised to copy, use or
disclose this communication or any attachments without our consent.
Although this email has been checked by anti-virus software, there is a
risk that email messages may be corrupted or infected by viruses or other
interferences. No responsibility is accepted for such interference. Unless
expressly stated, the views of the writer are not those of the company.
Tricky Solutions always does our best to provide accurate forecasts and
analyses based on the data supplied, however it is possible that some
important predictors were not included in the data sent to us. Information
provided by us should not be solely relied upon when making decisions and
clients should use their own judgement.


-----Original Message-----
From: r-sig-ecology-bounces at r-project.org
[mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of Jonathan Hughes
Sent: Friday, 20 April 2012 10:24 AM
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] Mantel



Dear all,
Does anyone have an expectation of the maximum distance matrix size that
vegan can handle during a partial Mantel test?
thanks,
Jonathan
	[[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list