mydata <- read.csv("~/Desktop/Fall 2014/Programming 2014/test.csv", stringsAsFactors=FALSE, header=TRUE)
library (dplyr)
##
## Attaching package: 'dplyr'
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(tidyr)
This set calls in the functions that I will need, including my data that I will be working with.
mydata_long <- mydata %>%
gather(Title, Year, Format, Origin, Type)
I was interested in filtering to see when space games became really popular.
mydata_long <- mydata %>%
filter(Type == "space")
This chart uses the filter to figure out when they became popular.
ggplot(data = mydata, aes(x = Year, stat="space")) + geom_bar()
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.