Smartphone Use

This is the code for my post on www.stephenpeplow.com dated The sources of the original data are provided in that post. The table I produced is here:

insight <- read.csv("C:/Users/Stephen/Dropbox/Consulting/smartphone/insight.csv", 
    row.names = 1)
insight
            Younger Middle Older
StrAgree         25     17     4
SwAgree          69     56    20
SwDiagree        65     77    33
StrDisagree      48     54    61

Load the FactoMineR package and carry out correspondence analysis

library(FactoMineR)
res.ca <- CA(insight)

plot of chunk unnamed-chunk-2

I created a dataset using QGIS of the areas of the 22 neighborhood areas in Vancouver. Then I exported that dataset to R. Get a scatterplot of youthdensity against percent aged 18-34

van_att <- read.csv("C:/Users/Stephen/Dropbox/Consulting/smartphone/van_att.csv")
library(ggplot2)
qplot(youthden, SharePC, data = van_att)

plot of chunk unnamed-chunk-3