For example, you can make enlarge-able plots:
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")
reg <- lm(y ~ x)
regression_diagnostics(reg)
x | |
---|---|
(Intercept) | 0.3592409 |
x | 1.0755503 |
Values vs. fitted values.
Diagnostics (click to show)
x <- 5
y <- 9
partial(text = "`r x` `r y`")
5 9
Learn about environments in partials.
knit_child_debug()
Debug
Working directory
## [1] "/private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rbuild15a497ffe8c/rmdpartials/vignettes"
needs_preview()
## [1] FALSE
is_interactive()
## [1] FALSE
Knitr Output.dir
## [1] "/private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rbuild15a497ffe8c/rmdpartials/vignettes"
Child mode
## [1] TRUE
Viewer null
## [1] TRUE
In tmp dir
## [1] FALSE
knitr.in.progress
## [1] TRUE
rstudio.notebook.executing
## NULL
TESTTHAT_interactive
## [1] ""
TESTTHAT
## [1] ""
interactive
## [1] FALSE
objects in this environment
## [1] "is_interactive" "needs_preview"
knitr::opts_knit
## $progress
## [1] FALSE
##
## $verbose
## [1] FALSE
##
## $eval.after
## [1] "fig.cap"
##
## $base.dir
## NULL
##
## $base.url
## NULL
##
## $root.dir
## NULL
##
## $child.path
## [1] ""
##
## $upload.fun
## function (x)
## x
## <bytecode: 0x7fd5d9b48278>
## <environment: namespace:base>
##
## $global.device
## [1] FALSE
##
## $global.par
## [1] FALSE
##
## $concordance
## [1] FALSE
##
## $documentation
## [1] 1
##
## $self.contained
## [1] TRUE
##
## $unnamed.chunk.label
## [1] "rmdpartial"
##
## $highr.opts
## NULL
##
## $out.format
## [1] "markdown"
##
## $child
## [1] TRUE
##
## $parent
## [1] FALSE
##
## $tangle
## [1] FALSE
##
## $aliases
## NULL
##
## $header
## highlight tikz framed
## "" "" ""
##
## $global.pars
## NULL
##
## $rmarkdown.pandoc.from
## [1] "markdown+autolink_bare_uris+tex_math_single_backslash+smart"
##
## $rmarkdown.pandoc.to
## [1] "html"
##
## $rmarkdown.pandoc.args
## [1] "--email-obfuscation"
## [2] "none"
## [3] "--standalone"
## [4] "--section-divs"
## [5] "--template"
## [6] "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rmarkdown/rmd/h/default.html"
## [7] "--no-highlight"
## [8] "--variable"
## [9] "highlightjs=1"
##
## $rmarkdown.pandoc.id_prefix
## [1] ""
##
## $rmarkdown.keep_md
## [1] FALSE
##
## $rmarkdown.df_print
## [1] "default"
##
## $rmarkdown.version
## [1] 2
##
## $rmarkdown.runtime
## [1] "static"
##
## $output.dir
## [1] "/private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rbuild15a497ffe8c/rmdpartials/vignettes"
knitr::opts_chunk
## $eval
## [1] TRUE
##
## $echo
## [1] FALSE
##
## $results
## [1] "markup"
##
## $tidy
## [1] FALSE
##
## $tidy.opts
## NULL
##
## $collapse
## [1] FALSE
##
## $prompt
## [1] FALSE
##
## $comment
## [1] "##"
##
## $highlight
## [1] TRUE
##
## $strip.white
## [1] TRUE
##
## $size
## [1] "normalsize"
##
## $background
## [1] "#F7F7F7"
##
## $cache
## [1] FALSE
##
## $cache.path
## [1] "rmdpartials_cache/html/f080a7cff6_"
##
## $cache.vars
## NULL
##
## $cache.lazy
## [1] TRUE
##
## $dependson
## NULL
##
## $autodep
## [1] FALSE
##
## $cache.rebuild
## [1] FALSE
##
## $fig.keep
## [1] "high"
##
## $fig.show
## [1] "asis"
##
## $fig.align
## [1] "default"
##
## $fig.path
## [1] "/private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rbuild15a497ffe8c/rmdpartials/vignettes/rmdpartials_files/figure-html/f080a7cff6_"
##
## $dev
## [1] "png"
##
## $dev.args
## NULL
##
## $dpi
## [1] 96
##
## $fig.ext
## NULL
##
## $fig.width
## [1] 7
##
## $fig.height
## [1] 5
##
## $fig.env
## [1] "figure"
##
## $fig.cap
## NULL
##
## $fig.scap
## NULL
##
## $fig.lp
## [1] "fig:"
##
## $fig.subcap
## NULL
##
## $fig.pos
## [1] ""
##
## $out.width
## NULL
##
## $out.height
## NULL
##
## $out.extra
## NULL
##
## $fig.retina
## [1] 2
##
## $external
## [1] TRUE
##
## $sanitize
## [1] FALSE
##
## $interval
## [1] 1
##
## $aniopts
## [1] "controls,loop"
##
## $warning
## [1] TRUE
##
## $error
## [1] FALSE
##
## $message
## [1] TRUE
##
## $render
## NULL
##
## $ref.label
## NULL
##
## $child
## NULL
##
## $engine
## [1] "R"
##
## $split
## [1] FALSE
##
## $include
## [1] TRUE
##
## $purl
## [1] TRUE
Sys.getenv()
## Apple_PubSub_Socket_Render
## /private/tmp/com.apple.launchd.7LbHLOUe9h/Render
## BIBINPUTS .:/Library/Frameworks/R.framework/Resources/share/texmf/bibtex/bib:
## BSTINPUTS .:/Library/Frameworks/R.framework/Resources/share/texmf/bibtex/bst:
## CALLR_CHILD_R_LIBS /private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpMoDYA7/temp_libpath156c2228f4b94:/Library/Frameworks/R.framework/Versions/3.5/Resources/library
## CALLR_CHILD_R_LIBS_SITE
##
## CALLR_CHILD_R_LIBS_USER
## /private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpMoDYA7/temp_libpath156c2228f4b94:/Library/Frameworks/R.framework/Versions/3.5/Resources/library
## CALLR_R_LIBS_SITE_BAK
## CALLR_R_LIBS_USER_BAK ~/Library/R/3.5/library
## CLICOLOR_FORCE 1
## CYGWIN nodosfilewarning
## DISPLAY /private/tmp/com.apple.launchd.0IUzPaJFtq/org.macosforge.xquartz:0
## DYLD_FALLBACK_LIBRARY_PATH
## /Library/Frameworks/R.framework/Resources/lib:/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server
## EDITOR vi
## GIT_ASKPASS rpostback-askpass
## HOME /Users/rubenarslan
## KMP_DUPLICATE_LIB_OK 1
## LANG en_US.UTF-8
## LC_COLLATE C
## LC_CTYPE en_US.UTF-8
## LN_S ln -s
## LOGNAME rubenarslan
## MAGICK_TMPDIR /var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T//RtmpMoDYA7
## MAKE make
## MPLENGINE tkAgg
## PAGER /usr/bin/less
## PATH /Library/Frameworks/R.framework/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/opt/puppetlabs/bin:/usr/local/munki:/opt/X11/bin:/usr/local/git/bin
## PROCESSX_PSWUTVRKMIRE_1591048303
## YES
## PWD /private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rbuild15a497ffe8c/rmdpartials
## RMARKDOWN_MATHJAX_PATH
## /Applications/RStudio.app/Contents/Resources/resources/mathjax-26
## RSTUDIO 1
## RSTUDIO_CONSOLE_COLOR 256
## RSTUDIO_CONSOLE_WIDTH 88
## RSTUDIO_PANDOC /Applications/RStudio.app/Contents/MacOS/pandoc
## RSTUDIO_SESSION_PORT 24278
## RSTUDIO_USER_IDENTITY rubenarslan
## RSTUDIO_WINUTILS bin/winutils
## RS_PPM_FD_READ 4
## RS_PPM_FD_WRITE 29
## RS_RPOSTBACK_PATH /Applications/RStudio.app/Contents/MacOS/rpostback
## RS_SHARED_SECRET 132163034912179147221826093097
## R_ARCH
## R_BROWSER false
## R_BUILD_TEMPLIB /var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T//RtmpAipB0j/Rinst15a4953209995
## R_BZIPCMD /usr/bin/bzip2
## R_CMD /Library/Frameworks/R.framework/Resources/bin/Rcmd
## R_DEFAULT_PACKAGES
## R_DOC_DIR /Library/Frameworks/R.framework/Resources/doc
## R_ENVIRON
## R_ENVIRON_USER
## R_GZIPCMD /usr/bin/gzip
## R_HOME /Library/Frameworks/R.framework/Resources
## R_INCLUDE_DIR /Library/Frameworks/R.framework/Resources/include
## R_LIBS /private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpAipB0j/Rinst15a4953209995:/private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpMoDYA7/temp_libpath156c2228f4b94:/Library/Frameworks/R.framework/Versions/3.5/Resources/library
## R_LIBS_SITE
## R_LIBS_USER /private/var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/RtmpMoDYA7/temp_libpath156c2228f4b94:/Library/Frameworks/R.framework/Versions/3.5/Resources/library
## R_OSTYPE unix
## R_PACKRAT_DEFAULT_LIBPATHS
## /Library/Frameworks/R.framework/Versions/3.5/Resources/library
## R_PACKRAT_SITE_LIBRARY
##
## R_PACKRAT_SYSTEM_LIBRARY
## /Library/Frameworks/R.framework/Resources/library
## R_PAPERSIZE a4
## R_PAPERSIZE_USER a4
## R_PDFVIEWER false
## R_PLATFORM x86_64-apple-darwin15.6.0
## R_PRINTCMD lpr
## R_PROFILE
## R_PROFILE_USER
## R_QPDF /Library/Frameworks/R.framework/Resources/bin/qpdf
## R_RD4PDF times,inconsolata,hyper
## R_SESSION_TMPDIR /var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T//RtmpGYIWYN
## R_SHARE_DIR /Library/Frameworks/R.framework/Resources/share
## R_SYSTEM_ABI osx,gcc,gxx,gfortran,?
## R_TESTS
## R_TEXI2DVICMD /usr/local/bin/texi2dvi
## R_UNZIPCMD /usr/bin/unzip
## R_VERSION 3.5.3
## R_ZIPCMD /usr/bin/zip
## SED /usr/bin/sed
## SHELL /bin/bash
## SHLVL 2
## SSH_ASKPASS rpostback-askpass
## SSH_AUTH_SOCK /private/tmp/com.apple.launchd.kKbAnFdQKs/Listeners
## TAR /usr/bin/tar
## TERM xterm-256color
## TEXINPUTS .:/Library/Frameworks/R.framework/Resources/share/texmf/tex/latex:
## TMPDIR /var/folders/tr/lgwjmdgd72bckr1hj5gd_7640000gq/T/
## TWITTER_PAT /Users/rubenarslan/.rtweet_token3.rds
## USER rubenarslan
## XPC_FLAGS 0x0
## XPC_SERVICE_NAME 0
## _R_CHECK_LENGTH_1_LOGIC2_
## TRUE
## __CF_USER_TEXT_ENCODING
## 0x1F7:0x0:0x2
## __KMP_REGISTERED_LIB_47319
## 0x1096698e8-cafe51d7-libomp.dylib
## __KMP_REGISTERED_LIB_87746
## 0x106da88e8-cafec134-libomp.dylib
## __KMP_REGISTERED_LIB_88676
## 0x1055c48e8-cafe7ba6-libomp.dylib
options()
## $CBoundsCheck
## [1] FALSE
##
## $HTTPUserAgent
## [1] "R (3.5.3 x86_64-apple-darwin15.6.0 x86_64 darwin15.6.0)"
##
## $OutDec
## [1] "."
##
## $PCRE_limit_recursion
## [1] NA
##
## $PCRE_study
## [1] 10
##
## $PCRE_use_JIT
## [1] TRUE
##
## $add.smooth
## [1] TRUE
##
## $bitmapType
## [1] "quartz"
##
## $browser
## [1] "false"
##
## $browserNLdisabled
## [1] FALSE
##
## $callr.condition_handler_cli_message
## function (msg)
## {
## custom_handler <- getOption("cli.default_handler")
## if (is.function(custom_handler)) {
## custom_handler(msg)
## }
## else {
## cli_server_default(msg)
## }
## }
## <bytecode: 0x7fd5dfb8b550>
## <environment: namespace:cli>
##
## $check.bounds
## [1] FALSE
##
## $citation.bibtex.max
## [1] 1
##
## $continue
## [1] "+ "
##
## $contrasts
## unordered ordered
## "contr.treatment" "contr.poly"
##
## $defaultPackages
## [1] "datasets" "utils" "grDevices" "graphics" "stats" "methods"
##
## $demo.ask
## [1] "default"
##
## $deparse.cutoff
## [1] 60
##
## $device
## function (width = 7, height = 7, ...)
## {
## grDevices::pdf(NULL, width, height, ...)
## }
## <bytecode: 0x7fd5dd0a41c0>
## <environment: namespace:knitr>
##
## $device.ask.default
## [1] FALSE
##
## $digits
## [1] 7
##
## $dplyr.show_progress
## [1] TRUE
##
## $dvipscmd
## [1] "dvips"
##
## $echo
## [1] FALSE
##
## $editor
## [1] "vi"
##
## $encoding
## [1] "native.enc"
##
## $example.ask
## [1] "default"
##
## $expressions
## [1] 5000
##
## $fansi.css
## [1] "PRE.fansi SPAN {padding-top: .25em; padding-bottom: .25em};"
##
## $fansi.ctrl
## [1] "all"
##
## $fansi.tab.stops
## [1] 8
##
## $fansi.tabs.as.spaces
## [1] FALSE
##
## $fansi.term.cap
## [1] "bright" "256"
##
## $fansi.warn
## [1] TRUE
##
## $help.search.types
## [1] "vignette" "demo" "help"
##
## $help.try.all.packages
## [1] FALSE
##
## $install.packages.compile.from.source
## [1] "interactive"
##
## $internet.info
## [1] 2
##
## $keep.source
## [1] FALSE
##
## $keep.source.pkgs
## [1] FALSE
##
## $knitr.duplicate.label
## [1] "allow"
##
## $knitr.in.progress
## [1] TRUE
##
## $locatorBell
## [1] TRUE
##
## $mailer
## [1] "mailto"
##
## $matprod
## [1] "default"
##
## $max.print
## [1] 99999
##
## $menu.graphics
## [1] TRUE
##
## $na.action
## [1] "na.omit"
##
## $nwarnings
## [1] 50
##
## $pager
## [1] "/Library/Frameworks/R.framework/Resources/bin/pager"
##
## $papersize
## [1] "a4"
##
## $pdfviewer
## [1] "false"
##
## $pkgType
## [1] "both"
##
## $printcmd
## [1] "lpr"
##
## $prompt
## [1] "> "
##
## $repos
## CRAN
## "@CRAN@"
##
## $rl_word_breaks
## [1] " \t\n\"\\'`><=%;,|&{()}"
##
## $scipen
## [1] 0
##
## $show.coef.Pvalues
## [1] TRUE
##
## $show.error.messages
## [1] TRUE
##
## $show.signif.stars
## [1] TRUE
##
## $showErrorCalls
## [1] TRUE
##
## $str
## $str$strict.width
## [1] "no"
##
## $str$digits.d
## [1] 3
##
## $str$vec.len
## [1] 4
##
##
## $str.dendrogram.last
## [1] "`"
##
## $stringsAsFactors
## [1] TRUE
##
## $texi2dvi
## [1] "/usr/local/bin/texi2dvi"
##
## $tikzMetricsDictionary
## [1] "rmdpartials-tikzDictionary"
##
## $timeout
## [1] 60
##
## $try.outFile
## A connection with
## description "output"
## class "textConnection"
## mode "wr"
## text "text"
## opened "opened"
## can read "no"
## can write "yes"
##
## $ts.S.compat
## [1] FALSE
##
## $ts.eps
## [1] 1e-05
##
## $unzip
## [1] "/usr/bin/unzip"
##
## $useFancyQuotes
## [1] FALSE
##
## $verbose
## [1] FALSE
##
## $warn
## [1] 1
##
## $warning.length
## [1] 1000
##
## $width
## [1] 80