Snippets

nraley L6qa: Untitled snippet

Created by nraley

> data<-scan()
1: 1770
2: 1775
3: 1737
4: 1762
5: 1805
6: 1735
7: 1705
8: 1754
9: 1777
10: 1785
11: 1770
12: 1809
13: 1750
14: 1698
15: 1689
16: 1695
17: 1663
18: 1651
19: 1608
20: 1578
21: 1505
22: 1497
23: 1491
24: 1479
25: 1463
26: 1451
27: 1387
28: 1386
29: 1374
30: 1329
31: 1304
32: 1306
33: 1298
34: 
Read 33 items

> Month<-seq(1,33,1)
> month<-c("Aug 2012", "Sep 2012", "Oct 2012", "Dec 2012", "Jan 2013", "Feb 2013", "Mar 2013", "Apr 2013", "May 2013", "Jun 2013", "Jul 2013", "Aug 2013", "Sep 2013", "Oct 2013", "Nov 2013", "Dec 2013","Jan 2014", "Feb 2014", "Mar 2014", "Apr 2014", "May 2014", "Jun 2014", "Jul 2014", "Aug 2014", "Sep 2014", "Oct 2014", "Nov 2014", "Dec 2014", "Jan 2015", "Feb 2015", "Mar 2015 (proj)")
> GoogleSearches<-data

> plot(Month,GoogleSearches,xaxt="n",main="My Google Searches/Month",xlab="", ylab="Google Searches",pch=16)
> axis(1, at=xs, labels=month, las=2)

> sum(data)
[1] 52786
>
> mean(data)
[1] 1599.576
> sd(data)
[1] 173.3755
>
> mean(data[1:12])
[1] 1765.333
> sd(data[1:12])
[1] 29.60753
>
> sum(data)/((365*3)-120)
[1] 54.13949
> mean(data[1:12])
[1] 1765.333
> sum(data[1:12])/365
[1] 58.03836

Comments (0)