Monday, August 18, 2014

ggplot Quick Reference

http://docs.ggplot2.org/current/
http://www.computerworld.com/s/article/9239799/60_R_resources_to_improve_your_data_skills?pageNumber=2


Friday, August 15, 2014

Summarizing Data Frames

attach(iris)
by(iris[,2:3], Species, colSums)

Data Frame Manipulation in R

setwd("f:/coursera/coursera/exploratory data analysis")
options(stringsAsFactors=F)
student <- c("dilir","saif","enam","rafiq")
studentn <- c(916,914,937,891)
mark <- c(400,300,250,500)
students <- data.frame(student, studentn)
marks <- data.frame(studentn, mark)
saveRDS(students,"students.rds")
saveRDS(marks, "marks.rds")
rm(list=ls())

students <- readRDS("students.rds")
marks <- readRDS("marks.rds")
students

students <- rbind(students,data.frame(student="selim", studentn=934))
students
students <- students[students$student!='selim',]
students