#how to draw a quantile plot in R
Original source of this document: people.uncw.edu/frierson/S501/R1.doc
#using the c function to input a vector of numbers
cholesterol=c(201,257,179,189,148,218,248,133,209,210,
192,167,211,253,238,245,152,137,174,149)
#now sort the vector using the sort function
chol=sort(cholesterol)
#show the numbers in the vector
chol
#get the length of the vector
n=length(chol)
#generate a series of number
u=(1:n - .5)/n # multiply these by 100 to get the last
#plot vector chol against vector u
plot(u,chol)
plot(u,chol, xlab="Percentile", ylab="Cholesterol")
#the quantile function in R gives the 5-number summary
#of your vector of values. try with the cholesterol data:
quantile(cholesterol)
#giving the minimum, Q1, median, Q3, and maximum values. #These 5 numbers can be plotted in what we call a boxplot
boxplot(cholesterol)
#use help function to learn how to use a R function / command
help(quantile)
#for more help information, you may check R reference manual and tutorials at R’s web site
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- how to draw a vbg
- how to draw a venous blood gas
- how to draw a cumulative frequency graph
- how to draw a map for kids
- how to draw a stuff
- how to draw a male face
- how to draw a cartoon person
- how to draw a person simple
- how to draw a cartoon character
- how to draw a person realistic
- how to draw a realistic face
- how to draw a bug