rpietro / QoLFunctionalCapacityAVBlock

Analysis of long term QoL of patients with AV blockade
0 stars 0 forks source link

plots #2 #3

Closed rpietro closed 12 years ago

rpietro commented 12 years ago

without the variable names, there is no way to build the graphic for the comment below:

Graph 2.1. SF-36 Scores (clustered column - 1st Qu, 3st Qu, mean, SD)

SF36 Domains

rpietro commented 12 years ago

sorry, found the variables. so, this answer has a few parts:

  1. the type of graphic you want to display your data is not the bars you want, since they don't really represent much in terms of data variance. the ideal plot are boxplots
  2. the initial code for boxplots like this is:

make sure you run all the libraries in the original script before you can run this

graphics.frame <- data.frame(physical_functioning, role_physical,bodily_pain,general_health, vitality, social_functioning, role_emotional, mental_health, summary_physical_health, summary_mental_health, VALUE=rnorm(66) ) ggplot(melt(graphics.frame), aes(x = variable, y = value)) + geom_boxplot()

  1. the problem with the code above is that i can't put colors to the different groups, at least it would take me far more time to find out how to do that

so, two possible solutions:

a. leave the boxplot as is

  1. go back to the original software you used, change the graphic to a boxplot but now with the different colors