Title: | Pac-Man Visualization Package |
Version: | 1.0.4 |
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/. |
License: | MIT + file LICENSE |
Depends: | R (≥ 4.0.0) |
Imports: | circlize, graphics, plotrix, stats, utils |
Suggests: | knitr, markdown |
VignetteBuilder: | knitr |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.3 |
NeedsCompilation: | no |
Packaged: | 2025-10-08 16:53:07 UTC; pharaohcola13 |
Author: | Sarah Riley [aut, cre] |
Maintainer: | Sarah Riley <academic@sriley.dev> |
Repository: | CRAN |
Date/Publication: | 2025-10-14 18:00:02 UTC |
Degree angle conversion
Description
Conversion between degrees and radians
Usage
deg2rad(deg)
Arguments
deg |
Angle in degrees |
Value
Angle in radians
Linear map
Description
A function that will map a range of values to a different set of values.
Usage
linMap(x, i, f)
Arguments
x |
Range of values to be mapped |
i |
Lowest value |
f |
Largest value |
Value
A set of values spanning from i to f
Machine learning data partition
Description
A method of partitioning data between training and testing sets based on the fraction of data used for training
Usage
pac.partition(x, y, l, train_size = 0.7, rand_state = sample(1:2^15, 1))
Arguments
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 |
Value
Two data frames and a list of indicies for the training set
Pac-Man plotting function
Description
A method of plotting traditional Cartesian data, based on a restricted radial coordinate system, while preserving the information.
Usage
pac.plot(x, y, title, taxis, raxis, color1 = "gold")
Arguments
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 |
Value
Pac-Man visual
Examples
# Generic Pac-Man plot
data("cars")
pac.plot(cars$dist,cars$speed, 'Example 1', c("Distance", "m"), c("Speed", "m/s"))
Pac-Man Residual Function
Description
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.
Usage
pac.resid(
x,
y,
title,
taxis,
model = lm(y ~ x, data = data.frame(x, y)),
color1 = "gold",
standardize = FALSE
)
Arguments
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 |
Value
Pac-Man residual plot
Examples
data("cars")
x <- cars$dist
y <- cars$speed
pac.resid(x,y, 'Example 2',
c("Temperature",'degC'),
color1="lightblue",
standardize=TRUE)
Radian angle conversion
Description
Conversion between radians and degrees
Usage
rad2deg(rad)
Arguments
rad |
Angle in radians |
Value
Angle in degrees
Unit formatting
Description
Converts unit inputs into a format that can be displayed. Support is restricted to 'degC', 'degF'.
Usage
unit_format(unit)
Arguments
unit |
Unit input |
Value
A list of formatted units