barPlots: Bar plots

View source: R/side_functions.R

barPlotsR Documentation

Bar plots

Description

Return bar plots to compare groups

Usage

barPlots(data, belongmatrix, ncol = 3, what = "mean")

Arguments

data

A dataframe with numeric columns

belongmatrix

A membership matrix

ncol

An integer indicating the number of columns for the bar plot

what

Can be "mean" (default) or "median"

Value

a barplot created with ggplot2

Examples

## Not run: 
data(LyonIris)
AnalysisFields <-c("Lden","NO2","PM25","VegHautPrt","Pct0_14","Pct_65","Pct_Img",
"TxChom1564","Pct_brevet","NivVieMed")
dataset <- sf::st_drop_geometry(LyonIris[AnalysisFields])
queen <- spdep::poly2nb(LyonIris,queen=TRUE)
Wqueen <- spdep::nb2listw(queen,style="W")
result <- SFCMeans(dataset, Wqueen,k = 5, m = 1.5, alpha = 1.5, standardize = TRUE)
barPlots(dataset, result$Belongings)

## End(Not run)

geocmeans documentation built on Sept. 12, 2023, 9:06 a.m.