knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) # We need rprojroot to locate other files needed for the Vignette library(rprojroot) # Source a few helper/utility functions source(find_package_root_file("vignettes","utils_knitr.R")) source(find_package_root_file("vignettes","utils_roxygen.R")) # Get roxygen blocks, use force to trigger any warnings immediately blocks <- roxy_get_blocks(find_package_root_file()) blocks <- force(blocks)
r desc::desc_get("Title")
r desc::desc_get("Description")
You can install the released version of zmisc
from CRAN with:
install.packages("zmisc")
You can use pak
to install the development version of zmisc
from GitHub with:
pak::pak("torfason/zmisc")
In order to use the package, you generally want to attach it first:
library(zmisc)
The functions lookup() and lookuper() are used to look up values from a lookup
table, which can be supplied as a vector
, a list
, or a data.frame
. The functions
are in some ways similar to the Excel function VLOOKUP()
, but are designed to work smoothly
in an R workflow, in particular within pipes.
r roxy_get_section(blocks, "lookup", "title")
r roxy_get_section(blocks, "lookup", "description")
roxy_get_section(blocks, "lookup", "examples") |> kat_code()
r roxy_get_section(blocks, "lookuper", "title")
r roxy_get_section(blocks, "lookuper", "description")
roxy_get_section(blocks, "lookuper", "examples") |> kat_code()
The functions zample(), zeq(), and zingle() are intended to make your code less likely to break in mysterious ways when you encounter unexpected boundary conditions. The zample() and zeq() are almost identical to the sample() and seq() functions, but a bit safer.
r roxy_get_section(blocks, "zample", "title")
r roxy_get_section(blocks, "zample", "description")
roxy_get_section(blocks, "zample", "examples") |> kat_code()
r roxy_get_section(blocks, "zeq", "title")
r roxy_get_section(blocks, "zeq", "description")
roxy_get_section(blocks, "zeq", "examples") |> kat_code()
r roxy_get_section(blocks, "zingle", "title")
r roxy_get_section(blocks, "zingle", "description")
roxy_get_section(blocks, "zingle", "examples") |> kat_code()
The notate() function adds annotations to factor
and labelled
variables
that make it easier to see both values and labels/levels when using the View()
function
r roxy_get_section(blocks, "notate", "title")
r roxy_get_section(blocks, "notate", "description")
roxy_get_section(blocks, "notate", "examples") |> kat_code()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.