Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .RData
Binary file not shown.
512 changes: 512 additions & 0 deletions .Rhistory

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions analysis.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

#Set Working Directory
setwd("/Users/elias/Downloads/Rproject")
#Initialize ggplot2
library(ggplot2)

#Accesses supporting functions
source("supportingFunctions.R")

#covnerts all .txt files into comma delimited .csv files for countryY
convertDelimiter("countryY")


#Compiles the CSV data for each country into a file allData.csv for future analysis with NAs removed
compileCSV("countryY", "removeNA")
compileCSV("countryX", "removeNA")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+2

#In which country (X or Y) did the disease outbreak likely begin?
#The first infection for country Y is 139
firstInfection("countryY/allData.csv")
#The first infection for country X is 120
firstInfection("countryX/allData.csv")
#As Country X had infections at day 120, 19 days prior to country Y, the infection likely began in country X

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+4

#If Country Y develops a vaccine for the disease, it it likely to work for Country X?
#Country Y has high levels of markers 6 & 7, with slightly lower levels of markers 7-10
#and moderate levels of markers 4&5 with nearly no levels of markers 1-3
markerDistribution("countryY/allData.csv")
#Country X has extremely high levels of markers 1-5
markerDistribution("countryX/allData.csv")

#As country Y is developed the vaccine they would likely develop it for markers 5-10
#These markers are present at low levels in country X
#As such the country Y vaccine would likely not work for country X
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+4


#Summarizes data for both countries form the file allData.csv
summarizeData("allData.csv")

#The disease appears to infect both sexes fairly equally and appears to mostly infect younger patients under 20 years old
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good commenting and efficient code that uses coding concepts that we covered in class – 3.5 points (max is 4)

Loading