Skip to contents

S3 method for plotting shorts_model object

Usage

# S3 method for shorts_model
plot(x, type = "model", ...)

Arguments

x

shorts_model object

type

Type of plot. Can be "model" (default), "kinematics-time", "kinematics-distance", or "residuals"

...

Not used

Value

ggplot object

Examples

# Simple model with radar gun data
instant_velocity <- data.frame(
  time = c(0, 1, 2, 3, 4, 5, 6),
  velocity = c(0.00, 4.99, 6.43, 6.84, 6.95, 6.99, 7.00)
)

radar_model <- with(
  instant_velocity,
  model_radar_gun(time, velocity)
)

plot(radar_model)

plot(radar_model, "kinematics-time")

plot(radar_model, "kinematics-distance")

plot(radar_model, "residuals")