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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: DataMethods
> ### Title: Methods for response, tccov, tvcov, and repeated Data Objects
> ### Aliases: DataMethods as.data.frame as.data.frame.repeated
> ###   as.data.frame.response as.data.frame.tccov as.data.frame.tvcov
> ###   as.matrix as.matrix.repeated as.matrix.response as.matrix.tccov
> ###   as.matrix.tvcov coef.gnlm covariates covariates.tccov
> ###   covariates.tvcov covariates.repeated covind covind.default delta
> ###   delta.response delta.repeated description description.default
> ###   description.repeated deviance.gnlm df.residual.gnlm formula
> ###   formula.tccov formula.repeated names names.response names.tccov
> ###   names.tvcov names.repeated nesting nesting.response nesting.repeated
> ###   nobs nobs.default nobs.response nobs.tvcov nobs.data.frame
> ###   plot.response plot.repeated print.response print.tccov print.tvcov
> ###   print.repeated print.fmobj print.gnlm response response.response
> ###   response.repeated resptype resptype.response resptype.repeated times
> ###   times.default times.response transform transform.response
> ###   transform.tccov transform.tvcov transform.repeated units
> ###   units.default units.repeated vcov.gnlm weights weights.response
> ###   weights.repeated weights.gnlm
> ### Keywords: manip
> 
> ### ** Examples
> 
> # set up some data and create the objects
> #
> y <- matrix(rnorm(20),ncol=5)
> tt <- c(1,3,6,10,15)
> print(resp <- restovec(y, times=tt, units="m", type="duration"))
               
Name:  y       
Type:  duration
Units: m       
Number of individuals:                 4 
Total number of observations:          20 
Number of observations per individual: 5 
Mean response:                         0.1905239 
Range of responses:                    -2.2147 1.595281 
Mean time:                             7 
Range of times:                        1 15 
Mean total time:                       15 
Range of total times:                  15 15 
> x <- c(0,0,1,1)
> x2 <- as.factor(c("a","b","a","b"))
> tcc <- tcctomat(data.frame(x=x,x2=x2))
> z <- matrix(rpois(20,5),ncol=5)
> tvc <- tvctomat(z)
> print(reps <- rmna(resp, tvcov=tvc, ccov=tcc))

Response variable:
               
Name:  y       
Type:  duration
Units: m       
Number of individuals:                 4 
Total number of observations:          20 
Number of observations per individual: 5 
Mean response:                         0.1905239 
Range of responses:                    -2.2147 1.595281 
Mean time:                             7 
Range of times:                        1 15 
Mean total time:                       15 
Range of total times:                  15 15 

Inter-unit (time-constant) covariates:
           
Names: x x2
Number of individuals:              4 

Intra-unit (time-varying) covariates:
        
Names: z
Number of individuals:                4 
Number of observations:               20 
Number of observations per individual:
 5 5 5 5 
> #
> plot(resp)
> plot(reps)
> plot(reps, nind=1:2)
> plot(reps, ccov=c(0,1))
> plot(reps, ccov="x2")
> plot(reps, name="z", nind=3:4, pch=1:2)
> plot(reps, name="z", ccov="x2")
> #
> response(resp)
          1           2           3           4           5           6 
-0.62645381  0.32950777  0.57578135 -0.62124058 -0.01619026  0.18364332 
          7           8           9          10          11          12 
-0.82046838 -0.30538839 -2.21469989  0.94383621 -0.83562861  0.48742905 
         13          14          15          16          17          18 
 1.51178117  1.12493092  0.82122120  1.59528080  0.73832471  0.38984324 
         19          20 
-0.04493361  0.59390132 
> response(transform(resp, y=1/y))
          1           2           3           4           5           6 
 -1.5962869   3.0348298   1.7367704  -1.6096824 -61.7655188   5.4453382 
          7           8           9          10          11          12 
 -1.2188160  -3.2745188  -0.4515284   1.0595059  -1.1967039   2.0515806 
         13          14          15          16          17          18 
  0.6614714   0.8889435   1.2176987   0.6268489   1.3544176   2.5651336 
         19          20 
-22.2550563   1.6837814 
> response(reps)
          1           2           3           4           5           6 
-0.62645381  0.32950777  0.57578135 -0.62124058 -0.01619026  0.18364332 
          7           8           9          10          11          12 
-0.82046838 -0.30538839 -2.21469989  0.94383621 -0.83562861  0.48742905 
         13          14          15          16          17          18 
 1.51178117  1.12493092  0.82122120  1.59528080  0.73832471  0.38984324 
         19          20 
-0.04493361  0.59390132 
> response(reps, nind=2:3)
         6          7          8          9         10         11         12 
 0.1836433 -0.8204684 -0.3053884 -2.2146999  0.9438362 -0.8356286  0.4874291 
        13         14         15 
 1.5117812  1.1249309  0.8212212 
> response(transform(reps,y=1/y))
          1           2           3           4           5           6 
 -1.5962869   3.0348298   1.7367704  -1.6096824 -61.7655188   5.4453382 
          7           8           9          10          11          12 
 -1.2188160  -3.2745188  -0.4515284   1.0595059  -1.1967039   2.0515806 
         13          14          15          16          17          18 
  0.6614714   0.8889435   1.2176987   0.6268489   1.3544176   2.5651336 
         19          20 
-22.2550563   1.6837814 
> #
> times(resp)
 [1]  1  3  6 10 15  1  3  6 10 15  1  3  6 10 15  1  3  6 10 15
> times(transform(resp,times=times-6))
 [1] -5 -3  0  4  9 -5 -3  0  4  9 -5 -3  0  4  9 -5 -3  0  4  9
> times(reps)
 [1]  1  3  6 10 15  1  3  6 10 15  1  3  6 10 15  1  3  6 10 15
> #
> delta(resp)
NULL
> delta(reps)
NULL
> delta(transform(reps,y=1/y))
[1] 1
 [1]    2.5481318    9.2101918    3.0163714    2.5910773 3814.9793140
 [6]   29.6517076    1.4855125   10.7224730    0.2038779    1.1225527
[11]    1.4321002    4.2089831    0.4375444    0.7902205    1.4827902
[16]    0.3929395    1.8344471    6.5799106  495.2875325    2.8351198
> delta(transform(reps,y=1/y), nind=3)
[1] 1
[1] 1.4321002 4.2089831 0.4375444 0.7902205 1.4827902
> #
> nobs(resp)
[1] 5 5 5 5
> nobs(tvc)
[1] 5 5 5 5
> nobs(reps)
[1] 5 5 5 5
> #
> units(resp)
Error in UseMethod("units") : 
  no applicable method for 'units' applied to an object of class "response"
Calls: units
Execution halted