barCoin: Networked coincidences.

View source: R/barplot.R

barCoinR Documentation

Networked coincidences.

Description

barCoin produces a barCoin object.

Usage

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)

Arguments

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.

Value

Object of class barCoin.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

# 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")
barCoin(data,dichotomies="_all",confidence=TRUE,percentages=TRUE)

netCoin documentation built on Oct. 18, 2024, 5:10 p.m.