Dean Yergens
  • Home
    • Calendar
    • Resume
    • Publications
  • Software
    • Synthesis >
      • Current Version
      • Synthesis Tutorials
    • RMail
    • Meta Data Repository
    • Patient-X
    • WebReports
    • HealthSim Calendar Gadget
    • MT4Health
    • Amazon ISBN 2 BibTex
    • ForestRanger
    • Alberta Sepsis Network
    • R Code
  • Global Health
    • Software
    • Philippines
    • Malawi
    • Zambia
    • Kenya
    • World Health Organization
    • Verbal Autopsy
    • Space Medicine
  • Computer Science
    • Data Management
    • GPU Parallel Processing
    • Machine Learning
    • Visualization
    • Operating Systems
    • Programming Languages
    • Software Engineering
    • Simulations
    • Computer Configurations
    • Single Board Computers
    • IEEE RSS Feed
    • Glossary
    • Commercial Software Blog
  • Health Sciences
    • AI Walkthrough
    • Canadian Health System Books
    • Microsimulation
    • Graph Databases (Neo4J)
    • Administrative Data
    • CCHS Overview
    • Literature Reviews >
      • Newspaper Literature Reviews
      • Open Access
      • Statistics Utilization
      • Topic Modeling
      • Utilizing R for Literature Reviews
    • Statistics >
      • RMedicine (RClub) >
        • Blog
        • Forums
    • Health Informatics >
      • DataMergeR
      • Dashboards
      • Academic Software Development
      • Critical Care Systems
      • Patient Flow >
        • Patient Flow Simulations
        • Systems
      • HL7
    • Online Courses
    • Public Health Documentaries
    • Summer Institutes
    • WHO Internships
    • Conferences
  • Collection
    • Hardware
    • Software
    • Looking for
    • Analog Computers
    • Old Monitor Projects
    • Computer Books and Software
    • 3D Models
    • FrostByte
    • New Devices Vintage Computers
    • Floppy Music
    • History of Workstations
  • Other
    • Future Projects
    • Home Automation
    • Animatronics
    • Raspberry Pi
    • Deaner.AI
    • CANMAR
    • EpiComics
    • The Art of Deaner
    • LED Cube 8x8x8
    • Ambient Devices
    • EasyButton
    • African Art
    • Movie Posters
    • Wildlife Photography
    • Coursera
  • Blog

R Code


unlist(strsplit("a, b, c", split=", ")) 
[1] "a" "b" "c"


Introduction to data cleaning with R
http://cran.r-project.org/doc/contrib/de_Jonge+van_der_Loo-Introduction_to_data_cleaning_with_R.pdf



HeatMap

Picture

​library(reshape2)
library(ggplot2)

synthesis <- read.table("c://users/yergens/desktop/heatmapdata.csv", header=TRUE, sep=",", stringsAsFactors = FALSE)

ggplot(data = synthesis, aes(x = Year, y = Diseases)) +
  geom_tile(aes(fill = Count)) +
  scale_fill_gradient(low="lightblue", high="darkblue") +
  ggtitle("Canadian Community Health Survey\nDisease Broken Down by Year HeatMap\n") + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) 

#Convert data from Long to Wide (not needed for Heat Map)
data_wide <- reshape(synthesis, idvar = "Diseases", timevar = "Year", direction = "wide")
  
Picture

​library(reshape2)
library(ggplot2)

synthesis <- read.table("c://users/yergens/desktop/heatmapdata.csv", header=TRUE, sep=",", stringsAsFactors = FALSE)

ggplot(data = synthesis, aes(x = Year, y = Diseases)) +
  geom_tile(aes(fill = Count)) +
  geom_text(aes(label = Count)) +  
  scale_fill_gradient(low="lightblue", high="darkblue") +
  ggtitle("Canadian Community Health Survey\nDisease Broken Down by Year HeatMap\n") + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) 

#Convert data from Long to Wide (not needed for Heat Map)
data_wide <- reshape(synthesis, idvar = "Diseases", timevar = "Year", direction = "wide")
​​

cchs <- read.table("c://users/yergens/Desktop/cchsif.csv", header=TRUE, sep=",", stringsAsFactors = FALSE)
  
names(cchs)
 
hist(cchs$meta_SNIP2014,  main = "Scopus Journal Metrics (2014)", xlab = "Source-Normalized Impact per Paper (SNIP)")

hist(cchs$meta_SJR2014,  main = "Scopus Journal Metrics  (2014)", xlab = "SCImago Journal Rank (SJR)")
  
summary(cchs$meta_SNIP2014)
summary(cchs$meta_SJR2014) 

library(sqldf)
yearchart <- sqldf("select Year, count(*) as cnt from cchs group by Year order by Year")

​plot(yearchart$Year, yearchart$cnt, type="n", main="Publication Year Breakdown for Cycle 2.1",
     xlab="Year", ylab="Publications")
lines(yearchart$Year, yearchart$cnt)