Description Usage Arguments Value Author(s) Examples
Various distance measures between elements or constructs are calculated.
1 2 3 4 5 6 7 8 9 10 
x 

along 
Whether to calculate distance for 1 = constructs (default) or for 2= elements. 
dmethod 
The distance measure to be used. This must be one of
"euclidean", "maximum", "manhattan", "canberra", "binary"
or "minkowski". Any unambiguous substring can be given.
For additional information on the different types type

p 
The power of the Minkowski distance, in case 
normalize 
Use normalized distances. The distances are divided by the highest possible value given the rating sclae fo the grid, so all distances are in the interval [0,1]. 
trim 
The number of characters a construct or element is trimmed to (default is

index 
Whether to print the number of the construct or element
in front of the name (default is 
... 
Additional parameters to be passed to function 
matrix
object.
Mark Heckmann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  ## Not run:
# between constructs
distance(bell2010, along = 1)
distance(bell2010, along = 1, normalize = TRUE)
# between elements
distance(bell2010, along = 2)
# several distance methods
distance(bell2010, dm = "man") # manhattan distance
distance(bell2010, dm = "mink", p = 3) # minkowski metric to the power of 3
# to save the results without printing to the console
d < distance(bell2010, trim = 7)
d
# some more options when printing the distance matrix
print(d, digits = 5)
print(d, col.index = FALSE)
print(d, upper = FALSE)
# accessing entries from the matrix
d[1,3]
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.