barCoin.Rd
barCoin
produces a barCoin object.
barCoin(data, variables = colnames(data), commonlabel = NULL, dichotomies = c("_all","_none"), valueDicho = 1, weight = NULL, subsample = FALSE, sort = NULL, decreasing = TRUE, nodes = NULL, name = NULL, select = NULL, scalebar = FALSE, note = NULL, label = NULL, text = NULL, color = NULL, defaultColor = "#1f77b4", expected = FALSE, confidence = FALSE, level = .95, significance = FALSE, minimum = 1 , maximum = nrow(data), percentages = FALSE, criteria = c("Z","hyp"), Bonferroni = FALSE, support = 1, minL = -Inf, maxL = 1, language = c("en","es","ca"), cex = 1.0, dir = NULL)
data | a data frame |
---|---|
variables | a vector of variables included in the previous data frame |
commonlabel | a vector of variables whose names are to be included in nodes labels |
dichotomies | a vector of dichotomous variables to appear as just one categorie |
valueDicho | value to be selected for dichotomous variables. Default is 1 |
weight | a vector of weights. Optimal for data.framed tables. |
subsample | retrict the analysis to scenarios with at least one event. |
sort | name of the vector in the nodes data frame to order the graph. |
decreasing | decreasing or increasing sort of the graph order. |
nodes | a data frame with at least two vectors of names and incidences. |
name | name of the vector with names in the nodes data frame. |
select | Name of the event (in nodes name column) to start the visualization. |
scalebar | Should the bars fill the screen height? Default = FALSE. |
note | lower title of the graph. |
label | name of the vector with labels in the nodes data frame. |
text | name of the vector with html text in the nodes data frame. |
color | name of the vector with color variable in the nodes data frame. |
defaultColor | a character vector giving a valid html color. |
expected | name of the vector with expected coincidences in the links data frame. |
confidence | name of the vector with confidence interval in the links data frame. |
level | confidence level |
significance | name of the vector with significance in the links data frame. |
minimum | minimum frequency to be considered. |
maximum | maximum frequency to be considered. |
percentages | a logical value true if percentages are to be shown. Default = TRUE. |
criteria | statistic to be use for selection criteria. |
Bonferroni | Bonferroni criterium of the signification test. |
support | minimum value of the frequency of the coincidence to be edged. |
minL | minimum value of the statistic to include the edge in the list. |
maxL | maximum value of the statistic to include the edge in the list. |
language | a character vector (es=spanish; en=english; ca=catalan). |
cex | number indicating the amount by which plotting text should be scaled relative to the default. Default = 1. |
dir | a "character" string representing the directory where the web files will be saved. |
Object of class barCoin
.
Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/
# A character column (with separator) frame <- data.frame(A = c("Man; Women", "Women; Women", "Man; Man", "Undet.; Women; Man")) data <- dichotomize(frame, "A", sep = "; ")[2:4] barCoin(data,dichotomies="_all")#> #> Nodes(3): #> name incidences #> Man 3 #> Women 3 #> Undet. 1 #> #> Links(3): #> Source Target coincidences expected #> Man Women 2 2.25 #> Man Undet. 1 0.75 #> Women Undet. 1 0.75 #>barCoin(data,dichotomies="_all",confidence=TRUE,percentages=TRUE)#> #> Nodes(3): #> name incidences #> Man 75 #> Women 75 #> Undet. 25 #> #> Links(3): #> Source Target coincidences expected conf.L conf.U #> Man Women 50 56.25 20.16457 79.83543 #> Man Undet. 25 18.75 0.00000 54.83543 #> Women Undet. 25 18.75 0.00000 54.83543 #>