In Excel with data organized like this:
Bare NP Singular-Marked NP Plural-Marked NP BrP Speakers AmE Speakers BrP Speakers AmE Speakers BrP Speakers AmE Speakers Plural Interpretation 0.005747126 0.006896552 0.194117647 0.124567474 0.872093023 0.985815603 Plural & Singular Interpretation 0.649425287 0.910344828 0.029411765 0.051903114 0.127906977 0.014184397 Singular Interpretation 0.344827586 0.082758621 0.776470588 0.823529412 0 0
I can create a complex barchart that looks like this:
Is there an easy way to reproduce how the x axis is divided into separate conditions (ie, "Bare NP", "Singular-Marked NP" and "Plural-Marked NP") using R
All I can think of at the moment:
pluralInterp <- c(0.005747126,0.006896552,0.194117647,0.124567474,0.872093023,0.985815603) pluralAndSingInterp <- c(0.649425287,0.910344828,0.029411765,0.051903114,0.127906977,0.014184397) singInterp <- c(0.344827586,0.082758621,0.776470588,0.823529412,0,0) a <- rbind(pluralInterp,pluralAndSingInterp,singInterp) colnames(a) <- c("Bare NP ~ BrP Speakers", "Bare NP ~ AmE Speakers", "Singular-Marked NP ~ BrP Speakers", "Singular-Marked NP ~ AmE Speakers", "Plural-Marked NP ~ BrP Speakers", "Plural-Marked NP ~ AmE Speakers" ) barplot(a, col=c("blue","red","purple"), ylab="Frequency of Interpretation", xlab="Form of NP and Native Language", main="Frequency of BrP and AmE Interpretations of NPs in Neutral Environments" )
Which gives the following graph: