Learn R Programming

FField (version 0.1.0)

FField-package: Force field simulation for a set of points

Description

Force field simulation of interaction of set of points. Very useful for placing text labels on graphs, such as scatterplots.

Arguments

Details

FFieldPtRep(): Performs force field simulation of mutual repulsion by set of points.

FFieldPtRepDemo(): Demonstrates the utility of FFieldPtRep for placing labels in a scatterplot.

See Also

FFieldPtRep FFieldPtRepDemo

Examples

Run this code
# Repel points
coords <-
  FFieldPtRep(coords = cbind(mtcars$wt * 100 / max(mtcars$wt), 
                             mtcars$mpg * 100 / max(mtcars$mpg)),
              rep.fact = 40)
head(mtcars)
head(coords)
  
# Demo
FFieldPtRepDemo()

Run the code above in your browser using DataLab