Running examples in 'EpiILMCT-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: as.epidat
> ### Title: Continuous Time level information of an Epidemic
> ### Aliases: as.epidat
> 
> ### ** Examples
> 
> # Just for illustation:
> # SIR distance-based ILM for a population of 10 individuals:
> loc <- cbind(runif(10, 0, 10), runif(10,0,10))
> net <- contactnet(type = "random", num.id = 10, location = loc, beta = 0.3)
> infection <- c(2.5, 1, 0, 0, 0.5, 0, 2, 1.5, 0, 3)
> removal <- c(3.5, 2, 0, 1, 1.5, 0, 3, 2.5, 0, 4)
> id <- c(2, 1, 4, 7, 10, 3, 5, 9, 8, 6)
> epi <- as.epidat(type = "SIR", kerneltype = "distance", inf.time = infection,
+ rem.time = removal, id.individual = id, location = loc)
> epi
$type
[1] "SIR"

$kerneltype
[1] "distance"

$epidat
      id.individual rem.time inf.period inf.time
 [1,]             7      1.0          1      0.0
 [2,]            10      1.5          1      0.5
 [3,]             1      2.0          1      1.0
 [4,]             9      2.5          1      1.5
 [5,]             5      3.0          1      2.0
 [6,]             2      3.5          1      2.5
 [7,]             6      4.0          1      3.0
 [8,]             4      Inf          0      Inf
 [9,]             3      Inf          0      Inf
[10,]             8      Inf          0      Inf

$location
           [,1]     [,2]
 [1,] 2.6550866 2.059746
 [2,] 3.7212390 1.765568
 [3,] 5.7285336 6.870228
 [4,] 9.0820779 3.841037
 [5,] 2.0168193 7.698414
 [6,] 8.9838968 4.976992
 [7,] 9.4467527 7.176185
 [8,] 6.6079779 9.919061
 [9,] 6.2911404 3.800352
[10,] 0.6178627 7.774452

$network
NULL

attr(,"class")
[1] "datagen"
> # using the data set generated by using the SINR network-based ILM:
> data(NetworkDataSINR)
> names(NetworkDataSINR)
[1] "loc" "net" "cov" "epi"
> netSINR<-as.epidat(type = "SINR", kerneltype = "network", 
+ incub.time = NetworkDataSINR$epi[,4], inf.time = NetworkDataSINR$epi[,6], 
+ rem.time = NetworkDataSINR$epi[,2], id.individual = NetworkDataSINR$epi[,1], 
+ location  = NetworkDataSINR$loc, network = NetworkDataSINR$net, 
+ network.type = "powerlaw")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
EpiILMCT
 --- call from context --- 
as.epidat(type = "SINR", kerneltype = "network", incub.time = NetworkDataSINR$epi[, 
    4], inf.time = NetworkDataSINR$epi[, 6], rem.time = NetworkDataSINR$epi[, 
    2], id.individual = NetworkDataSINR$epi[, 1], location = NetworkDataSINR$loc, 
    network = NetworkDataSINR$net, network.type = "powerlaw")
 --- call from argument --- 
if (class(network) != "contactnet") {
    if (is.null(network.type)) {
        warning("The network.type option should be specified.", 
            call. = FALSE)
    }
    else if ((network.type != "random") & (is.null(location))) {
        warning("The location option (XY coordinates of individuals) should be specified.", 
            call. = FALSE)
    }
}
 --- R stacktrace ---
where 1: as.epidat(type = "SINR", kerneltype = "network", incub.time = NetworkDataSINR$epi[, 
    4], inf.time = NetworkDataSINR$epi[, 6], rem.time = NetworkDataSINR$epi[, 
    2], id.individual = NetworkDataSINR$epi[, 1], location = NetworkDataSINR$loc, 
    network = NetworkDataSINR$net, network.type = "powerlaw")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (type, kerneltype, incub.time = NULL, inf.time, rem.time, 
    id.individual, location = NULL, network = NULL, network.type = NULL) 
{
    n <- length(inf.time)
    if (kerneltype == "network" | kerneltype == "both") {
        if (is.null(network)) {
            stop("As the kerneltype is specified to \"network\" or \"both\", contact network matrix must be included in the argument via the obtion \"network\"", 
                call. = FALSE)
        }
        else {
            if (all(dim(network) == c(n, n)) == FALSE) {
                stop("The contact network matrix must be a squared matrix", 
                  call. = FALSE)
            }
        }
        if (class(network) != "contactnet") {
            if (is.null(network.type)) {
                warning("The network.type option should be specified.", 
                  call. = FALSE)
            }
            else if ((network.type != "random") & (is.null(location))) {
                warning("The location option (XY coordinates of individuals) should be specified.", 
                  call. = FALSE)
            }
        }
    }
    if (kerneltype == "distance" | kerneltype == "both") {
        if (is.null(location)) {
            stop("As the kerneltype is specified to \"distance\" or \"both\", the XY coordinates of individuals must be included in the argument via the obtion \"location\"", 
                call. = FALSE)
        }
        else {
            if (all(dim(location) == c(n, 2)) == FALSE) {
                stop("The location must be a matrix or dataframe of n rows and 2 columns", 
                  call. = FALSE)
            }
        }
    }
    if (type == "SIR") {
        if (length(rem.time) != length(inf.time)) {
            stop("The number of removal and infection times are not equal", 
                call. = FALSE)
        }
        inf.period <- rem.time - inf.time
        epi <- as.matrix(cbind(id.individual, rem.time, inf.period, 
            inf.time), ncol = 4, nrow = n)
        epi[which(epi[, 2] == 0), c(2, 4)] <- Inf
        epi[which(epi[, 2] == Inf), c(2, 4)] <- Inf
        epi[which(epi[, 2] == Inf), 3] <- 0
        eppi <- epi[order(epi[, 4]), ]
    }
    else if (type == "SINR") {
        if ((length(rem.time) != length(incub.time)) | (length(incub.time) != 
            length(inf.time))) {
            stop("The number of removal, incubation and infection times are not equal", 
                call. = FALSE)
        }
        delay.period <- rem.time - incub.time
        incub.period <- incub.time - inf.time
        epi <- as.matrix(cbind(id.individual, rem.time, delay.period, 
            incub.time, incub.period, inf.time), ncol = 6, nrow = n)
        epi[which(epi[, 2] == 0), c(2, 4, 6)] <- Inf
        epi[which(epi[, 2] == Inf), c(2, 4, 6)] <- Inf
        epi[which(epi[, 2] == Inf), c(3, 5)] <- 0
        eppi <- epi[order(epi[, 6]), ]
    }
    else {
        stop("The compartmental framework must be either SIR or SINR", 
            call. = FALSE)
    }
    outepi <- list(type = type, kerneltype = kerneltype, epidat = eppi, 
        location = location, network = network)
    class(outepi) <- "datagen"
    outepi
}
<bytecode: 0x3934258>
<environment: namespace:EpiILMCT>
 --- function search by body ---
Function as.epidat in namespace EpiILMCT has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1