Rmarkdown partial example

Introduction

For example, you can make enlarge-able plots:

# knitr::opts_knit$set(child = TRUE)
set.seed(1)

Graphical relationship

library(rmdpartials)
library(ggplot2)
x <- rnorm(100)
y <- x + rnorm(100) + 0.5 * x^2
curve <- qplot(x, y)
enlarge_plot(curve, large_plot = curve + theme_classic(base_size = 20), plot_name = "myplot")

Regression

reg <- lm(y ~ x)
regression_diagnostics(reg)

Write a partial on the fly

x <- 5
y <- 9
partial(text = "`r x` `r y`")

Debug

Learn about environments in partials.

knit_child_debug()


Try the rmdpartials package in your browser

Any scripts or data that you put into this service are public.

rmdpartials documentation built on July 2, 2020, 3:22 a.m.