I have two variables, X and Y:
x <- c(1.18,1.42,0.69,0.88,1.69,1.09,1.53,1.02,1.19,1.32)
y <- c(1.72,1.42,1.69,0.79,1.79,0.77,1.44,1.29,1.96,0.99)
I would like to create a table of the absolute, relative and cumulative frequencies of both X and Y in R
plot(table(x)/length(x), type ="h", ylab = "Relative Frequency", xlim = c(0.6,1.8))
plot(table(y)/length(y), type ="h", ylab = "Relative Frequency", xlim = c(0.6,1.8))
I did a sample of the relative frequency but it came out like this: plot of the relative frequency. I think it is wrong. What do you think? Also, how can I use hist(x)$counts to obtain the absolute and cumulative frequencies?