I am new in R and I had made some graphs with small dataset. Now I want to plot (histogram and correlation) in a dataset with 9 variables and 107 observations.
its about deaths per 100.000 people caused by lung cancer. I have five columns with numbers of deaths per 100.000, one for a range of age(0-14 years, 15-44, 45-54, 55-64, 65+) In the rows there are the states of the country. I have done this with no success:
hist(PULMON.R$X0.14.años, PULMON.R$X15.44.años, PULMON.R$X45.54.años, PULMON.R$X55.64.años, PULMON.R$X65.Y.MAS.años)
Error in hist.default(PULMON.R$X0.14.años, PULMON.R$X15.44.años, PULMON.R$X45.54.años, :
'probability' is an alias for '!freq', however they differ.
And I get a strange graphic with several numbers in axis X doing this:
barplot(PULMON.R$X0.14.años, PULMON.R$X15.44.años, PULMON.R$X45.54.años, PULMON.R$X55.64.años, PULMON.R$X65.Y.MAS.años)
And for the correlation I get nothing. I want to see if there is a relation between age (getting older) with more death cases. I have done this:
cor(PULMON.R$X0.14.años, PULMON.R$X15.44.años, PULMON.R$X45.54.años, PULMON.R$X55.64.años, PULMON.R$X65.Y.MAS.años)
Error in cor(PULMON.R$X0.14.años, PULMON.R$X15.44.años, PULMON.R$X45.54.años, :
unused argument (PULMON.R$X65.Y.MAS.años)
My dataset is PULMON.R Pulmon means lung in Spanish.