# 1. Load the Sort data set from the SortingBeer example (available from the DistatisR package)
data(SortingBeer)
# Provide an 8 beers by 10 assessors results of a sorting task
#-----------------------------------------------------------------------------
# 2. Create the set of distance matrices (one distance matrix per assessor)
# (ues the function DistanceFromSort)
DistanceCube <- DistanceFromSort(Sort)
#-----------------------------------------------------------------------------
# 3. Call the DISTATIS routine with the cube of distance as parameter
testDistatis <- distatis(DistanceCube)
# The factor scores for the beers are in
# testDistatis$res4Splus$F
# the partial factor score for the beers for the assessors are in
# testDistatis$res4Splus$PartialF
#
# 4. Get the bootstraped factor scores (with default 1000 iterations)
BootF <- BootFactorScores(testDistatis$res4Splus$PartialF)
#-----------------------------------------------------------------------------
# 5. Create the Graphics with GraphDistatisAll
#
GraphDistatisAll(testDistatis$res4Splus$F,testDistatis$res4Splus$PartialF,
BootF,testDistatis$res4Cmat$G)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DistatisR)
Loading required package: prettyGraphs
Loading required package: car
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DistatisR/GraphDistatisAll.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GraphDistatisAll
> ### Title: This function combines the functionality of
> ### 'GraphDistatisCompromise', 'GraphDistatisPartial',
> ### 'GraphDistatisBoot', and 'GraphDistatisRv'.
> ### Aliases: GraphDistatisAll
> ### Keywords: distatis mds
>
> ### ** Examples
>
> # 1. Load the Sort data set from the SortingBeer example (available from the DistatisR package)
> data(SortingBeer)
> # Provide an 8 beers by 10 assessors results of a sorting task
> #-----------------------------------------------------------------------------
> # 2. Create the set of distance matrices (one distance matrix per assessor)
> # (ues the function DistanceFromSort)
> DistanceCube <- DistanceFromSort(Sort)
>
> #-----------------------------------------------------------------------------
> # 3. Call the DISTATIS routine with the cube of distance as parameter
> testDistatis <- distatis(DistanceCube)
> # The factor scores for the beers are in
> # testDistatis$res4Splus$F
> # the partial factor score for the beers for the assessors are in
> # testDistatis$res4Splus$PartialF
> #
> # 4. Get the bootstraped factor scores (with default 1000 iterations)
> BootF <- BootFactorScores(testDistatis$res4Splus$PartialF)
[1] Bootstrap On Factor Scores. Iterations #:
[2] 1000
> #-----------------------------------------------------------------------------
> # 5. Create the Graphics with GraphDistatisAll
> #
> GraphDistatisAll(testDistatis$res4Splus$F,testDistatis$res4Splus$PartialF,
+ BootF,testDistatis$res4Cmat$G)
dev.new(): using pdf(file="Rplots143.pdf")
dev.new(): using pdf(file="Rplots144.pdf")
dev.new(): using pdf(file="Rplots145.pdf")
dev.new(): using pdf(file="Rplots148.pdf")
$constraints
$constraints$minx
[1] -0.6325558
$constraints$maxx
[1] 0.6325558
$constraints$miny
[1] -0.6325558
$constraints$maxy
[1] 0.6325558
$item.colors
[,1]
[1,] "#305ABF"
[2,] "#84BF30"
[3,] "#BF30AD"
[4,] "#30BFA7"
[5,] "#BF7D30"
[6,] "#5430BF"
[7,] "#36BF30"
[8,] "#BF3060"
$participant.colors
[,1]
[1,] "#305ABF"
[2,] "#84BF30"
[3,] "#BF30AD"
[4,] "#30BFA7"
[5,] "#BF7D30"
[6,] "#5430BF"
[7,] "#36BF30"
[8,] "#BF3060"
[9,] "#308ABF"
[10,] "#B3BF30"
>
>
>
>
>
> dev.off()
png
2
>