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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: caSegmentation
> ### Title: Function caSegmentation divides respondents on clusters
> ### Aliases: caSegmentation
> ### Keywords: multivariate
> 
> ### ** Examples
> 
> #Example 1
> library(conjoint)
> require(fpc)
Loading required package: fpc
> data(tea)
> segments<-caSegmentation(tprefm,tprof)
> print(segments$seg)
K-means clustering with 2 clusters of sizes 41, 59

Cluster means:
      [,1]     [,2]     [,3]     [,4]     [,5]     [,6]     [,7]     [,8]
1 5.462780 2.841049 1.294707 4.443268 1.933732 4.032756 1.486415 1.323293
2 4.032305 5.442966 4.127712 5.706881 5.385339 3.555508 4.419915 3.294966
      [,9]     [,10]    [,11]     [,12]     [,13]
1 3.011098 0.4260244 3.537927 0.4669024 0.6669024
2 2.603441 2.8281525 5.593271 6.0944915 6.0334746

Clustering vector:
  [1] 2 2 2 2 2 1 2 1 2 2 2 2 1 1 1 1 2 1 2 1 1 2 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2
 [38] 1 1 1 1 2 1 2 1 2 2 1 1 1 2 1 1 1 2 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 2 1 2 2
 [75] 2 2 2 1 2 2 2 2 2 2 1 1 1 1 2 1 2 1 2 1 1 2 1 2 2 2

Within cluster sum of squares by cluster:
[1] 1857.045 4655.268
 (between_SS / total_SS =  29.7 %)

Available components:

[1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
[6] "betweenss"    "size"         "iter"         "ifault"      
> plotcluster(segments$util,segments$sclu)
> 
> #Example 2
> library(conjoint)
> require(fpc)
> data(tea)
> segments<-caSegmentation(tpref,tprof,3)
> print(segments$seg)
K-means clustering with 3 clusters of sizes 40, 40, 20

Cluster means:
      [,1]   [,2]   [,3]     [,4]   [,5]     [,6]     [,7]     [,8]     [,9]
1 5.480275 2.9381 1.3681 4.540275 1.9731 3.782900 1.382900 0.965750 2.820750
2 4.754975 4.6918 3.6718 6.964975 6.6918 3.500525 4.385525 2.717225 3.062225
3 2.623500 6.6211 4.7511 2.933500 2.5211 4.189050 4.549050 5.066950 2.086950
     [,10]    [,11]    [,12]    [,13]
1 0.111225 3.450750 0.442900 0.692900
2 1.840925 6.292225 6.595525 7.105525
3 5.312100 4.266950 4.859050 3.569050

Clustering vector:
  [1] 2 3 2 2 2 1 2 3 2 2 2 2 1 1 1 1 3 1 3 1 1 2 1 2 3 2 3 3 2 2 1 2 3 2 2 2 2
 [38] 1 1 1 1 3 1 3 1 2 2 1 1 1 2 1 1 1 2 2 1 2 1 3 1 1 2 3 3 2 1 1 1 2 2 1 2 3
 [75] 2 2 2 1 2 2 3 3 2 2 1 1 1 1 3 1 3 1 3 1 1 2 1 3 2 2

Within cluster sum of squares by cluster:
[1] 1605.654 2690.267 1131.293
 (between_SS / total_SS =  41.4 %)

Available components:

[1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
[6] "betweenss"    "size"         "iter"         "ifault"      
> plotcluster(segments$util,segments$sclu)
> 
> #example 3
> library(conjoint)
> require(fpc)
> require(broom)
Loading required package: broom
> require(ggplot2)
Loading required package: ggplot2
> data(tea)
> segments<-caSegmentation(tprefm,tprof,3)
> dcf<-discrcoord(segments$util,segments$sclu)
> assignments<-augment(segments$segm,dcf$proj[,1:2])
> ggplot(assignments)+geom_point(aes(x=X1,y=X2,color= .cluster))+labs(color="Cluster Assignment",
+ title="K-Means Clustering Results")
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... push.vp.vpTree -> push.vp -> push.vp.viewport -> grid.Call.graphics
Execution halted