profile_do: Make profile.do for Markdown

Description Usage Arguments Value Examples

View source: R/profile_do.R

Description

Creates a profile.do that will run before every code chunk. Helpful for reading in the same data sets or setting options

Usage

1
profile_do(dataset, ...)

Arguments

dataset

Data set to read in, path to .dta. If NULL, no data set is read in

...

additional Stata code to put in profile.do

Value

Nothing

Examples

1
2
3
4
5
6
filename = "cars.dta"
haven::write_dta(data = datasets::cars, path = filename, version = 13)
statamd::profile_do(dataset = filename)
readLines("profile.do")
file.remove(filename)
file.remove("profile.do")

muschellij2/statamd documentation built on May 29, 2019, 2:53 p.m.