Debian Codegraph @

R/zzz.R

raw
1 car_recode <- function (var, recodes, as.factor.result, levels)
2 stop("package 'car' is not available")
3
4 memisc_env <- environment()
5
6
7 .onLoad <- function(lib,pkg){
8
9 if(requireNamespace("car",quietly = TRUE)){
10 assign("car_recode",car::recode,envir=memisc_env)
11 }
12
13 options(coef.style="default",
14 show.baselevel=TRUE,
15 baselevel.sep="/",
16 factor.style="($f): ($l)",
17 float.style="f",
18 signif.symbols=c(
19 "***"=.001,
20 "**"=.01,
21 "*"=.05
22 ),
23 labelled.factor.coerce.NA=FALSE,
24 html.use.ampersand=FALSE,
25
26 memisc.repr_html=TRUE,
27 memisc.repr_latex=TRUE,
28 mtable.show.eqnames=NA,
29 codebook.chunk.size=1000,
30 Simulation.chunk.size=1000,
31 print.use.value.labels=TRUE,
32 show.max.obs=25,
33 measurement.adapt.threshold=.75,
34 measurement.adapt.default="nominal"
35 )
36
37 names(.SummaryStats) <- paste0("summary.stats.",names(.SummaryStats))
38 do.call(options,.SummaryStats)
39 }
40
41
42 .onUnload <- function(libpath)
43 {
44 library.dynam.unload("memisc", libpath)
45 }