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

> ### Name: predict_diagram_ksvm
> ### Title: Predict the outcome labels for a list of persistence diagrams
> ###   using a pre-trained diagram ksvm model.
> ### Aliases: predict_diagram_ksvm
> 
> ### ** Examples
> 
> 
> if(require("TDAstats"))
+ {
+   # create four diagrams
+   D1 <- TDAstats::calculate_homology(TDAstats::circle2d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   D2 <- TDAstats::calculate_homology(TDAstats::circle2d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   D3 <- TDAstats::calculate_homology(TDAstats::sphere3d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   D4 <- TDAstats::calculate_homology(TDAstats::sphere3d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   g <- list(D1,D2,D3,D4)
+ 
+   # create response vector
+   y <- as.factor(c("circle","circle","sphere","sphere"))
+ 
+   # fit model without cross validation
+   model_svm <- diagram_ksvm(diagrams = g,cv = 1,dim = c(0),
+                             y = y,sigma = c(1),t = c(1),
+                             num_workers = 2)
+ 
+   # create two new diagrams
+   D5 <- TDAstats::calculate_homology(TDAstats::circle2d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   D6 <- TDAstats::calculate_homology(TDAstats::sphere3d[sample(1:100,20),],
+                       dim = 1,threshold = 2)
+   g_new <- list(D5,D6)
+ 
+   # predict with precomputed Gram matrix
+   K <- gram_matrix(diagrams = g_new,other_diagrams = model_svm$diagrams,
+                    dim = model_svm$best_model$dim,sigma = model_svm$best_model$sigma,
+                    t = model_svm$best_model$t,num_workers = 2)
+   predict_diagram_ksvm(K = K,model = model_svm,num_workers = 2)
+ }
Loading required package: TDAstats

Attaching package: 'TDAstats'

The following object is masked from 'package:TDApplied':

    permutation_test

Error in serverSocket(port = port) : 
  creation of server socket failed: port 11585 cannot be opened
Calls: gram_matrix ... distance_matrix -> <Anonymous> -> makePSOCKcluster -> serverSocket
Execution halted