Friedman Test with R

Data Description:

Cyclamate has been widely used as a sweetener in soft drinks for years, but recently, it has been suspected that it can be a possible carcinogen.
The dataset "cyclamate.txt" located at "http://ramanujan.math.trinity.edu/ekwessi/misc/cyclamate.txt" shows a comparison of three laboratory methods for determining the percentage of sodium cyclamate in commercially produced orange drink. All three methods were applied to each of 12 samples.

We would like to use the Friedman Test to determine there is statistically significant difference in the three methods. 
We will test the null hypothesis that the three median percentages of sodium cyclamate are the same versus the alternative that at least two of them are not equal.

Analysis:

The Friedman test is performed in R using the command "friedman.test" in the base package "stats". Note its input needs to be a vector or a matrix.

>cycl<-read.table(file="http://ramanujan.math.trinity.edu/ekwessi/misc/cyclamate.txt", header=T)    # Loading the data into the R-workspace
>head(cyclamate)
 
Sample PicrylChloride Davies  AOAC

1      1          0.598  0.628 0.632
2      2          0.614  0.628 0.630
3      3          0.600  0.600 0.622
4      4          0.580  0.612 0.584
5      5          0.596  0.600 0.650
6      6          0.592  0.628 0.606

>is.matrix(cycl)                                 #Testing if the dataset cycl in the R-workspace is a matrix
[1] FALSE

>cylc1<-as.matrix(cycl[c(-1)])    # Dropping the variable "Sample" and transforming the remaining  dataset  as a matrix
>head(cycl1)                                      # Visualizing the first 6 observations of the new dataset
 
PicrylChloride Davies  AOAC

[1,]          0.598  0.628 0.632
[2,]          0.614  0.628 0.630
[3,]          0.600  0.600 0.622
[4,]          0.580  0.612 0.584
[5,]          0.596  0.600 0.650
[6,]          0.592  0.628 0.606


> friedman.test(cycl1)                         # Perfoming the Friedman test       

Friedman rank sum test

data:  cycl1
Friedman chi-squared = 17.7826, df = 2, p-value = 0.0001376


Interpretation of the result:

The p-value (0.0001376) for this test is very small. It is therefore plausible that the three methods have statistically significant different medians, t