Skip to content

Instantly share code, notes, and snippets.

View zhusleep's full-sized avatar
😁
Focusing

kaihua zhusleep

😁
Focusing
  • Shanghai
View GitHub Profile
@zhusleep
zhusleep / sleepdata.R
Created April 4, 2016 14:00 — forked from Tafkas/sleepdata.R
A first look at the sleepdata recorded with the Sleep Cycle app for the iPhone
sleep <- read.csv(file="sleepdata.csv", header=T, sep=";")
#split end time
sleep$End <- as.character(sleep$End)
#get the date
sleep$Date <- sapply(strsplit(sleep$End, " "),"[[",1)
sleep$Date <- strptime(sleep$Date, format="%Y-%m-%d")
#fix sleep quality