inst/doc/derive.R

## ---- results='hide', echo=FALSE, message=FALSE-----------------------------------------------------------------------
library(crunch)
load("vignettes.RData")
options(width=120)

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  ds$age <- 2015 - ds$birthyr

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  summary(ds$age)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
age.summary.before

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  summary(ds$birthyr)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
by.summary.before

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  class(2015 - ds$birthyr)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
class(cr.expr)

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  ds$birthyr[ds$birthyr < 1945] <- 1945

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  summary(ds$birthyr)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
by.summary.after

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  summary(ds$age)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
age.summary.after

## ---- eval=FALSE------------------------------------------------------------------------------------------------------
#  class(ds$birthyr < 1945)

## ---- echo=FALSE------------------------------------------------------------------------------------------------------
class(cr.log.expr)

Try the crunch package in your browser

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

crunch documentation built on Aug. 31, 2023, 1:07 a.m.