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

> ### Name: ChoR
> ### Title: Getting started with the ChoR package
> ### Aliases: ChoR ChoR-package
> ### Keywords: linear-log-analysis model package
> 
> ### ** Examples
> 
> # Warning: RJava requires to **copy** your data from R into a JVM.
> # If you need extra memory, use this option (here, for 4Gb) **before** loading choR.
> # Note: not needed in our case, kept for the example
> options( java.parameters = "-Xmx4g" )
> library(ChoR)
> 
> # Helper function for graph printing. Require Rgraphviz:
> # source("https://bioconductor.org/biocLite.R")
> # biocLite("Rgraphviz")
> printGraph = function(x){
+   if(requireNamespace("Rgraphviz", quietly=TRUE)){
+     attrs <- list(node=list(shape="ellipse", fixedsize=FALSE, fontsize=25))
+     Rgraphviz::plot(x, attrs=attrs)
+   } else { stop("Rgraphviz required for graph printing.") }
+ }
> 
> 
> ###### MUSHROOM #####
> # We are using a partial UCI mushroom data set (the example should not be too long)
> MR.url = system.file("extdata", "mushrooms.csv", package = "ChoR", mustWork = TRUE)
> 
> MR.data =
+   read.csv(
+               MR.url,
+               header            = TRUE,             # Here, we have a header
+               na.strings        = c("NA","?",""),   # Configure the missing values
+               stringsAsFactors  = FALSE,            # Keep strings for now
+               check.names       = TRUE              # Replace some special characters
+             )
> 
> # This file has a special line with types. You can check this with MR.data[1,].
> # Let's remove it:
> MR.data = MR.data[-1, ]
> 
> # Launch the SMT analysis, with:
> # ## default pValueThreshold=0.05
> # ## computation of attributes cardinality from the data
> MR.res = ChoR.SMT(MR.data)
> 
> # Access the result:
> # ## As a list of cliques:
> NR.cl = ChoR.as.cliques(MR.res)
> print(NR.cl)
[[1]]
[1] "type"        "cap_shape"   "bruises"     "stalk_shape" "stalk_root" 

[[2]]
[1] "type"        "bruises"     "stalk_shape" "stalk_root"  "population" 

[[3]]
[1] "cap_color"   "bruises"     "stalk_shape" "stalk_root"  "population" 

[[4]]
[1] "cap_color"    "bruises"      "gill_spacing" "stalk_shape"  "population"  

[[5]]
[1] "cap_surface"  "bruises"      "gill_spacing" "stalk_shape"  "population"  

[[6]]
[1] "cap_surface"              "bruises"                 
[3] "gill_spacing"             "stalk_surface_below_ring"
[5] "population"              

[[7]]
[1] "type"        "bruises"     "stalk_shape" "stalk_root"  "habitat"    

[[8]]
[1] "type"        "bruises"     "odor"        "stalk_shape"

[[9]]
[1] "type"        "gill_size"   "stalk_shape" "stalk_root" 

[[10]]
[1] "bruises"     "gill_color"  "stalk_shape" "stalk_root" 

[[11]]
[1] "type"              "gill_size"         "stalk_shape"      
[4] "spore_print_color"

[[12]]
[1] "bruises"                  "gill_spacing"            
[3] "stalk_surface_above_ring"

[[13]]
[1] "gill_spacing"           "stalk_shape"            "stalk_color_above_ring"

[[14]]
[1] "gill_spacing"           "stalk_shape"            "stalk_color_below_ring"

[[15]]
[1] "bruises"      "gill_spacing" "ring_type"   

[[16]]
[1] "gill_attachment"

[[17]]
[1] "veil_type"

[[18]]
[1] "veil_color"

[[19]]
[1] "ring_number"

> # ## As a formula
> NR.fo = ChoR.as.formula(MR.res)
> print(NR.fo)
~type * cap_shape * bruises * stalk_shape * stalk_root + type * 
    bruises * stalk_shape * stalk_root * population + cap_color * 
    bruises * stalk_shape * stalk_root * population + cap_color * 
    bruises * gill_spacing * stalk_shape * population + cap_surface * 
    bruises * gill_spacing * stalk_shape * population + cap_surface * 
    bruises * gill_spacing * stalk_surface_below_ring * population + 
    type * bruises * stalk_shape * stalk_root * habitat + type * 
    bruises * odor * stalk_shape + type * gill_size * stalk_shape * 
    stalk_root + bruises * gill_color * stalk_shape * stalk_root + 
    type * gill_size * stalk_shape * spore_print_color + bruises * 
    gill_spacing * stalk_surface_above_ring + gill_spacing * 
    stalk_shape * stalk_color_above_ring + gill_spacing * stalk_shape * 
    stalk_color_below_ring + bruises * gill_spacing * ring_type + 
    gill_attachment + veil_type + veil_color + ring_number
<environment: 0x00000000108ed0b0>
> # ## As a graph
> if(requireNamespace("graph", quietly=TRUE)){
+   NR.gr = ChoR.as.graph(MR.res)
+   printGraph(NR.gr)
+ } else {
+   print("'graph' package not installed; Skipping 'as graph' example.")
+ }
Warning in .local(from, to, graph) : edges replaced: 'type|bruises'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_shape'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|population'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|population'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_root|population'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_color|bruises'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_color|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_color|population'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|population'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|population'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|gill_spacing'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|population'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_spacing|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_spacing|population'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|population'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_surface|bruises'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_surface|gill_spacing'
Warning in .local(from, to, graph) :
  edges replaced: 'cap_surface|population'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|gill_spacing'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|population'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_spacing|population'
Warning in .local(from, to, graph) : edges replaced: 'type|bruises'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_shape'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|stalk_root'
Warning in .local(from, to, graph) : edges replaced: 'type|bruises'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_shape'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|stalk_root'
Warning in .local(from, to, graph) :
  edges replaced: 'stalk_shape|stalk_root'
Warning in .local(from, to, graph) : edges replaced: 'type|gill_size'
Warning in .local(from, to, graph) : edges replaced: 'type|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_size|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|gill_spacing'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_spacing|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'gill_spacing|stalk_shape'
Warning in .local(from, to, graph) :
  edges replaced: 'bruises|gill_spacing'
Error in printGraph(NR.gr) : Rgraphviz required for graph printing.
Execution halted