I would like to create a multiple bar plot out of a data frame that has an mn matrix structure. This will have a total of mn cells such that each cell will have a bar-plot of its equivalent value.
MN matrices are called incidence matrices as opposed to MM matrices which are called adjacency matrices.
I found out the way of plotting this for data frame with adjacency matrix (mm) matrix structure using igrpah package in R. However, I could not figure out vertices metadata for incidence (mn) matrix structure.
Could you please create a multiple bar plot for this type of data frame in R.
Provided below is an imaginary data frame of the number of tourists visiting 5 different countries for 12 months.
set.seed(19881003)
Australia <- (runif(12,0,1))
France <- (runif(12, 0,1) + Australia)
UnitedKingdom <- rbinom(12,2, 0.6)
USA <- rpois(12,0.06)+UnitedKingdom
Italy <- UnitedKingdom+USA+0.012
months <- c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
#
tourist.data <- data.frame(months, Australia, France, UnitedKingdom, USA, Italy)
I have also attached a sample chart. This chart differs from what I want in that the x-axis should represent 12 months instead of the countries