Description Usage Arguments Value Author(s) References Examples
View source: R/Musicnotation.R
A function to visualize interaction wit a musicnotation graph.
1 | Musicnotation(data_sheet, ...)
|
data_sheet |
either a data.frame f.e imported from a data sheet containing |
... |
Additional parameters:
# TODO check this it not working -> no show_items all items will be shown
#' |
returns a list with
ADI - the Average Dominance index
Knut Krueger, Knut.Krueger@equine-science.de
Chase, I. D. (2006). Music notation: a new method for visualizing social interaction in animals and humans. Front Zool, 3, 18. doi: 10.1186/1742-9994-3-18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | { #you can eihter use:
data_sheet=data.frame ("action.from"=c(1,4,2,3,4,3,4,3,4,3,4,3,4,3,4),
"action.to"=c(4,1,1,4,3,4,3,4,3,4,3,4,3,4,3),
"kind.of.action"= c(4,1,1,4,3,4,3,4,3,4,3,4,3,4,3),
"Time"=c('03:15:00','03:17:30','03:20:00','03:20:30','03:21:00',
'03:21:30','03:22:00','03:22:30','03:23:00','03:23:30',
'03:25:00','03:25:30','03:26:00','03:26:30','03:27:00'),
stringsAsFactors=FALSE)
items= data.frame ("Name"=c("item1","item2","item3","item4","item5","item6") ,
"item.number"=c(1:6),stringsAsFactors=FALSE)
actions=data.frame("name.of.action"= c("leading","following","approach","bite","threat to bite",
"kick","threat to kick", "chase","retreat"),
"action.number"=c(1:9),
"classification"=c(1,2,1,1,1,1,1,1,2) ,
"weighting"=c(1,-1,1,1,1,1,1,1,-1),stringsAsFactors=FALSE)
# set colors for special encounters
color= c("green","green","red","red","red","red","red","red")
Musicnotation(data_sheet=data_sheet,actions=actions,items=items,sort_dominance=TRUE)
#or you can use a complete f.e Excel sheet
#you can save this data as basic excel sheet to work with
data(data_Musicnotation)
Musicnotation(data_sheet=data_Musicnotation,sort_dominance=TRUE) }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.