rodrigosantana / R-Graphics

A collection of R Graphic Generating Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stick

An R package to create stickmen and stick women on a plot.

how to use this code

Installation from github requires the devtools package to be installed.

# install devtools for devtools::install_github
install.packages("devtools")
require(devtools)
# install stick package
install_github("EconometricsBySimulation/R-Graphics/Stick-Figures/stick")

This package also includes tests in testthat format. From R run the call test_package("stick").

what is this code for?

This R package contains functions for adding stickpeople to a plot.

require(stick)
set.seed(68331)
plotStick(x = runif(100), y = runif(100))

random uniform placement of stickmen

plotStick(x = 1:10, y = cos(1:10),
    hat = c("none", "shapka", "beanie", "fedora"), 
    col = rainbow(10), cex = 2)

cos placement of stickmen in hats

About

A collection of R Graphic Generating Functions

License:GNU General Public License v3.0


Languages

Language:R 100.0%