diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..8237e00 --- /dev/null +++ b/.Rhistory @@ -0,0 +1,193 @@ +x = 5 +x <- 5 +x <- 4 +x <- 4.5 +?cd +?getwd +x <- 5 +z <- x + y +z=x+y +x <- 5 +x <- 5 +y <- 6 +z=x+y +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +rm(list=ls()) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +View(y) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +rm(list=ls()) +install.packages(c("swirl", "swirlify")) +library(swirl()) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +rm(list=ls()) +x <- c(1,2,3,4,5) +print(typeof(c)) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +getwd +getwd() +setwd(dir="/home/haku/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/") +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +View(fileDataFinal) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +install.packages("ggplot2") +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +head(fileData) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileDataFinal) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +install.packages("cowplot") +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +View(fileData) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/.active-rstudio-document", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem1.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem2.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem2.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem2.R", echo=TRUE) +source("~/GitHub_Repositories/Biocomputing_Tutorials/Biocomp_tutorial12/problem2.R", echo=TRUE) diff --git a/homeless_students_enrolled_in_public_school_usafacts.csv b/homeless_students_enrolled_in_public_school_usafacts.csv new file mode 100644 index 0000000..800628b --- /dev/null +++ b/homeless_students_enrolled_in_public_school_usafacts.csv @@ -0,0 +1,16 @@ +Year,People +2005,653860 +2006,879594 +2007,688174 +2008,773832 +2009,915173 +2010,935831 +2011,1065794 +2012,1131187 +2013,1202507 +2014,1298236 +2015,1260491 +2016,1304446 +2017,1354363 +2018,1504544 +2019,1384301 diff --git a/problem1.R b/problem1.R new file mode 100644 index 0000000..450fbcd --- /dev/null +++ b/problem1.R @@ -0,0 +1,14 @@ +rm(list=ls()) +library(ggplot2) +library(cowplot) + +# load data +file = "homeless_students_enrolled_in_public_school_usafacts.csv" +fileData = read.csv(file, header=T, stringsAsFactors = F) + +# plot data +ggplot(data = fileData, + aes(x = Year, y = People)) + + geom_point() + + stat_smooth(formula = y~x, method="lm")+ + theme_classic() diff --git a/problem2.R b/problem2.R new file mode 100644 index 0000000..4aa95ea --- /dev/null +++ b/problem2.R @@ -0,0 +1,22 @@ +rm(list=ls()) +library(ggplot2) +library(cowplot) + +# load data +file = "data.txt" +fileData = read.csv(file, header=T, stringsAsFactors = F) + +# plot bar graph +ggplot(data = fileData, + aes(x = region, y = observations)) + + stat_summary(fun = mean, + geom = "bar") + +# plot scatter plot +ggplot(data = fileData, + aes(x = region, y = observations)) + + geom_jitter(alpha = .1) + +# The bar graph and scatter plot tell different stories because the scatter plot shows a wide range of values +# whereas the bar graph is pretty much all the same values. The averages happen to be similar but the data +# points for east, west, and south are not very grouped.