coords.plot {EgoCor}R Documentation

Scatterplot of spatial coordinates

Description

Plot of the Cartesian coordinates of study participant with color and shape coded indication whether the variable of interest is observed at a specific location.

Usage

coords.plot(data)

Arguments

data

A data frame or matrix containing the x-coordinates in meters in the first column, the y-coordinates in meters in the second column, and the values of the attribute of interest in the third column. Additional columns are ignored.

Value

The function returns a plot showing the points based on Cartesian coordinates. A black circle indicates that the variable of interest is observed at that location. A red cross flags a missing value.

Examples

## Example 1
xcoords = rnorm(10, mean = 0, sd = 20)
ycoords = rnorm(10, mean = 0, sd = 20)
value = c(22, 31, 10, NA, NA, 18, 9, NA, 1, 34)
dataset = cbind(xcoords, ycoords, value)
coords.plot(dataset)

## Example 2
coords.plot(birth)


[Package EgoCor version 1.2.0 Index]