Learn R Programming

ecodist (version 2.1.3)

dim.dist: Dimension of a distance object

Description

Returns NULL for the dimensions of a distance object.

Usage

# S3 method for dist
dim(x)

Value

NULL

Arguments

x

object of class dist

Author

Sarah Goslee

Details

The spdep package overwrites the base R behavior of dim.dist() to return c(n, n) where n is the size of the full matrix. The base R behavior returns NULL. This function restores base R behavior within ecodist, because otherwise spdep being loaded breaks ecodist functionality.

Examples

Run this code

	data(graze)
	dim(dist(graze))

Run the code above in your browser using DataLab