[R] spatial analysis using quickPCNM

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Mon Jan 23 19:08:27 CET 2017

I don't know if I will be able to help solve your problem, but failure to follow the recommendations in the Posting Guide was probably getting you off in the wrong foot when you posted on the other (more appropriate?) mailing list, as it is here. 

A) Code is garbled. Post using plain text format... this is a setting you have to choose in your email program. 

B) Code is not reproducible. We cannot run your code to get your error due to missing library statements and no data. The Posting Guide and Google have suggestions for how you can make your example reproducible. 

C) Assuming you are using the PCNM package, the documentation found by Google (which you can probably read using ?quickPCNM) says quickPCNM expects a matrix, but it looks like you are giving it a data frame. Read your introductory R training materials (e.g. the Introduction to R document that ships with R) to understand the distinction.  But I have never used this function so this could be a red herring. 

Please go read the Posting Guide. 
Sent from my phone. Please excuse my brevity.

On January 23, 2017 6:42:28 AM PST, Andrew Halford <andrew.halford at gmail.com> wrote:
>Hi Listers,
>I posted this message to the R-sig-ecology group last Friday but have
>had a response hence my post here.
>I have been trying to run spatial analyses on a fish community dataset.
>My fish dataset has 114 species(variables) x 45 sites
>My spatial dataset has the Lat and Long values for each site, converted
>cartesian coordinates
>> fish <- read.table(file.choose())> latlong <-
>read.table(file.choose()) > fish.h <- decostand (fish, "hellinger")>
>fish.PCNM.quick <- quickPCNM(fish.h,latlong)
>Truncation level = 639.5348
>Time to compute PCNMs = 0.820000  sec Error in if (temp2.test[1, 5] <=
>alpha) { : argument is of length zeroTiming stopped at: 1.06 0.05 1.19
>I do not understand the error message coming up and would appreciate
>some advice.

More information about the R-help mailing list