wd2 {archetypal}R Documentation

2D data set for demonstration purposes

Description

A data frame of 100 2D points

Usage

data("wd2")

Format

matrix 100 x 2

Examples

# Creation of data set "wd2" from 3 corner-points:
p1 = c(1,2);p2 = c(3,5);p3 = c(7,3) 
dp = rbind(p1,p2,p3);dp
set.seed(9102)
pts = t(sapply(1:100, function(i,dp){
  cc = runif(3)
  cc = cc/sum(cc)
  colSums(dp*cc)
},dp))
df = data.frame(pts)
colnames(df) = c("x","y")
head(df)
# Check all equal:
data(wd2)
all.equal(wd2,df)
# [1] TRUE

[Package archetypal version 1.3.0 Index]