github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

singingfish / perl-survey-2009

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 3
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: 3449fac

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

The perl survey 2009. Results from the first 2007 survey analysed and refactored into a reusable instrument — Read more

  cancel

http://use.perl.org/~singingfish/journal/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Start going through the published survey results and write R code that 
summarises the results. 
Kieren Diment (author)
Mon Jun 29 05:38:22 -0700 2009
commit  3449fac299e2224e2ca7d78dd4f510aba5da7433
tree    510a11ab0ebfcf430ffaee5121cdff6037bccdb4
parent  4d9debcef1d2d90c3e8f92cf965e6795e4d7441b
perl-survey-2009 / R / 02-age.R R/02-age.R
100644 28 lines (20 sloc) 0.839 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# let's exclude everybody who reports themselves born after 1994 ( 13 years old
# or younger) or before 1927 (80 years old)
 
survey.year<- 2007 # or as.numeric(format(Sys.time(),"%Y")) for the next one
 
Age <- survey.year-X$Year.of.birth
Age[Age < 14] <- NA
Age[Age > 79] <- NA
sd(Age,na.rm=T)
postscript("02-age.ps")
hist(Age,breaks=40)
dev.off()
 
# here's how we bin the sample into quartiles for further investigation
 
Age.q1 <- quantile(Age,0.25, na.rm=T)
Age.q2 <- quantile(Age,0.5, na.rm=T)
Age.q3 <- quantile(Age,0.75 na.rm=T)
 
# so we should be able to report on programming languages known and differences
# by age with this stuff. Here we'll just show how to get the size of each group.
 
length(Age[Age < Age.q1])
length(Age[Age >= Age.q1 & Age < Age.q2])
length(Age[Age >= Age.q2 & Age < Age.q3])
length(Age[Age >= Age.q3])
 
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server