quartile in r

To find the quartiles in R, you can use the quantile() function. First, create a vector of data using the c() function. Then, use the quantile() function with the data vector and specify the desired quartile. For example, to find the first quartile (Q1), use quantile(data, 0.25). Repeat this process for the second quartile (Q2, the median) and the third quartile (Q3).