File: zzz.R

package info (click to toggle)
r-cran-memisc 0.99.31.8.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,136 kB
  • sloc: ansic: 5,117; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
car_recode <- function (var, recodes, as.factor.result, levels)
  stop("package 'car' is not available")

memisc_env <- environment()


.onLoad <- function(lib,pkg){

  if(requireNamespace("car",quietly = TRUE)){
    assign("car_recode",car::recode,envir=memisc_env)
  }

  options(coef.style="default",
          show.baselevel=TRUE,
          baselevel.sep="/",
          factor.style="($f): ($l)",
          float.style="f",
          signif.symbols=c(
              "***"=.001,
              "**"=.01,
              "*"=.05
          ),
          labelled.factor.coerce.NA=FALSE,
          html.use.ampersand=FALSE,

          memisc.repr_html=TRUE,
          memisc.repr_latex=TRUE,
          mtable.show.eqnames=NA,
          codebook.chunk.size=1000,
          Simulation.chunk.size=1000,
          print.use.value.labels=TRUE,
          show.max.obs=25,
          measurement.adapt.threshold=.75,
          measurement.adapt.default="nominal"
  )

    names(.SummaryStats) <- paste0("summary.stats.",names(.SummaryStats))
    do.call(options,.SummaryStats)
}


.onUnload <- function(libpath)
{
    library.dynam.unload("memisc", libpath)
}