Running examples in ‘prof.tree-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: prof.tree
> ### Title: Summarise Output of R Sampling Profiler
> ### Aliases: print.ProfTree prof.tree
> 
> ### ** Examples
> 
> Rprof(tmp <- tempfile())
> example(glm)

glm> ## Dobson (1990) Page 93: Randomized Controlled Trial :
glm> counts <- c(18,17,15,20,10,20,25,13,12)

glm> outcome <- gl(3,1,9)

glm> treatment <- gl(3,3)

glm> data.frame(treatment, outcome, counts) # showing data
  treatment outcome counts
1         1       1     18
2         1       2     17
3         1       3     15
4         2       1     20
5         2       2     10
6         2       3     20
7         3       1     25
8         3       2     13
9         3       3     12

glm> glm.D93 <- glm(counts ~ outcome + treatment, family = poisson())

glm> anova(glm.D93)
Analysis of Deviance Table

Model: poisson, link: log

Response: counts

Terms added sequentially (first to last)


          Df Deviance Resid. Df Resid. Dev
NULL                          8    10.5814
outcome    2   5.4523         6     5.1291
treatment  2   0.0000         4     5.1291

glm> ## No test: 
glm> ##D summary(glm.D93)
glm> ## End(No test)
glm> ## Computing AIC [in many ways]:
glm> (A0 <- AIC(glm.D93))
[1] 56.76132

glm> (ll <- logLik(glm.D93))
'log Lik.' -23.38066 (df=5)

glm> A1 <- -2*c(ll) + 2*attr(ll, "df")

glm> A2 <- glm.D93$family$aic(counts, mu=fitted(glm.D93), wt=1) +
glm+         2 * length(coef(glm.D93))

glm> stopifnot(exprs = {
glm+   all.equal(A0, A1)
glm+   all.equal(A1, A2)
glm+   all.equal(A1, glm.D93$aic)
glm+ })

glm> ## No test: 
glm> ##D ## an example with offsets from Venables & Ripley (2002, p.189)
glm> ##D utils::data(anorexia, package = "MASS")
glm> ##D 
glm> ##D anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
glm> ##D                 family = gaussian, data = anorexia)
glm> ##D summary(anorex.1)
glm> ## End(No test)
glm> 
glm> # A Gamma example, from McCullagh & Nelder (1989, pp. 300-2)
glm> clotting <- data.frame(
glm+     u = c(5,10,15,20,30,40,60,80,100),
glm+     lot1 = c(118,58,42,35,27,25,21,19,18),
glm+     lot2 = c(69,35,26,21,18,16,13,12,12))

glm> summary(glm(lot1 ~ log(u), data = clotting, family = Gamma))

Call:
glm(formula = lot1 ~ log(u), family = Gamma, data = clotting)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-0.04008  -0.03756  -0.02637   0.02905   0.08641  

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.0165544  0.0009275  -17.85 4.28e-07 ***
log(u)       0.0153431  0.0004150   36.98 2.75e-09 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for Gamma family taken to be 0.002446059)

    Null deviance: 3.51283  on 8  degrees of freedom
Residual deviance: 0.01673  on 7  degrees of freedom
AIC: 37.99

Number of Fisher Scoring iterations: 3


glm> summary(glm(lot2 ~ log(u), data = clotting, family = Gamma))

Call:
glm(formula = lot2 ~ log(u), family = Gamma, data = clotting)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-0.05574  -0.02925   0.01030   0.01714   0.06371  

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.0239085  0.0013265  -18.02 4.00e-07 ***
log(u)       0.0235992  0.0005768   40.91 1.36e-09 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for Gamma family taken to be 0.001813354)

    Null deviance: 3.118557  on 8  degrees of freedom
Residual deviance: 0.012672  on 7  degrees of freedom
AIC: 27.032

Number of Fisher Scoring iterations: 3


glm> ## Aliased ("S"ingular) -> 1 NA coefficient
glm> (fS <- glm(lot2 ~ log(u) + log(u^2), data = clotting, family = Gamma))

Call:  glm(formula = lot2 ~ log(u) + log(u^2), family = Gamma, data = clotting)

Coefficients:
(Intercept)       log(u)     log(u^2)  
   -0.02391      0.02360           NA  

Degrees of Freedom: 8 Total (i.e. Null);  7 Residual
Null Deviance:	    3.119 
Residual Deviance: 0.01267 	AIC: 27.03

glm> tools::assertError(update(fS, singular.ok=FALSE), verbose=interactive())

glm> ## -> .. "singular fit encountered"
glm> 
glm> ## Not run: 
glm> ##D ## for an example of the use of a terms object as a formula
glm> ##D demo(glm.vr)
glm> ## End(Not run)
glm> 
glm> 
> Rprof(NULL)
> tree <- prof.tree(tmp)
> print(tree, limit = 20)
Error in makeActiveBinding(name, active_copies[[name]], new_slice$binding) : 
  not a function
Calls: print ... .Clone -> <Anonymous> -> copy_slice -> makeActiveBinding
Execution halted