-
Notifications
You must be signed in to change notification settings - Fork 1
/
.Rhistory
22 lines (22 loc) · 877 Bytes
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
install.packages("instalr")
install.packages("installr")
install.packages(installr)
install.packages("installr")
install.packages("installr")
install.packages(c("dplyr", "car"))
data -> read.csv("Data and Documentation/ss14pco.csv", stringsAsFactors=FALSE)
data -> read.csv("Data and Documentation/ss14pco.csv", stringsAsFactors = FALSE)
data <- read.csv("Data and Documentation/ss14pco.csv", stringsAsFactors = FALSE)
table(data$povpip)
table(data$POVPIP)
data <- data%>% # passes the data object we created above to the next function
mutate(poverty_new=recode(POVPIP, "000:124=1; 125:183=2; 183:501=3"))
library(car)
library(dplyr)
data <- data%>% # passes the data object we created above to the next function
mutate(poverty_new=recode(POVPIP, "000:124=1; 125:183=2; 183:501=3"))
poverty <- data%>%
group_by(poverty_new)%>%
summarize(total=sum(PWGTP))
View(poverty)
poverty