run2elev: run2elev

Description Usage Arguments Value Integration into ggplot2 Examples

View source: R/elevPlot.R

Description

Visualize a run/hike temporal elevation.

Usage

1
2
run2elev(data = alpine_skiing, color = "black", smooth = TRUE,
  smoothfactor = 1, smoothcolor = "red")

Arguments

data

A run data frame returned by import_run.

color

The color to draw the movement line in.

smooth

Logical T/F whether to add a smooth function.

smoothfactor

Loess smoothing factor

smoothcolor

Color to draw the smoothline in.

Value

A ggplot object.

Integration into ggplot2

You can simply add to a plot created by run2elev by using the usual ggplot2-syntax.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data("alpine_skiing")

run2elev(data = alpine_skiing)

run2elev(data = alpine_skiing,
         color = "black",
         smooth = TRUE,
         smoothfactor = 0.3,
         smoothcolor = "red") 
         
run2elev(data = alpine_skiing) + 
geom_hline(yintercept = mean(alpine_skiing$ele,na.rm = TRUE),
           color = "green")    

schliebs/runR documentation built on May 26, 2019, 3:35 a.m.