Dataset:
library(readr)
groupProjectDataset<-read_csv("C:/Users/anuraggupta/Desktop/HU/ALNY 506/executive 2/income.csv")
## Parsed with column specification:
## cols(
## Occupation = col_character(),
## Industry = col_character(),
## All_workers = col_double(),
## All_weekly = col_double(),
## M_workers = col_double(),
## M_weekly = col_double(),
## F_workers = col_double(),
## F_weekly = col_double()
## )
library(tidyverse)
## -- Attaching packages --------------------------------------------------------------------------------------- tidyverse 1.2.1 --
## v ggplot2 3.1.1 v purrr 0.3.2
## v tibble 2.1.1 v dplyr 0.8.0.1
## v tidyr 0.8.3 v stringr 1.4.0
## v ggplot2 3.1.1 v forcats 0.4.0
## -- Conflicts ------------------------------------------------------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(dplyr)
str(groupProjectDataset)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 535 obs. of 8 variables:
## $ Occupation : chr "Chief executives" "General and operations managers" "Legislators" "Advertising and promotions managers" ...
## $ Industry : chr "Management" "Management" "Management" "Management" ...
## $ All_workers: num 1046 823 8 55 948 ...
## $ All_weekly : num 2041 1260 NA 1050 1462 ...
## $ M_workers : num 763 621 5 29 570 24 96 466 551 7 ...
## $ M_weekly : num 2251 1347 NA NA 1603 ...
## $ F_workers : num 283 202 4 26 378 35 73 169 573 16 ...
## $ F_weekly : num 1836 1002 NA NA 1258 ...
## - attr(*, "spec")=
## .. cols(
## .. Occupation = col_character(),
## .. Industry = col_character(),
## .. All_workers = col_double(),
## .. All_weekly = col_double(),
## .. M_workers = col_double(),
## .. M_weekly = col_double(),
## .. F_workers = col_double(),
## .. F_weekly = col_double()
## .. )
#hist(groupProjectDataset$All_weekly)
groupProjectDataset <- filter(groupProjectDataset, groupProjectDataset$All_weekly!='NA')
ggplot(data = groupProjectDataset, mapping = aes(x = groupProjectDataset$All_weekly)) + geom_histogram(binwidth =15)+
xlab("expectability") +
ylab("positive emotion")
