Assignment - 1: Data Analytics and R
Assignment - 1: Data Analytics and R
ASSIGNMENT -1
SUBMITTED BY : LAKSHITA SAINI
TABLE
Dataset of Health record of 30 people distributed.
IMPORTING DATA
To study what is the maximum and minimum miles covered by the people who
participated in the study and to also find out the average miles covered by
them and the central value, representing the situation of the majority of the
group.
summary_mpd = summary(data$miles_per_day)
print(summary_mpd)
r = range(data$miles_per_day)
print(r)
The mode is calculated to understand around which value ‘calories burned’ are
the most frequent.
install.packages("modeest")
library(modeest)
mode = mfv(data$calories_burned)
print(mode)
var(data$workout_duration)
#four - What is the standard deviation of health score?
The value of standard deviation will help us to understand the data values of
the health score dispersed around the mean, telling us about the health of the
group.
std = sd(data$health_score)
print(std)
The count function will help us study the distribution of our group across
various age groups.
library(dplyr)
#six - How much percentage of people are vaccinated and how many are not?
v1 <- prop.table(table(data$vaccination_status))
print(v1*100)
#seven - What is the distribution of candidates who participated among states?
The count function will help us study the distribution of our group across
various states.
The mean score calculation on the basis of the gender which helps us to
understand which age group has a better health status.
install.packages("xlsx")
library("xlsx")
df %>%
group_by(gender) %>%