LNND: a weighted function to compute one-dimensional nearest...

View source: R/Linda.R

LNNDR Documentation

a weighted function to compute one-dimensional nearest neighboring distance and conduct hypothesis testing for multiple line transects

Description

find nearest neighbor distance for each distributional point from multiple line transects and conduct hypothesis testing

Usage

LNND(lxy)

Arguments

lxy

lxy is three-column matrix, the first column is the line-transect ID, the second and third columns are x- and y-coordinate respectively. In line transect sampling, usually individuals of species are recorded in a sequential order, so the second and third columns should have been ordered in a time-forward way (backward is fine). Moreover, for the first column, IDs of different line transects should have been sorted according to time-forward sampling ordered.

Value

It returns the following quantities:

LR

the one-dimensional NND ratio, which is the average of the observed one-dimensional NND versus the expected NND,weighted over different line transects

t1

the average of the observed NND for all distributional points over different line transects

t2

the expected NND under one-dimensional perfect regularity pattern, weighted over different line transects. More details can be referred to Chen et al. (2025)

sig

the pool-level standard error over different line transects

c

the Z score value for testing significance

p

the p value for testing significance

df

sample size, i.e., the total number of distributional points for analysis

Note

in empirical data provided by the users themselves, because we assume individuals have been recorded in a sequential order and different line transects have been ordered in a sequential order in lxy matrix. so the original data lxy do not need to be sorted and just be used as input directly.

Author(s)

Youhua Chen

References

Xiaoqin Shi, Yongbin Wu, Qi Xiao, Youhua Chen (2026) Linda: an R package using Line transect-based nearest neighbor distance analysis to infer distributional aggregation pattern of species. Plant Diversity.

See Also

NND

Examples

x=cbind(1,runif(100))
x=rbind(x,cbind(2,runif(100)))
x=rbind(x,cbind(3,runif(100)))
lxy=cbind(x,1)
lxy[,2]=sort(lxy[,2]) #sequentially sampled in an economic way
LNND(lxy)
#in empirical data, because we assume individuals have been recorded in sequential order
#so the original data do not need to be sorted.
#By contrast, in simulated data, if we assumed individuals are recorded in sequential order 
#and in an economic way
#sort() function should be used.

Linda documentation built on July 4, 2026, 9:07 a.m.