









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Descriptive statistics helps to simplify large amounts of data sensibly. This section will look at measures of central tendency and measure of spread. For illustrative purposes, we’ll use variables from the Iris dataset( you can download it from this link( https://www.kaggle.com/datasets/uciml/iris ) Our focus will be on SepalLenghtCM, SepalWidthCM, PeatLengthCM, and PetalLengthCm).
We can use the summary() function in the base installation to obtain descriptive statistics. An example is presented in the following listing.
Data analysts typically annotate datasets to make the results easier to interpret. Typically annotation includes adding descriptive labels to variable names and value labels to the codes used for categorical variables. For example, for the variable age, you might want to attach the more descriptive label “Age at hospitalization (in years).” For the variable gender coded 1 or 2, you might want to associate the labels “male” and “female.” Variable labels : names(mydata)[2] <- "new“
str(mydata)
sample_n(mydata,3)
mydata2 = select(mydata, SepalLengthCm )
mydata<- read.csv("D:/data.csv",header = TRUE,sep = ",") mydata colSums(is.na(mydata))
which(is.na(mydata$SepalLengthCm))