OLE.productmoment: calculates product-moment correlation coefficient

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/OLE-productmoment.R

Description

calculates product-moment correlation coefficient from two datasets

Usage

1
OLE.productmoment(data1, data2, CheckData = TRUE)

Arguments

data1

data.frame; can either be an abundance dataset.

CheckData

logical; if TRUE the CheckData() function will be run in advance.

data1

data.frame; can either be an abundance dataset.

Details

Calculates the product moment correlation coefficient as found in 'The Measurement of Niche Overlap and Some Relatives' (Hurlbert, S.H. 1971). The function takes abundance datasets as input.

Value

numeric value representing product-moment correlation coefficient.

Author(s)

Florian Berger <florian_berger@ymail.com>

See Also

scale

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Create Datasets
 a     <- c(1:10)
 dates1 <- as.Date(a, origin = '2017-01-01')
 count1 <- c(1,1,3,4,6,9,5,4,2,1)
 dat1   <- data.frame(dates1, count1)
 b     <- c(6:15)
 dates2 <- as.Date(b, origin = '2017-01-01')
 count2 <- c(1,2,4,5,6,9,3,4,1,1)
 dat2   <- data.frame(dates2, count2)

 OLE.productmoment(dat1,dat2)

biometry/phenologicalOverlap documentation built on May 21, 2019, 2:31 a.m.