This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(readr) | |
library(ggplot2) | |
library(RColorBrewer) | |
#read in data | |
a<- read_csv('./data/usa_00005.csv') | |
#remove Hawaii and Alaska and pick out those of working age | |
b<- a %>% filter(AGE>=15 & AGE<=65 & !(STATEFIP %in% c(2,15))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(readr) | |
library(ggplot2) | |
library(RColorBrewer) | |
#read in data | |
a<- read_csv('./data/usa_00005.csv') | |
#remove Hawaii and Alaska and pick out those of working age | |
b<- a %>% filter(AGE>=15 & AGE<=65 & !(STATEFIP %in% c(2,15))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(readr) | |
library(tidyr) | |
#enter data | |
a <- read_csv('./data/usa_00001.csv') | |
#we should remove all data from alask and hawaii | |
aa <- a %>% filter(!(YEAR < 1960 & STATEFIP %in% c(2,15))) | |
#code number for race into words using factor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Enter variables | |
titles<-c("The Waste Land", "Lord of the Flies", "Grapes of Wrath", "Pride and Prejudice", "Frankenstein", "Little Women", "Jane Eyre", "The Things they Carried", "Huckleberry Finn", "The Old Man and the Sea") | |
author<-c("Thomas Eliot", "William Golding", "John Steinbeck", "Jane Austen", "Mary Shelley", "Louisa May Alcott", "Charlotte Bronte", "Tim O'Brien", "Mark Twain", "Ernest Hemmingway") | |
pyear<-c(1922, 1954, 1939, 1813, 1818, 1868, 1847, 1990, 1884, 1952) | |
stock<-c(12, 4, 7, 1, 8, 9, 3, 2, 17, 5) | |
price<-c(5.50, 10, 12, 20, 18.50, 22, 16, 25, 8, 15) | |
#create dataframe | |
books<-data.frame(titles, author, pyear, stock, price) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program |
NewerOlder