| Title: | Pac-Man Visualization Package |
|---|---|
| Description: | Provides a broad-view perspective on data via linear mapping of data onto a radial coordinate system. The package contains functions to visualize the residual values of linear regression and Cartesian data in the defined radial scheme. See the 'pacviz' documentation page for more information: <https://pacviz.sriley.dev/>. |
| Authors: | Sarah Riley [aut, cre] |
| Maintainer: | Sarah Riley <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.4 |
| Built: | 2026-05-13 07:36:29 UTC |
| Source: | https://github.com/sharksorceress/pacviz |
Conversion between degrees and radians
deg2rad(deg)deg2rad(deg)
deg |
Angle in degrees |
Angle in radians
A function that will map a range of values to a different set of values.
linMap(x, i, f)linMap(x, i, f)
x |
Range of values to be mapped |
i |
Lowest value |
f |
Largest value |
A set of values spanning from i to f
A method of partitioning data between training and testing sets based on the fraction of data used for training
pac.partition(x, y, l, train_size = 0.7, rand_state = sample(1:2^15, 1))pac.partition(x, y, l, train_size = 0.7, rand_state = sample(1:2^15, 1))
x, y
|
Numeric data |
l |
Numeric labels data |
train_size |
Fraction of total data that the SVM will train on |
rand_state |
Value of the random state used to set the seed |
Two data frames and a list of indicies for the training set
A method of plotting traditional Cartesian data, based on a restricted radial coordinate system, while preserving the information.
pac.plot(x, y, title, taxis, raxis, color1 = "gold")pac.plot(x, y, title, taxis, raxis, color1 = "gold")
x, y
|
Numeric data |
title |
Figure title |
taxis, raxis
|
Vector with the first entry being the axis label and the second entry being units |
color1 |
Color value as string or rgb |
Pac-Man visual
# Generic Pac-Man plot data("cars") pac.plot(cars$dist,cars$speed, 'Example 1', c("Distance", "m"), c("Speed", "m/s"))# Generic Pac-Man plot data("cars") pac.plot(cars$dist,cars$speed, 'Example 1', c("Distance", "m"), c("Speed", "m/s"))
A visualization technique in R for regression analysis results, specifically residual values, based on a restricted radial coordinate system. It provides a broad view perspective on the performance of regression models, and supports most model inputs.
pac.resid( x, y, title, taxis, model = lm(y ~ x, data = data.frame(x, y)), color1 = "gold", standardize = FALSE )pac.resid( x, y, title, taxis, model = lm(y ~ x, data = data.frame(x, y)), color1 = "gold", standardize = FALSE )
x, y
|
Numeric data |
title |
Figure title |
taxis |
Vector with the first entry being the axis label and the second entry being units |
model |
An object for which the extraction of model residuals is meaningful. |
color1 |
Color value as string or rgb |
standardize |
Boolean to standardize the residual value |
Pac-Man residual plot
data("cars") x <- cars$dist y <- cars$speed pac.resid(x,y, 'Example 2', c("Temperature",'degC'), color1="lightblue", standardize=TRUE)data("cars") x <- cars$dist y <- cars$speed pac.resid(x,y, 'Example 2', c("Temperature",'degC'), color1="lightblue", standardize=TRUE)
Conversion between radians and degrees
rad2deg(rad)rad2deg(rad)
rad |
Angle in radians |
Angle in degrees
Converts unit inputs into a format that can be displayed. Support is restricted to 'degC', 'degF'.
unit_format(unit)unit_format(unit)
unit |
Unit input |
A list of formatted units