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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: interaction_detector
> ### Title: interaction detector
> ### Aliases: interaction_detector
> ### Keywords: detector interaction
> 
> ### ** Examples
> 
> data(CollectData)
> interaction_detector("incidence",c("soiltype","watershed"),CollectData)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
geodetector
 --- call from context --- 
reshapeMatrix_numeric(Intr_Result_q)
 --- call from argument --- 
if (class(dataset) == "character") dataset = t(as.matrix(dataset))
 --- R stacktrace ---
where 1: reshapeMatrix_numeric(Intr_Result_q)
where 2: interaction_detector("incidence", c("soiltype", "watershed"), 
    CollectData)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dataset) 
{
    if (class(dataset) == "character") 
        dataset = t(as.matrix(dataset))
    fldName1 <- as.vector(dataset[, 1])
    fldName2 <- as.vector(dataset[, 2])
    fldName <- unique(c(fldName1, fldName2))
    lenFld <- length(fldName)
    CreatMat <- matrix(nrow = lenFld, ncol = lenFld, dimnames = list(fldName, 
        fldName))
    lenDt <- nrow(dataset)
    for (i in 1:lenDt) {
        fld1 <- fldName1[i]
        fld2 <- fldName2[i]
        CreatMat[fld1, fld2] <- as.vector(dataset[i, 3])
        CreatMat[fld2, fld1] <- as.vector(dataset[i, 3])
    }
    T_CreatMat <- as.data.frame(CreatMat)
    return(T_CreatMat)
}
<bytecode: 0x5583e6118398>
<environment: namespace:geodetector>
 --- function search by body ---
Function reshapeMatrix_numeric in namespace geodetector has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(dataset) == "character") dataset = t(as.matrix(dataset)) : 
  the condition has length > 1
Calls: interaction_detector -> reshapeMatrix_numeric
Execution halted