knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)
library(ggplot2)
x <- poly(1:10000, degree = 6)
df <- polypoly::poly_melt(x)
df$dg <- as.numeric(df$degree)
ggplot(df) + 
  aes(x = observation, y = value, color = dg, group = dg) + 
  geom_line(size = 1) + 
  viridis::scale_color_viridis(option = "viridis") + 
  theme_void() +
  guides(color = "none") +
  coord_cartesian(xlim = NULL, ylim = NULL, expand = FALSE)

polypoly

CRAN_Status_Badge R-CMD-check

Helper functions for polynomials created by poly().

Installation

Install the latest release of polypoly from CRAN:

install.packages("polypoly")

Or install the developmental version from Github:

# install.packages("devtools")
devtools::install_github("tjmahr/polypoly")



tjmahr/polypoly documentation built on Oct. 21, 2022, 12:56 p.m.