This file is indexed.

/usr/lib/R/site-library/surveillance/NAMESPACE is in r-cran-surveillance 1.13.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
### Load C code

useDynLib(surveillance)

importFrom(Rcpp, evalCpp) # see vignette("Rcpp-package", package="Rcpp")
## although Rcpp is only used on C-level we need to "ensure that Rcpp is loaded
## so any dynamic linking to its code can be resolved.  (There may be none, but
## there could be, now or in future.)" (B. Ripley, 2013-09-08)

###############
### IMPORTS ###
###############

### Import all packages listed as Depends
### (for utils and polyCub: only selected methods are imported)

import(methods, grDevices, graphics, stats)

## sp classes & utilities (bbox, coordinates, dimensions, overlay, plot, ...)
## (we "Depend" on package sp since it defines essential data classes & methods)
import(sp)

## we define own methods for generating xtable()'s, which we want to be useable
import(xtable)


### required generics for own methods (that's why we "Depend" on these packages)

## importFrom(stats, coef, vcov, logLik, nobs, residuals, confint, AIC, extractAIC,
##                   profile, simulate, update, terms, add1, drop1, predict, as.stepfun)
importFrom(utils, head, tail, toLatex)


### required functions from utils and stats

## importFrom(stats, pnorm, cov2cor, ks.test, formula, rnorm, runif, step, dist,
##                   update.formula, terms.formula, rpois, rnbinom, setNames,
##                   na.omit, as.formula, pnbinom, qnbinom, qnorm, sd, glm, optim,
##                   poisson, ppois, qpois, predict.glm, summary.glm, quasipoisson,
##                   glm.fit) ## and many more...
importFrom(utils, packageVersion, modifyList, capture.output, read.table, data,
                  setTxtProgressBar, txtProgressBar, sessionInfo, head.matrix,
                  str, flush.console, write.table, as.roman, tail.matrix,
                  methods)


### sampling from mv.Gausian for OSAIC weights (twinSIR) and iafplot (twinstim)

importFrom(MASS, mvrnorm)


### disProg-specific

importFrom(MASS, glm.nb)   # for algo.glrnb
##importFrom(msm, msm, hmmPois, viterbi.msm)   # for algo.hmm()
##importFrom(spc, xcusum.arl, xcusum.crit)     # for find.kh()
## (packages msm and spc are now "suggested", not imported)


### hhh4-specific

importFrom(MASS, ginv, negative.binomial)
importFrom(Matrix, Matrix)
importClassesFrom(Matrix, ddiMatrix)
importMethodsFrom(Matrix, coerce, forceSymmetric)
## sparse matrix methods provide a significant speed-up in marFisher
importFrom(nlme, fixef, ranef)
export(fixef, ranef)  # we define corresponding methods for "hhh4" models


### twinSIR-specific

# for use in computing OSAIC weights by simulation
#importFrom(quadprog, solve.QP)   # moved to "Suggests"


### twinstim-specific

importFrom(spatstat, area.owin, as.im.function, coords.ppp, diameter,
                     diameter.owin, disc, edges, inside.owin, intersect.owin,
                     is.polygonal, as.polygonal, nncross.ppp, ppp, runifpoint,
                     shift.owin, spatstat.options, vertices)
importFrom(spatstat, marks)
export(marks)                           # we define an epidataCS-method
importFrom(spatstat, multiplicity)
export(multiplicity)                    # we define a Spatial-method

## Note: we depend on instead of import package polyCub to avoid "::" references
##       in some of the siaf.* generators which create functions in .GlobalEnv
importFrom(polyCub, polyCub, .polyCub.iso, polyCub.SV, polyCub.midpoint, xylist)
importMethodsFrom(polyCub, coerce)

importFrom(MASS, kde2d, truehist)



###############
### EXPORTS ###
###############


### general exports

export(surveillance.options, reset.surveillance.options)
export(animate)          # new S3-generic
export(R0)               # new S3-generic
export(intensityplot)    # new S3-generic
export(formatPval)       # yapf -- yet another p-value formatter
export(anscombe.residuals)
export(magic.dim, primeFactors, bestCombination)   # similar to n2mfrow
export(isoWeekYear) #extract ISO 8601 date
export(formatDate)  #ISO 8601 compatible %G and %V format( ) function.
export(refvalIdxByDate)
export(ks.plot.unif)
export(checkResidualProcess)       # for twinstim and twinSIR
export(qlomax)                     # quantile function of the Lomax distribution
export(plapply)

# spatial utilities
export(discpoly)
#export(runifdisc)           # CAVE: spatstat has similar function of same name
export(unionSpatialPolygons)
export(inside.gpc.poly)
S3method(scale, gpc.poly)   # redefined method for gpc.poly in spatial_stuff.R
S3method(diameter, gpc.poly)
export(nbOrder)
export(poly2adjmat)
export(polyAtBorder)
export(layout.labels)
export(layout.scalebar)

# randomly break tied event times or coordinates
export(untie)                           # new S3-generic
#export(untie.default, untie.matrix, untie.epidataCS)
S3method(untie, default)
S3method(untie, matrix)
S3method(untie, epidataCS)

# intersection of a polygonal and a circular domain
export(intersectPolyCircle)
S3method(intersectPolyCircle, owin)
S3method(intersectPolyCircle, SpatialPolygons)
S3method(intersectPolyCircle, gpc.poly)

# little helper: multiplicity of points
S3method(multiplicity, Spatial)

# list coefficients by model component
export(coeflist)
S3method(coeflist, default)
S3method(coeflist, twinstim)
S3method(coeflist, simEpidataCS)
S3method(coeflist, hhh4)

# Spatio-temporal cluster detection
export(stcd)

# tests for space-time interaction
export(knox)
S3method(print, knox)
S3method(plot, knox)
S3method(xtable, knox)
S3method(toLatex, knox)
export(stKtest)
S3method(plot, stKtest)

# PIT histograms
export(pit)
export(pit.default)
S3method(pit, default)
S3method(pit, oneStepAhead)
S3method(pit, hhh4)
S3method(plot, pit)

# calibration test for Poisson or NegBin predictions
export(calibrationTest)
S3method(calibrationTest, default)
export(calibrationTest.default)
export(dss, logs, rps)  # ses, nses


### sts(BP|NC)-specific

export(sts)
exportClasses(sts, stsBP)
export(linelist2sts)
export(animate_nowcasts)

# conversion of "sts" objects
S3method(as.ts, sts)
export(as.xts.sts)  # no registered S3-method since we only suggest "xts"

# generics for sts class defined in sts.R
exportMethods("[", plot)
exportMethods(toLatex)
exportMethods(dim, dimnames, epochInYear, year)
exportMethods(aggregate)
exportMethods(as.data.frame)

# methods for accessing/replacing slots of an sts object (cf. AllGeneric.R)
exportMethods(epoch,observed,alarms,upperbound,population,control,multinomialTS,neighbourhood)
exportMethods("epoch<-","observed<-","alarms<-","upperbound<-","population<-","control<-","multinomialTS<-","neighbourhood<-")
# methods for accessing/replacing slots of an stsNC object
exportMethods(reportingTriangle,delayCDF,score,predint)

# plot variants
export(stsplot_space)
export(stsplot_time, stsplot_time1, stsplot_alarm)
export(addFormattedXAxis, atChange, at2ndChange, atMedian) #for time axis formatting
export(stsplot_spacetime) # old implementation of (animated) map
S3method(animate, sts)    # S3-method for an S4 class, see ?Methods

# outbreak detection algorithms (sts-interfaces)
export(wrap.algo, farrington, bayes, rki, cusum, glrpois, glrnb, outbreakP, boda) # FIXME: rogerson, hmm ??
export(earsC)
export(farringtonFlexible)
export(categoricalCUSUM, pairedbinCUSUM, pairedbinCUSUM.runlength)
export(nowcast, backprojNP)
export(bodaDelay)


# sts creation functions
export(sts_creation)
export(sts_observation)

### disProg-specific

export(create.disProg, readData, toFileDisProg)
S3method(print, disProg)
S3method(plot, disProg)
S3method(plot, disProg.one)
S3method(aggregate, disProg)

export(sim.pointSource, sim.seasonalNoise)
export(LRCUSUM.runlength, arlCusum, find.kh, findH, hValues, findK)
export(compMatrix.writeTable, correct53to52, enlargeData)
export(makePlot)
export(estimateGLRNbHook)
export(algo.compare, algo.quality, algo.summary)

## outbreak detection algorithms (old disProg implementations)
export(algo.bayes, algo.bayes1, algo.bayes2, algo.bayes3,
       algo.bayesLatestTimepoint,
       algo.call,
       algo.cdc, algo.cdcLatestTimepoint,
       algo.cusum,
       algo.farrington,
       algo.glrnb, algo.glrpois,
       algo.hhh, algo.hhh.grid,
       algo.hmm,
       algo.outbreakP,
       algo.rki, algo.rki1, algo.rki2, algo.rki3, algo.rkiLatestTimepoint,
       algo.rogerson,
       algo.twins)

## auxiliary functions for algo.farrington (FIXME: why export these internals?)
export(algo.farrington.assign.weights,
       algo.farrington.fitGLM, algo.farrington.fitGLM.fast,
       algo.farrington.fitGLM.populationOffset, algo.farrington.threshold)


S3method(plot, atwins)
S3method(plot, survRes)
S3method(plot, survRes.one)
S3method(print, algoQV)
S3method(xtable, algoQV)

export(test, testSim)   # FIXME: remove these test functions? -> Demo?


### conversion between old disProg and new sts classes

export(disProg2sts)
export(sts2disProg)


### twinSIR-specific

export(cox)
export(as.epidata)
S3method(as.epidata, data.frame)
export(as.epidata.data.frame)
S3method(as.epidata, default)
export(as.epidata.default)
export(intersperse)
export(twinSIR)
export(stateplot)
export(simEpidata)

S3method(update, epidata)
S3method("[", epidata)
S3method(print, epidata)
S3method(summary, epidata)
S3method(print, summary.epidata)
S3method(plot, epidata)
S3method(animate, epidata)
S3method(plot, summary.epidata)
S3method(animate, summary.epidata)

S3method(print, twinSIR)
S3method(summary, twinSIR)
S3method(print, summary.twinSIR)
S3method(plot, twinSIR)
S3method(intensityplot, twinSIR)
export(intensityplot.twinSIR)           # for convenience
S3method(profile, twinSIR)
S3method(plot, profile.twinSIR)
S3method(vcov, twinSIR)
S3method(logLik, twinSIR)
S3method(AIC, twinSIR)
S3method(extractAIC, twinSIR)
S3method(simulate, twinSIR)
export(simulate.twinSIR)                # for convenience
S3method(residuals, twinSIR)

S3method(intensityplot, simEpidata)
export(intensityplot.simEpidata)        # for convenience


### twinstim-specific

export(as.epidataCS)
export(glm_epidataCS)
export(twinstim)
export(simEpidataCS)
export(siaf,
       siaf.constant, siaf.step,
       siaf.gaussian,
       siaf.powerlaw, siaf.powerlawL, siaf.student)
export(tiaf,
       tiaf.constant, tiaf.step,
       tiaf.exponential)
export(epidataCS2sts)
export(epitest)
S3method(coef, epitest)
S3method(plot, epitest)
export(getSourceDists)

S3method(nobs, epidataCS)
S3method("[", epidataCS)
S3method(update, epidataCS)
export(update.epidataCS)                # for convenience
export(permute.epidataCS)
S3method(head, epidataCS)
S3method(tail, epidataCS)
S3method(print, epidataCS)
S3method(subset, epidataCS)
S3method(summary, epidataCS)
S3method(print, summary.epidataCS)
S3method(as.stepfun, epidataCS)
S3method(animate, epidataCS)
export(animate.epidataCS)               # for convenience
S3method(marks, epidataCS)
export(marks.epidataCS)            # for convenience since its a foreign generic
S3method(plot, epidataCS)
export(epidataCSplot_time, epidataCSplot_space)
S3method(as.epidata, epidataCS)
export(as.epidata.epidataCS)            # for convenience

S3method(print, twinstim)
S3method(summary, twinstim)
export(summary.twinstim)                # for convenience
S3method(print, summary.twinstim)
S3method(toLatex, summary.twinstim)
S3method(xtable, summary.twinstim)
export(xtable.summary.twinstim)         # for xtable.twinstim
S3method(xtable, twinstim)
S3method(plot, twinstim)
export(iafplot)
export(intensity.twinstim)
S3method(intensityplot, twinstim)
export(intensityplot.twinstim)          # for convenience
S3method(profile, twinstim)
S3method(coef, summary.twinstim)
S3method(vcov, twinstim)
S3method(vcov, summary.twinstim)
S3method(logLik, twinstim)
S3method(extractAIC, twinstim)
S3method(nobs, twinstim)
S3method(simulate, twinstim)
export(simulate.twinstim)               # for convenience
S3method(R0, twinstim)
export(simpleR0)
S3method(residuals, twinstim)
S3method(update, twinstim)
export(update.twinstim)                 # for convenience
S3method(terms, twinstim)
S3method(all.equal, twinstim)

export(stepComponent)
S3method(terms, twinstim_stependemic)
S3method(terms, twinstim_stepepidemic)
S3method(update, twinstim_stependemic)
S3method(update, twinstim_stepepidemic)
S3method(add1, twinstim)
S3method(add1, twinstim_stependemic)
S3method(add1, twinstim_stepepidemic)
S3method(drop1, twinstim)
S3method(drop1, twinstim_stependemic)
S3method(drop1, twinstim_stepepidemic)

S3method(residuals, simEpidataCS)
S3method(R0, simEpidataCS)
S3method(intensityplot, simEpidataCS)
export(intensityplot.simEpidataCS)      # for convenience
S3method(print, simEpidataCSlist)
S3method("[[", simEpidataCSlist)
S3method(plot, simEpidataCSlist)


### algo.hhh-specific

export(algo.hhh)
export(algo.hhh.grid)
export(create.grid)

S3method(print, ah)
S3method(coef, ah)
S3method(predict, ah)
S3method(residuals, ah)
S3method(logLik, ah)

S3method(print, ahg)
S3method(coef, ahg)
S3method(predict, ahg)
S3method(residuals, ahg)
S3method(logLik, ahg)

export(simHHH, simHHH.default)
S3method(simHHH, default)
S3method(simHHH, ah)


### hhh4-specific

## main functions
export(hhh4)
export(addSeason2formula)
export(zetaweights, W_powerlaw)
export(W_np)
export(oneStepAhead)
export(scores)
export(permutationTest)

## S3-methods
S3method(print, hhh4)
S3method(summary, hhh4)
S3method(print, summary.hhh4)
S3method(nobs, hhh4)
S3method(logLik, hhh4)
S3method(formula, hhh4)
S3method(terms, hhh4)
S3method(coef, hhh4)
S3method(vcov, hhh4)
S3method(fixef, hhh4)
S3method(ranef, hhh4)
S3method(confint, hhh4)
S3method(residuals, hhh4)
S3method(predict, hhh4)
S3method(update, hhh4)
S3method(all.equal, hhh4)
S3method(simulate, hhh4)
S3method(plot, hhh4)
export(plotHHH4_fitted, plotHHH4_fitted1,
       plotHHH4_season, getMaxEV_season,
       plotHHH4_maxEV, getMaxEV,
       plotHHH4_maps, plotHHH4_ri,
       plotHHH4_neweights)

#S3method(scores, default)  # rather an internal auxiliary function, undocumented
S3method(scores, hhh4)
S3method(scores, oneStepAhead)
S3method(calibrationTest, hhh4)
S3method(calibrationTest, oneStepAhead)

## methods for simulations from hhh4 fits
S3method(aggregate, hhh4sims)
S3method(plot, hhh4sims)
export(as.hhh4simslist)
S3method(as.hhh4simslist, hhh4sims)
S3method(as.hhh4simslist, list)
S3method(as.hhh4simslist, hhh4simslist)
S3method("[", hhh4simslist)
S3method("[[", hhh4simslist)
S3method(aggregate, hhh4simslist)
S3method(plot, hhh4simslist)
export(plotHHH4sims_size)
export(plotHHH4sims_time)
S3method(scores, hhh4sims)
S3method(scores, hhh4simslist)