Hi, I am new to R Studio (and am very fragile when it comes to stats too). I have been getting a bit of help from my uni and from online. I just want to make sure that what I have created is giving me the correct info for a Chi Square test and creation of a mosaic plot.
An example of a table is:
Red 8 24
Blue 6 16
Pink 0 1
White 1 0
My code is:
#'run this if the table contains 0s or <5'
'This shows the percentage of A & B (width)'
'this shows the percentage of TOTAL A&B'
'Shows percentage of each thing handed out by A/B
#'LOAD GGPLOT2 AND DYPLR!!!'
'This show percentage of each A/B given what thing
Colsums = mutate(QDC15,I_pct = I / sum(I),NI_pct = NI / sum(NI))*100
'This counts the total of the rows'
#This counts the total of the colums
'makes the chart grey scale'
Any suggestions would be gratefully received (P.s., had to tweek some to hide details for confidentiality so might look a bit weird in the description ).