BinnedScatter {aroma.core}R Documentation

The BinnedScatter class

Description

Package: aroma.core
Class BinnedScatter

list
~~|
~~+--BinnedScatter

Directly known subclasses:

public class BinnedScatter
extends list

Usage

BinnedScatter(data=NULL, density=NULL, map=NULL, params=NULL)

Arguments

data

A Nx2 numeric matrix.

density

...

map

...

params

A list of parameters.

Fields and Methods

Methods:

plot -
points -
reorder -
subsample -
subset -

Methods inherited from list:
Ops,nonStructure,vector-method, Ops,structure,vector-method, Ops,vector,nonStructure-method, Ops,vector,structure-method, all.equal, as.CopyNumberDataSetTuple, as.data.frame, attachLocally, callHooks, coerce,ANY,list-method, exportAromaUnitPscnBinarySet, listToXml, mergeBoxplotStats, relist, type.convert, within

Author(s)

Henrik Bengtsson

See Also

The spatial density is estimated by internal functions of the smoothScatter package.

Examples

# Sample scatter data
n <- 10e3
x <- rnorm(n=n)
y <- rnorm(n=n)
xy <- cbind(x=x, y=sin(x)+y/5)

# Bin data and estimate densities
xyd <- binScatter(xy)

layout(matrix(1:4, nrow=2))
par(mar=c(5,4,2,1))

# Plot data
plot(xyd, pch=1)

# Thin scatter data by subsampling
rhos <- c(1/3, 1/4, 1/6)
for (kk in seq_along(rhos)) {
  xyd2 <- subsample(xyd, size=rhos[kk])
  points(xyd2, pch=1, col=kk+1)
}

for (kk in seq_along(rhos)) {
  xyd2 <- subsample(xyd, size=rhos[kk])
  plot(xyd2, pch=1, col=kk+1)
  mtext(side=3, line=0, sprintf("Density: %.1f%%", 100*rhos[kk]))
}

[Package aroma.core version 3.2.2 Index]