setwd("~/Documents/0 - Montgomery College/0 - DATA 110/Datasets")
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.2.1     ✔ purrr   0.3.2
## ✔ tibble  2.1.3     ✔ dplyr   0.8.3
## ✔ tidyr   1.0.0     ✔ stringr 1.4.0
## ✔ readr   1.3.1     ✔ forcats 0.4.0
## ── Conflicts ────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(psych)
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
pfizer <- read_csv("pfizer.csv")
## Parsed with column specification:
## cols(
##   org_indiv = col_character(),
##   first_plus = col_character(),
##   first_name = col_character(),
##   last_name = col_character(),
##   city = col_character(),
##   state = col_character(),
##   category = col_character(),
##   cash = col_double(),
##   other = col_double(),
##   total = col_double()
## )
fda <- read_csv("fda.csv")
## Parsed with column specification:
## cols(
##   name_last = col_character(),
##   name_first = col_character(),
##   name_middle = col_character(),
##   issued = col_character(),
##   office = col_character()
## )

Examine the data

We can View data at any time by clicking on its table icon in the Environment tab in the Grid view.

str(pfizer)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 10087 obs. of  10 variables:
##  $ org_indiv : chr  "3-D MEDICAL SERVICES LLC" "AA DOCTORS, INC." "ABBO, LILIAN MARGARITA" "ABBO, LILIAN MARGARITA" ...
##  $ first_plus: chr  "STEVEN BRUCE" "AAKASH MOHAN" "LILIAN MARGARITA" "LILIAN MARGARITA" ...
##  $ first_name: chr  "STEVEN" "AAKASH" "LILIAN" "LILIAN" ...
##  $ last_name : chr  "DEITELZWEIG" "AHUJA" "ABBO" "ABBO" ...
##  $ city      : chr  "NEW ORLEANS" "PASO ROBLES" "MIAMI" "MIAMI" ...
##  $ state     : chr  "LA" "CA" "FL" "FL" ...
##  $ category  : chr  "Professional Advising" "Expert-Led Forums" "Business Related Travel" "Meals" ...
##  $ cash      : num  2625 1000 0 0 1800 ...
##  $ other     : num  0 0 448 119 0 0 47 0 0 396 ...
##  $ total     : num  2625 1000 448 119 1800 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   org_indiv = col_character(),
##   ..   first_plus = col_character(),
##   ..   first_name = col_character(),
##   ..   last_name = col_character(),
##   ..   city = col_character(),
##   ..   state = col_character(),
##   ..   category = col_character(),
##   ..   cash = col_double(),
##   ..   other = col_double(),
##   ..   total = col_double()
##   .. )
head(pfizer)
## # A tibble: 6 x 10
##   org_indiv first_plus first_name last_name city  state category  cash
##   <chr>     <chr>      <chr>      <chr>     <chr> <chr> <chr>    <dbl>
## 1 3-D MEDI… STEVEN BR… STEVEN     DEITELZW… NEW … LA    Profess…  2625
## 2 AA DOCTO… AAKASH MO… AAKASH     AHUJA     PASO… CA    Expert-…  1000
## 3 ABBO, LI… LILIAN MA… LILIAN     ABBO      MIAMI FL    Busines…     0
## 4 ABBO, LI… LILIAN MA… LILIAN     ABBO      MIAMI FL    Meals        0
## 5 ABBO, LI… LILIAN MA… LILIAN     ABBO      MIAMI FL    Profess…  1800
## 6 ABDULLAH… ABDULLAH   ABDULLAH   RAFFEE    FLINT MI    Expert-…   750
## # … with 2 more variables: other <dbl>, total <dbl>
describe(pfizer)
##             vars     n    mean       sd median trimmed    mad min     max
## org_indiv*     1 10087     NaN       NA     NA     NaN     NA Inf    -Inf
## first_plus*    2  9884     NaN       NA     NA     NaN     NA Inf    -Inf
## first_name*    3  9884     NaN       NA     NA     NaN     NA Inf    -Inf
## last_name*     4 10087     NaN       NA     NA     NaN     NA Inf    -Inf
## city*          5 10087     NaN       NA     NA     NaN     NA Inf    -Inf
## state*         6 10087     NaN       NA     NA     NaN     NA Inf    -Inf
## category*      7 10086     NaN       NA     NA     NaN     NA Inf    -Inf
## cash           8 10086 3241.12 21815.80      0  814.66   0.00   0 1185466
## other          9 10084  266.47   861.06     41  121.95  60.79   0   27681
## total         10 10087 3506.57 21792.20    750 1111.64 947.38   0 1185466
##               range  skew kurtosis     se
## org_indiv*     -Inf    NA       NA     NA
## first_plus*    -Inf    NA       NA     NA
## first_name*    -Inf    NA       NA     NA
## last_name*     -Inf    NA       NA     NA
## city*          -Inf    NA       NA     NA
## state*         -Inf    NA       NA     NA
## category*      -Inf    NA       NA     NA
## cash        1185466 30.20  1280.49 217.23
## other         27681 12.27   234.62   8.57
## total       1185466 30.26  1284.45 216.98
str(fda)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 272 obs. of  5 variables:
##  $ name_last  : chr  "ADELGLASS" "ADKINSON" "ALLEN" "AMSTERDAM" ...
##  $ name_first : chr  "JEFFREY" "N." "MARK" "DANIEL" ...
##  $ name_middle: chr  "M." "FRANKLIN" "S." NA ...
##  $ issued     : chr  "5/25/1999" "4/19/2000" "1/28/2002" "11/17/2004" ...
##  $ office     : chr  "Center for Drug Evaluation and Research" "Center for Biologics Evaluation and Research" "Center for Devices and Radiological Health" "Center for Biologics Evaluation and Research" ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   name_last = col_character(),
##   ..   name_first = col_character(),
##   ..   name_middle = col_character(),
##   ..   issued = col_character(),
##   ..   office = col_character()
##   .. )
head(fda)
## # A tibble: 6 x 5
##   name_last name_first name_middle issued    office                        
##   <chr>     <chr>      <chr>       <chr>     <chr>                         
## 1 ADELGLASS JEFFREY    M.          5/25/1999 Center for Drug Evaluation an…
## 2 ADKINSON  N.         FRANKLIN    4/19/2000 Center for Biologics Evaluati…
## 3 ALLEN     MARK       S.          1/28/2002 Center for Devices and Radiol…
## 4 AMSTERDAM DANIEL     <NA>        11/17/20… Center for Biologics Evaluati…
## 5 AMSTUTZ   HARLAN     C.          7/19/2004 Center for Devices and Radiol…
## 6 ANDERSON  C.         JOSEPH      2/25/2000 Center for Devices and Radiol…
# describe not needed for fda because there are no continuous variables
# print values for total in pfizer data
pfizer$total  
##     [1]    2625    1000     448     119    1800     750      47     825
##     [9]    3000     396    1750      58      88    2000     189    2500
##    [17]      38    4400    2074     218    1750     154    1000    4000
##    [25]    1250      93     750      59    1250    1000    3000      41
##    [33]    2400   12840      39     750     109    1062     390      71
##    [41]      30     850     120    2000      99    1000      28    1500
##    [49]    1750    2300      27    1000      66    1500    1000     174
##    [57]    1000      33    2500    3000     611     300     669    2150
##    [65]    1160      42    2000    1250     131    1250     117     780
##    [73]     231   12300     100     750     381     950     663    4007
##    [81]    1500     384    9000     395    7500     115      33    1000
##    [89]      50    1000      32      85    1750      66    1375      48
##    [97]    1172     190    4814    1144    2363      66    2500    1000
##   [105]   10948     132    6500    6150     669    2000     234    1000
##   [113]      99    1000      29     314    1750    1000     563      47
##   [121]     384     316    7500     204    6750    7545    4485    1250
##   [129]    1800     750      58    6702    3750     135      82     256
##   [137]    6750    1500     270      79    2375      41    2500    2000
##   [145]    1000    4000    1500     314    1500      60    1250      87
##   [153]    3000    1000    5000    1000      97     462   19250    5299
##   [161]     937    3829    3000     525    1000     478     296    7107
##   [169]    1000    1250      49     593    7500    1750     186    1375
##   [177]      25      60    1500    4500     236     500     175    3000
##   [185]     318     110    3250     100     875     158    3000    1500
##   [193]      61     244     669    7878      63    1500     253     974
##   [201]      85    9250     169      40    1000     476    1500      25
##   [209]    2206    1028     285     432     560    1250      34      32
##   [217]    1000    3500      90    6000     401    2200     428    2600
##   [225]    1000    2500     161      75    3500    2500      33    1250
##   [233]     963     309    3000     750     262     481     213      36
##   [241]    5000     124    1800    2000     167    2000    2000      44
##   [249]    1200      79     267    3000     732   20500    1250    1849
##   [257]   22250     240    2000    1000    8081   37750    9500      71
##   [265]    4500      95     894    1375     128    1250      35      27
##   [273]      85    1000     210     750     413    1374      29    1500
##   [281]     167     123    1250    1000      80    1035     671   15520
##   [289]     341    8500    6572     353    4500      32    1000     153
##   [297]    2000    1000    1000    6000    2585    1765    2000    7000
##   [305]     201    1250     804    4500     208     815     669    1000
##   [313]      90     583    3175     221    1065    2000      27    2000
##   [321]      49    2500      73     628     669    1500     396     617
##   [329]    1250      74     168    2000      78    5500    1250     202
##   [337]     875     528     291    4500     162    3000    1000     750
##   [345]      42    1500     104    8777     709    2375     580    7000
##   [353]    1038    2250    5813    1750     472      74    3000     461
##   [361]     103    2500     656     387     110    2375     625     496
##   [369]    1000      49     123    3000    4688   70000    1500      71
##   [377]    6250     800     400     320     365   11250     411    2000
##   [385]    1000      79    1250     138     292     252    1750     374
##   [393]    7250    3300    2000     159    2000     124     885    2000
##   [401]     208    2000    1000     122    4000    1752    1000     687
##   [409]    2773   30500    3000    1144     500    2750    1153     376
##   [417]    2000     834     916    2500     753     185    7400    6250
##   [425]    1937   24750    1250    5872   15250    1035   25750    2500
##   [433]     327    2589     722   16000    2170      52     500     587
##   [441]    1000      88      71    3750    1043     792    2039    4000
##   [449]     467     337    1000    3375    6500     239     347    2000
##   [457]     237    2341     468    2329    1100  105000     756    1000
##   [465]      97    1250      53     619    1050     316     300     669
##   [473]    1000     151    1000    5250     295    3250      87     126
##   [481]     262    1750    4108    2000    1986   11000     750     270
##   [489]      33    1000     140    3750     283    1024   21000     273
##   [497]     668     273    2000     500      63    1250      47     116
##   [505]      85     382    2000    2500    3000     243     927     669
##   [513]      66     111    2500    4000     172    1000     124      51
##   [521]    2400      78    1000     371   76710   80621    3500     976
##   [529]     343    3000     750     750     199     235    8000     184
##   [537]     177     690    1000     134    1000      79     271    1000
##   [545]    1560     174    2750      56    1250      85     186      67
##   [553]     384      47    2000    4702   26400     484    2000     199
##   [561]    1500      40    1000      80     230    3300      51     475
##   [569]    2000     260    1000     758   27000    1250    1057     625
##   [577]    9750    2206      44    2000     277    4614    3750     287
##   [585]     182    2500     636     384     317    3000      56     173
##   [593]    1750     136    3750    1250     149    1600     314     750
##   [601]      27     750     216     251    5000      25    2000      37
##   [609]    6600     127    1100     504     750      85  116693  105811
##   [617]   19093    1172    1000     750     109    1250      39    1200
##   [625]      87     173   10500     326      85     800     114      67
##   [633]    2000     196      75      59     700     243     573    1805
##   [641]     296     562    1413   11250     435    2000     149    1125
##   [649]    2000    2000     168     875    1250     137    1368    6400
##   [657]    5600    1000     149     725     623     136     736    1153
##   [665]     493    2750    1750     779     625     625      52     822
##   [673]     445    2150     241    3200     541     160    5000     129
##   [681]    2000    1250     163     635     252    1115     459     520
##   [689]    1000     275    3000     260    1750    1500    1250      25
##   [697]     521    2000     251     905     669      63    3750     437
##   [705]     583   13250     422      27    1250      86     532     384
##   [713]      73    3250      80    2200    1000     114    1000     120
##   [721]     423    7500     222    1000     195    1000    5748     375
##   [729]    1250     121     929     804    1000     130      90    1750
##   [737]     281    4250     570     261    4375     471     341    3500
##   [745]      39    1750     750    1250      28    1000    1500     352
##   [753]    1000     298      47    1650     537    7543   29725     500
##   [761]      86     102    3000     109    6000   50000    1500      81
##   [769]     397     533     625     355    1000     200    5500     600
##   [777]     369    2250    1000    1250     194      55    1500    2250
##   [785]     289     145    5000     283     258   13500     264     505
##   [793]    3500     555    2500    1000     465     387     610     384
##   [801]    1189     290   25000      68    3000     277    3000      27
##   [809]    2500     313    1250     139      37    1000      84     252
##   [817]    8250      33   18063     281    8500      68    3000      91
##   [825]    3000      44      85    1500      67    1750    2500     155
##   [833]     800      25    2500    1000     107      67     500      95
##   [841]    2500     131    2000     220    2000     485    3085    1218
##   [849]     777     231    4000    1500     750     183    5057   15682
##   [857]    2464    4291      90    2000      88    2000     110      27
##   [865]    4000     263    2000    1748     690    9600      63    1000
##   [873]     374    4500     192    1000      58    1000     221    1250
##   [881]      59     500     427      85     375     113      50     568
##   [889]    1000    2000    1000      86    1000     289      82      28
##   [897]    2750     625      77     625    1400     301     578     330
##   [905]    1750    1000      84    2000     886   16000     218    1500
##   [913]      54    1000     286    1074     549     115    2000     395
##   [921]    6500     264     304    3600     236    4500     370      30
##   [929]    2500      89     865     669    1000    1000      91     248
##   [937]     500     215    4750      31     516    1000    1000     195
##   [945]    1000     252     500    6375     318    1000     226     115
##   [953]    7225     289     650     629     247     800     346    3300
##   [961]      47     750     327     285     549     625      75     500
##   [969]     104     747     384     750      32     750      71      56
##   [977]    4500     164    2000     353    1000      88   19500      45
##   [985]    1000     111    1050    1327     669    1428     975     164
##   [993]     910    1000    1207   17000      85      31    8835     601
##  [1001]     669    3500    2000    1750     750      84      47    1500
##  [1009]      52      89     650    1250     723     560     426     387
##  [1017]     120    1500     313     877     384     666     415     171
##  [1025]     907   31000    1875     216    8500       0    1500    4000
##  [1033]    1250    8575    2002   26250     644      46    1600      94
##  [1041]    1000    1000      69     500      72     539     384      97
##  [1049]     500    1310   19750     245    1000     750     203     492
##  [1057]     455     945     638     258      51    5500     622      55
##  [1065]    2200     190    4000      38     925     144    8000     639
##  [1073]    1500    1167     669     299     500     290     358    2400
##  [1081]     470    4250    5750     537     487     728     669     290
##  [1089]     358    2400     853    1375     193    4125     684     390
##  [1097]    1000      28    3150     856    3750    1465     104    2750
##  [1105]    1000    2000    1925    2400     142    1250      37     669
##  [1113]    1000     126    1250      84    2500     172     275      70
##  [1121]     438    1000     625     269    6062      64    1500     101
##  [1129]    1375     131     102    3500     134     500     264   11500
##  [1137]     674    5000      25     625      96    4189    1000     254
##  [1145]    1000    1000      26    1551    7950   22500   41975    8957
##  [1153]     684     245    9500     218      66     675      64    3000
##  [1161]      87    1172    5579    3000     594     320    3000      26
##  [1169]     252    1750     185    3500      73     192    5000     532
##  [1177]    1500    1000     186    1435     166    1000      61     465
##  [1185]    3500     838    4500   11289    3500      44    2000     205
##  [1193]    2000      85    1500     100    1000     528    1250     306
##  [1201]    1250    1000   65278    1000      82    2250     366    3000
##  [1209]    1619    8000     651    2000   10144     650     387     102
##  [1217]     380      47   12000     221    2000     393     481   17000
##  [1225]     559    2000     698    5500     464      63    6250     186
##  [1233]     330    2200     138    1000    3000    1250      25    3000
##  [1241]     208    2000     216    1250      37      47     178    2000
##  [1249]    1522     669    1216     692      53     575    1012     669
##  [1257]     456     350     500     374    1059     105   26500      50
##  [1265]    1000      36    1000    2000     407     990     187    1750
##  [1273]    1800      26    1000     750     750     124      44    1000
##  [1281]     450    2000    1144    2500    1000    2000      58     314
##  [1289]    6750     572    2500     250    1000    5000    1750    1500
##  [1297]    2400      67      63    1500     178    1750     992    7250
##  [1305]    6416      33    5000    1056    2850     174    1000     559
##  [1313]      71    1750    1000     750     107    1500     533      30
##  [1321]     625    2500    2000     189    1000     621     669      66
##  [1329]    2400     790     144    3731    1000     522     500     229
##  [1337]     875     777     264     103    1000      33    1000     237
##  [1345]     112    1000     127    2000      28    2000    1500     367
##  [1353]     800      25      33    3000      84    5500     147     984
##  [1361]      62    1059     677    1000     427   10000     176    1000
##  [1369]     148     500     165     750     167    2500     125     706
##  [1377]    1500      68    1000      79      29    2250      81    2250
##  [1385]     155    1750    1018    1500     336     230   11500     167
##  [1393]    9500     416    2500     132    1650     308   10888    2000
##  [1401]     126    1000    1750     165   50000     285     245    1750
##  [1409]    1000   12500     960    6000    2619    9750     967   29000
##  [1417]    1250    3000    1750    4000   81911     949     638      69
##  [1425]     513    1000     116     235    5250     157     592    2050
##  [1433]      78      99    1500     158     927    6500    1062     123
##  [1441]      67    3500     120    1250     200    1000      91     954
##  [1449]     643     236     625     100    3381     470    9750      31
##  [1457]    5400     653    3000    1500      62      32    1000     230
##  [1465]    1250    1000      75      66     550      94     394     376
##  [1473]    2000      30    1000      67     220     315    1000    1825
##  [1481]     235      47    3500     379    1750    4000     362      33
##  [1489]    2500     105      33    1000     156    1000    1690    9200
##  [1497]     776     387    3000     601     669     162    1200      50
##  [1505]     625     137     176    2000     566     103    2500     502
##  [1513]     813    2000     269      38    1300     196    1253      67
##  [1521]   19000     344    3649    9500     709   13000    1000      26
##  [1529]    4447     690   19050    2722   18500     951   20000     577
##  [1537]     102    1000      27    1000     117    1131     282    2500
##  [1545]      47    1750    2942      53     111    2500     772     560
##  [1553]     557     110    2000      54     449      42    1750      52
##  [1561]    3000    3000      41    3000     146      50     350     109
##  [1569]   31977   37732   21294   12400   10123    8600    3800    5500
##  [1577]    2500    1750      35     231    4000     632     560    1500
##  [1585]      57      53    1000     102     838     144     106     657
##  [1593]     296    4950    1250      64    1000     104    1250    2138
##  [1601]   17250     416      26     750    1500    2000    6393    1307
##  [1609]    2250     187     622    1000     500     243     819    9000
##  [1617]     195     143    1500     163    4500    3750     365      47
##  [1625]   14000     210    1250      33     668     799      26    1000
##  [1633]    2187     625     382     129    1405     807     669     726
##  [1641]    2250     274   37190     875      88     475     912    4000
##  [1649]     387    2400     282     384     999     750     551    2500
##  [1657]      44    1250    2000     552     384      89    3500     316
##  [1665]    1044     264    7388    1000     728     437    2800     289
##  [1673]    4900   13734    7350     281    3000     101    1500     625
##  [1681]     121    2500    1348     269    2250    6500   47220    1000
##  [1689]   31500   11000    3250    2000     655     581    1000     295
##  [1697]      65    1750     551    7250    1600      82     445     213
##  [1705]     500      48    1000    8155    3416   30500     800    1250
##  [1713]      88     413     234    1457      80    2000    1071    9499
##  [1721]    5705      99   44500    1716    7000     119    1800    1000
##  [1729]      36     242    2500     416    2500      49    1250     264
##  [1737]      73   12000     590      90     725     155    2625     148
##  [1745]     500    1000     149      69    3500     219     439    7500
##  [1753]     272     932    7000     431     159     750     453    5500
##  [1761]    1000      44    1000      30    1000     224     750      65
##  [1769]   11250     700      55    3500     113    1500      73    1500
##  [1777]      31    2300    3000     292    6750      60    1750      88
##  [1785]    2750    7500     277   11000    1000      25      63    2100
##  [1793]     281     194     384    4500    6500     113    1020     669
##  [1801]    1074     506    1000    1000    1500      99     750     284
##  [1809]    5000     176    1167     376    2000     409    6750     543
##  [1817]    2000      63      66    5000     171     409    7000     706
##  [1825]   13500    1000      85     875     518     196    5500    1000
##  [1833]     165     363     294     505      25    7470     446    3500
##  [1841]    1118     860    4000      95     625    2000     101      62
##  [1849]     850      93      62    1700     720     549     538     330
##  [1857]    1750      38    3750     283      29    1375    1750      60
##  [1865]    3500    7000    7783   25500    2219   12000      42    2000
##  [1873]     143    1000      48     460     273    2000   25278   50449
##  [1881]    2500     221     750     107    1250     194      80    1000
##  [1889]     728      47    5750     264     223    2300    1000     212
##  [1897]     750      42      85    1352    6037     769     148    3400
##  [1905]     738     290     903     384    2041     945   13726    1134
##  [1913]     120   13500     554   60480    1000      96     197   10000
##  [1921]     378    2813    4750     210    1000      90     798   10250
##  [1929]     101    8000    3548   53500    5000    5750     129     503
##  [1937]    1000     349    4000      78     234     742    1000     123
##  [1945]      33    1500    2000     141    1250      84     795     358
##  [1953]    2400      70      47    1000     134    4000      58     750
##  [1961]     410     800     307    1875    2000    5438  617548      58
##  [1969]    1500     500    2252    9000    8000    1250     143    6450
##  [1977]    1750     670     560      31     206    5000     179     750
##  [1985]     725    3959     374    2329     139      63    3500      43
##  [1993]     317    1500     902     669    2000    1000     517     666
##  [2001]     153    1700    1563    1000      28     600     125     506
##  [2009]     706     878    4750     725    6750    1000     134     659
##  [2017]     669    1092      86    4816     173    2500    1000     110
##  [2025]    1500    1000      49    3000     130    3000    2000    2000
##  [2033]     780     575      81      27     275     567     750     296
##  [2041]    3500      33    1000     364    2000      79    7000     625
##  [2049]    3000    1198      47   10500      75      38    1000     235
##  [2057]    2000      32     498     509     973     669    2000     256
##  [2065]     377     384  103104     522     719     549     128    2800
##  [2073]      65     734    1500      97      72    3000      76    2250
##  [2081]     360     799     278    1200      98     120    2500    3000
##  [2089]     341    3500     172     738    1000    1000    3000      72
##  [2097]    1500      50    1250     259      41    1500      85    1500
##  [2105]      89      46     750     106      88     365     750     552
##  [2113]     669      84    1000    1000     104     385    4500     555
##  [2121]    4000      45    3000    4500     950     446    1000    3500
##  [2129]    1295    7500    3000     617    1000      54     170    3500
##  [2137]     399    1000     198    1800     132    2500     265    2500
##  [2145]    2500     346    4500     210     500      97      38     750
##  [2153]     164     157     387      90    1000     267    1020     560
##  [2161]      55    1500      83      30    2000     345    2375      90
##  [2169]      88    1500     665      79     669     602      62    2578
##  [2177]     750     345     750     202    5750     284      74     750
##  [2185]     428     292    1750    1000      48     242    2500      31
##  [2193]    2400    2250      93    1000      54    3500      82     107
##  [2201]    1250    1000     189    5000     335     694     549     591
##  [2209]   10000     221      47    3500     216    2333     525     387
##  [2217]    3875    2000     233    3000     165    1500     175     111
##  [2225]     343    1750     940      26    1500    1054    8000     257
##  [2233]    1500     137    2000      42     592   10500     472     325
##  [2241]     280    3500     671     384    1000     109    1000      82
##  [2249]    5500    1186     437     118    2800    1507     622    5000
##  [2257]     684      58    5625     551    1000    2000    1000     337
##  [2265]    1500      46    1000     556    6086     298    6500    1000
##  [2273]      88      49    2000     223    1625     110     649    1500
##  [2281]    1305    5000     500      99    1454     402    2000    1000
##  [2289]     117     249     901    1000     348    2000    3750    1500
##  [2297]    2250      90    3250     977   11700     139    3750     804
##  [2305]     669      29    4500    1067      62    2094    9772    1000
##  [2313]      33      74    2750    1000      84      85    3500     127
##  [2321]    1250     189    1197   15150     611    1750    1625      80
##  [2329]    3250     312   57460  857698  156000   10900       0     139
##  [2337]     750     114     797     846     309    3000    1108    1250
##  [2345]     403    3500      26      55    7500    3000    5000     616
##  [2353]    2300     500      62     500     210     267     415     111
##  [2361]   15104     394     560     177    1750     750     431      64
##  [2369]     435    7000   35529   22000   26010    1500     174     750
##  [2377]      95      30      99    2000     154     955      96   52000
##  [2385]     393    2350     578    3750     669    1650     669    1000
##  [2393]    5000      80      60    2500      49    1000     750     346
##  [2401]      42     387      53    3500     750     800     625   37500
##  [2409]     149   12000     729    2000      69    1000    2000     486
##  [2417]    1080      33    2500     144    1250    2375     190     145
##  [2425]      67   15000    1000    2500     659    1012    6200    1600
##  [2433]      28    1000      28      88    2000      98    1076   12000
##  [2441]     563     309      60    8700     536     564    2500    5750
##  [2449]     830     638    6000     165     800     107    2075    1028
##  [2457]     656    5375   10052     491   18813    2500     295    3000
##  [2465]    2500     750     176     500     139     224   11094     834
##  [2473]    3000     121    2750  101734      40    6000     322    2000
##  [2481]     227    4000    4875     722    1500    3000      90     725
##  [2489]    2000    1200      75    3553    1000    4500    3000    1400
##  [2497]     197    5000      27    1000     599     669    2000      49
##  [2505]     476     669    1250      98    1000    1000      89     529
##  [2513]    5125      46     807     384    1636    1208    3000     110
##  [2521]     694    2750     271    4000     222   15250     168    5222
##  [2529]    3999    2000     199    2000     354    3000      44   12000
##  [2537]   13600    7000     600      25    1000     129     750      25
##  [2545]    1000      31     176    1500     525    7000     229     625
##  [2553]     108    2000    1504     389    9300      50    2000     155
##  [2561]     572      48     800     750    1250     258    2600     247
##  [2569]    1000      53    1500     533    6000    9750    1750      44
##  [2577]     770     638    6000     103     514     655     688    2500
##  [2585]      81     180    2750     221    1000     184    1505   10500
##  [2593]     141     956     669    5000     317     589    4500    1424
##  [2601]    6500    1875     926      50     332     531    7500     638
##  [2609]    1665    1218    1000     297    1000     203    2500     114
##  [2617]    1500     110    1500      85     500     121    1250      92
##  [2625]     260    3500    1000     425     487    1246     150    2400
##  [2633]    1000    1317   14000     804    7750     893   11750     381
##  [2641]    2183    8750     189    1000     669      36      79    1250
##  [2649]    1000    1096   13000    1135     633    1000      84    1500
##  [2657]    2250    1250     222     647     387     500      40    2340
##  [2665]     561     273    2000     875    1500     140      68    1000
##  [2673]      95     332     550      58    2000     739    3000      50
##  [2681]     293    1000      25    1250     173    1000      73    2000
##  [2689]      38      25    1250      27    1250      32    3049     660
##  [2697]    7454     143    9833     174     750    3325     236    6250
##  [2705]     114     119    1500    1000      42    2000    8325     500
##  [2713]    1250     221      45    5250     130    6100     446    3500
##  [2721]     383    2750      58     728    1250     761    3750     161
##  [2729]    1500      83    2000     325    2000     204    1250     432
##  [2737]     320    1200     532     384     130   14000     355    1931
##  [2745]   15000     436   15750    2000     172    4000     708    1750
##  [2753]    2250     454    1750     288    4000     284    5000    1000
##  [2761]    2000     101     950     700     137      27    1000     116
##  [2769]    3750     607     322    1000     200     790     202    5000
##  [2777]    4800      25     500    1250      92     500     624    3000
##  [2785]     346     700     122     764    7000     190     275     376
##  [2793]    2000     750      93    2000     372    1500      73     159
##  [2801]     700     367     318    1750      60    3000     629     625
##  [2809]      61    1000     108     925    1750     860    1250      96
##  [2817]    3593     282    8500     100     875      26    1000    2500
##  [2825]    2500     413      79    1250      91    1500    3600     303
##  [2833]    6750      26     309    2750      56    1200     126    4000
##  [2841]      44    2000     170    3000      64    2500     165    2000
##  [2849]      77    2000     315     458   10000     643    2000     350
##  [2857]    5500     114    1500      86    4816    2000     251     276
##  [2865]    2325      89    3000     489    1250    1250      93      47
##  [2873]    1500      67    2000     245    5000     350      60     750
##  [2881]     750    2389     388    2400     298    1700     205     126
##  [2889]    3750    2300    1750      77    1500      71    1000      96
##  [2897]    1000    3500    1500      82     750    1048    3000     169
##  [2905]    3000    4093     188    3750     633     309    3000     800
##  [2913]     304     875     669    4450     406     306    1750    1500
##  [2921]     802     429   11250      81     530    2000     472      70
##  [2929]     800      90    6250      84    7500      65      84    2000
##  [2937]     340    1250     279    1723    5250     684   22000    2000
##  [2945]     181      62    1000     235    6750     479    1000      33
##  [2953]     103    4000    1000     117    1000     243    1500    2078
##  [2961]    1500     786    1750     146    2000      46    1250     113
##  [2969]    1902    1218     708     390      72      66    1000     464
##  [2977]   15000      42    1750    2000     159     562     562    1000
##  [2985]     166    2750     103    2500      31     500     159     692
##  [2993]   11700     679    1684     267    3500      95      47    1500
##  [3001]     500      88    2000     975     669    2750    1000      42
##  [3009]    8041    1385   35000    1750      98    1209      97    4250
##  [3017]     176     824    5500     151     750     148     126    1500
##  [3025]      28     190    2750    1250     249    1687     750     220
##  [3033]    1050      99    2000     625     268    4750    3750   21534
##  [3041]     233    7500     118    2500      41    3500     625   13071
##  [3049]    9300     390     560      34      67    1000      86    1000
##  [3057]     500    4500    1664     929    7000     246     594     236
##  [3065]    1000      96     444     350     709     459      71    2500
##  [3073]     122     199    1750      88    2500     215    3000     158
##  [3081]    3000     302    3750     169    3000     276     430    2000
##  [3089]     492    5213     464     417    2500     129     160    4000
##  [3097]    1000     133     223     424     490     390      84     285
##  [3105]    4000    2466   45750    2253    3500     746      91    2614
##  [3113]    2813     826      25    2500     156      55    1250    1000
##  [3121]     145     316   12250    3500    4750     111     531      54
##  [3129]    9500     155      38    4375     100      75    3000     527
##  [3137]    1500      91     445     213     196     390   14000    3500
##  [3145]    9444    5333    3500    4750    1250     525     625      64
##  [3153]     320    3000    1500     299     600     486     523    3500
##  [3161]     500    4521    3000     232   27450    1250     235     102
##  [3169]    1000    1000    1828    3000    1584     690    9600    3000
##  [3177]     199      87     650    4682     446    3500    3000     255
##  [3185]    1074     487    1050    2500      51    1000      97    5000
##  [3193]     199    7000     181     580    3250      49     480     223
##  [3201]   26129     237    1375    1000     669     560      93     596
##  [3209]     500      93    3500     603     560      29    2400     848
##  [3217]     280    3500    5000    1200    1325     786    9625     584
##  [3225]     560    5202     143   13395     500    1250     348    2000
##  [3233]     750      77     945    1108     669    2000     265    1000
##  [3241]     196     192    1500    4000     432      78     486    1067
##  [3249]     236      83      74    2000    1750     767     669    1566
##  [3257]     805     650     871    3000     391    2500   75108    1000
##  [3265]     271     700    1000      99     908    2000     293     590
##  [3273]    1750     576     157     529     150     140    1250      28
##  [3281]    4000     350     501    3150     338    1163    2000     336
##  [3289]    2500    1000     373     413     459    1000     245     457
##  [3297]    1800    5250     338      74    1250     146    1500      69
##  [3305]    2750    1000      31      27    5500      65     831     560
##  [3313]    1000     497    3500    1420    3000      76    2500     625
##  [3321]      82     875     932     459      29      61    3000     379
##  [3329]    1250    1000      96    1005     384     212     625     589
##  [3337]    7425    2000     620     330    1750     609     384    3500
##  [3345]      67    1000   40952    1000     371     560     312    8250
##  [3353]     452     972     167    3900    1000     241     550     276
##  [3361]    2000    2250    1100     128      68      85    3500      97
##  [3369]     750      77     554      78     384    3905     750     402
##  [3377]     384     118   10027   54250    1382     120    1227     300
##  [3385]     669      44    5750      72    8800     113     307    2250
##  [3393]     995      85   12750     229    1700      61    4000      65
##  [3401]      48    4000     226    1000    1250      77    1000      28
##  [3409]    1250      26    6000     144      43     500      95    3000
##  [3417]     388      48      47    2000     386    2000    1109     669
##  [3425]    3644     687      42    1250     192    1471    1250     487
##  [3433]    2072      38    1000      87     930     427   33705     137
##  [3441]     625     790     459     169      79    2500    1323    6750
##  [3449]      72    4000      51     591    1050    1069     638     440
##  [3457]    7500     354      27    2500     123    1000     128     806
##  [3465]     318     647    5250     102    2000     167     702     750
##  [3473]      66     534    2200    7000     163      78    8500     325
##  [3481]     750      52    1500    1250     106    3000      60     476
##  [3489]    7250      61    1320     669      47    1250     255     833
##  [3497]     560    2000      96   50000      63    1250      25    1750
##  [3505]     102     249    1750   47067      47    2400     500    1250
##  [3513]      42    1000     107     625     100      29    1400     170
##  [3521]    3000    1000     625     132    1000      37    1000    6280
##  [3529]    1273     813      49    2000     104     782   10000     451
##  [3537]    1200     800     466    7750      81     812     273     922
##  [3545]    1173   10000     807     669    2550    1000     173     140
##  [3553]    4500     243     769   10875     776     619     184      56
##  [3561]    2750     435     384     750     750      46   37500    1500
##  [3569]      74    2750     155    1000     514    1211     511    5500
##  [3577]     625     117    7800     121    5750     243     839    1748
##  [3585]   13500     602    2625    1290     650     795    1000     742
##  [3593]    1850   10000     252    3250     851     384     509     509
##  [3601]    6650    2000      47    1000      94     106    1000     143
##  [3609]    2375     148      32    2000     545     384    1266      85
##  [3617]     242    2750    9312     901    7250     210     102    1000
##  [3625]     154     550     586     560      42     464     264     351
##  [3633]     439    3000     750   90000     102     600    2000      56
##  [3641]      63    1250    1588     455    3908    2000      73     750
##  [3649]      76     309      25    2500    1250     650      59    2000
##  [3657]      74    1875     192    5500     133    2330    7500    3071
##  [3665]   28725     572   24000     485      63     663     750     560
##  [3673]    1074      70      66     750      63    1000    2000     317
##  [3681]    1000      26    6000     484     252    2625    1000    3500
##  [3689]      25      37    2000     131     500      29    1183     290
##  [3697]   25151    1000    1500     104    5250    2000    1000    2000
##  [3705]     165    2000      58    1000      55    2500    1000    1000
##  [3713]    5250     121    1250      47      51    4375     750     424
##  [3721]    9250     213     492      65    1384    1000      49    3000
##  [3729]     281     276     384    1000     137    2000    1500     403
##  [3737]    5500     266      38     233    2500     166    2000     471
##  [3745]    2750    2779    1070    2000    1750      37    3750     194
##  [3753]    2714   33250     373   32500    1250    3000    1000     339
##  [3761]     682     950     390      65    1250     120    1655   13250
##  [3769]    1500     175     625      62    2000     156      83      78
##  [3777]    4500     200    1000     750     822     560     419     390
##  [3785]     648     384    1000     785     560    6057     822     612
##  [3793]    1900     529     500     500   13334      47   79000    2609
##  [3801]      87    1500      55     750      99      47    1000    1000
##  [3809]     650     113    1000     483    2000    5500    2000     203
##  [3817]    3750     212    1000     710     273    2000    1000      62
##  [3825]     859   15000     679      39     600     177     185    2150
##  [3833]     185     655      47     209    2500     602     213     522
##  [3841]     542     549     472     402   25464    1000     154     625
##  [3849]     126     500     160     518     384    1750    2000      92
##  [3857]     875     132    1500     500     750      74     233     206
##  [3865]    2500    1250      47    1000      57    6500     349      47
##  [3873]    1000     230      53    1750     250    3500    1750      47
##  [3881]     750     194    3750     514    1000     724     290      96
##  [3889]    1533      94    1475     179     814   14250     108    1000
##  [3897]      25    1000    1000     154     750      30    1100     249
##  [3905]    1100    1000      81   25000    2000     625     552     669
##  [3913]    1000      68    4000     146     392     459    1250     116
##  [3921]    3375    1000     127     910     671    6000      34     750
##  [3929]    1250    1250     450      50    1000     108    1000     166
##  [3937]    1000     513     413     669     242    4500      31     133
##  [3945]    3000     267     336     345    6406    4000    1866   22500
##  [3953]     750      99      91    2500     500      57     898     390
##  [3961]     105     140    2000     182    1000     183    1093     487
##  [3969]     141     858     669     745    1000     319      29    1600
##  [3977]    1018   16000     164     784     202   11153      52     625
##  [3985]      29     750     251     614      85     866      74    4500
##  [3993]     318     500    1005    1071   15000     625      56     397
##  [4001]    7425     244      89    2000    1500     185    2500      73
##  [4009]    2250     272     750    1000      31    1250    1780     671
##  [4017]    2000      88    2000     100     864     264      56    6000
##  [4025]     762    1120     498    2594     609     460    1750      55
##  [4033]    1875     115     542     500     277     385     750     129
##  [4041]    1630      64    2800    7500     199    2500     209     176
##  [4049]     925      30     205     126    3000     132    3250     177
##  [4057]    7126     168     925      40     669      38     625    1500
##  [4065]    1500    3000     213     234    1500     529    7000    5876
##  [4073]    3250      39    2500    2000      63    1000    3000    3000
##  [4081]    3885    4440    1500    1750      81    1000      54      75
##  [4089]    1000      99    1500     149    2500    3300    1834    9261
##  [4097]   40000    7500    2500    1000      85    1500     105     300
##  [4105]    1075     718    1000     228    2000      59      38    1000
##  [4113]     117    6000     357    2000     102     352      78    6000
##  [4121]     927    1250     638      29     163      75    1750     308
##  [4129]    4000     143     135    3750     127    2572    7000     405
##  [4137]    1500      92     900     314    1000    1338      31    4000
##  [4145]     434      99    3000     625     262      60    4250      27
##  [4153]    1250    2000    1000    1000    1261    1500    1000      63
##  [4161]     577     610     297    3500      94    2000      27    1000
##  [4169]     213    1018     223    3250     500      96    1000     109
##  [4177]    1000     112     712     387     542      44    2000    3695
##  [4185]      88    2000     444    1000      60    1000    1198     646
##  [4193]    1000      64      60    1750      37    2000     425     487
##  [4201]     210     750     148    1000      49     190    3000    1009
##  [4209]    4000      67    4250      55    1250    1000     128      75
##  [4217]     111    2500    1000      47    5500     108    1000  152466
##  [4225]    2000   37500     385     188    1000    3593    1500     668
##  [4233]     384      27    1750    1250      59    2000     841   11500
##  [4241]     315   12000    2000      79    1500     260    1500     919
##  [4249]     669    3000     149     531     384     606     384    1000
##  [4257]      46    4750     254    1368    7975     429    6000      69
##  [4265]    1500      57     179     550    3850      66    2000     671
##  [4273]     638      63    2000     115    1843    3000     187    4000
##  [4281]     875    2000     262    2250     275     519     609     589
##  [4289]    3000     332    2500    2970    1000    2500     142    1250
##  [4297]     750     750     947    9000    3500      76    2000    1000
##  [4305]     400    5500     971    9000  106622    8750     750      41
##  [4313]     708     273    2750     500      96   12000     880     794
##  [4321]     858     262     132    3250      94     477     384    1750
##  [4329]      59      29    2000      37      77    1750     254     233
##  [4337]    2500      66     625    1700    5318   37500    6013      30
##  [4345]    2000     724     560      82     500      27    1500      63
##  [4353]    6000     158    2250     151    6500    2000     146    1000
##  [4361]    2000    1000      82      69     750    1466     280    3500
##  [4369]    5000   26250     203   18496    1000     133    1000    1000
##  [4377]    1800     267    5500     170      45    3000      73    2500
##  [4385]     500    8000    1000     292   11563    1867   71875     176
##  [4393]    7750     612    1750     100    2625     132    1000     418
##  [4401]    1750     625     167     625    2500    1000      47     750
##  [4409]     116     195     590    2478    1000    1250      56    3000
##  [4417]     546    4500      42    2000     938     236    2750      88
##  [4425]      55    1000      28    2813    1000     363    6000     112
##  [4433]     168   17250     530      38    1000      76    2000     160
##  [4441]      44    1250      61    5000     415    1000     854     376
##  [4449]    1142    9000     560     900     384    2250     169     750
##  [4457]    1250     500     695     343      36    2000     254     306
##  [4465]    1750    1000     216     648    3000     705     510      77
##  [4473]      78    2000    2300      71    2500     115    2000    1250
##  [4481]     232    3500     101     916     292    1750     335     290
##  [4489]     373    1000     130     850    3300     101      85    2000
##  [4497]      27    1000     109    5200    1252    6000   26250      27
##  [4505]    3750      40    1250     875    2000     337    2500    1500
##  [4513]      83    6250     335     228    1572      33      63    1000
##  [4521]      29   12000    1000    1500      46     155    4500     750
##  [4529]    1250     102     726     769     750     127    1000    1000
##  [4537]     423   10750     271    1000     114     675     182    6000
##  [4545]      91    2500    2300      43    2000      78      33    1000
##  [4553]    1000      95    1000    1866   29500     521    1522     470
##  [4561]    4000     350     180    1250   14183     360    6975    1000
##  [4569]     750     142      53    3000     286    1298   18000     896
##  [4577]     523    1800     269      85     411    4000    1209     797
##  [4585]     628     415     163     625      50    4500     267    2563
##  [4593]    1218      47    3000     197    2000     125     132    3500
##  [4601]    3200    1202   19750     589      48    5250     403    3750
##  [4609]     235     631      85    7000     819     183    1000     120
##  [4617]     181    4000     524    3500    2000      71    1017     770
##  [4625]    1571     264    2813     301    2000     275     584    4500
##  [4633]    4750     317    3000    1000     793    4125    5500     777
##  [4641]      79     794      49    2500      60      66    1500      31
##  [4649]     750      99    2250      26    1000     328   12528     227
##  [4657]    6000    2813     334    7500      82      63    2375     159
##  [4665]    1000     107      45     750     157     387      71     233
##  [4673]    2500    2000      28    1000      48     500    2000      57
##  [4681]    1500      40    3300     953     669     761    1250      30
##  [4689]    2750      45    1500      60    2000    1000     114     160
##  [4697]    2000     157     387      66    2625     926    1000     251
##  [4705]    1000     510    3000     520     621     384      87    5000
##  [4713]    1264     355     288   14000    1943    2500     545    1000
##  [4721]     390     560    1250    2300     261    2500     438    1216
##  [4729]     127    6000     150    1200     118    1250      41    1250
##  [4737]      55     121    1000     193     298    8000     333    1478
##  [4745]    5850     172     631      63   12000     323    1355     607
##  [4753]    1875      55    7250     381     750     187     175     500
##  [4761]   10000     917     638    2250     492     560   10391    1010
##  [4769]     669    1661    3500     148    1500     844     669     262
##  [4777]    1750    1088   35500     781     157     387     500     750
##  [4785]    1937    7000     225    5250    1250     188    3500     131
##  [4793]    4000    1250     127    9974    2500    1264   72750     750
##  [4801]      88      42      88    1000      36     600      63    3500
##  [4809]     314     750     245   12500     838     150    2400      45
##  [4817]    1000      66      89     925      83     354   11500     522
##  [4825]    2750     793    2531     999   14144    2500    1000    8500
##  [4833]     749    1750    2500     228     803     465    1750    3148
##  [4841]   38250     773   14444     549     114     235    3500    3500
##  [4849]     137    1250     170     621    5641      67    1341    1200
##  [4857]      67     569     925      81    2163   15500     463    2500
##  [4865]     186      78     518    1250    2000      26      82    2000
##  [4873]      51    1000     611    1375     386     150    2400    6677
##  [4881]     251    7900    1152     487      67   25000    2375      63
##  [4889]    1500    2000      39     102    1000     687     669     500
##  [4897]     266     765     351    1750     762     429    4732    2000
##  [4905]     193     137    5750     405     143      47    2500     212
##  [4913]      53     750     430     219    4500     544    4000     331
##  [4921]     536      29    1000     160    2000    2000     569     390
##  [4929]    5030     101    1000     129    1405     532    9000     192
##  [4937]     102    1000     750      80    1250      44     251    2500
##  [4945]      47    2000      34      47    3000      65     126   18500
##  [4953]     265    1000     103      66    1250     189    6500      66
##  [4961]      27      39    4000    1029     669     500      86    1200
##  [4969]     195     381    1500      72    1000     114    1500     118
##  [4977]      30     750    2625      57    4000     544    7000     138
##  [4985]     825    5025   28000    1051   18500     575    1000     173
##  [4993]      31    7949     126     299    2500    2000      84    3750
##  [5001]     153    2500     211     140    1000      31    2750     128
##  [5009]    1500     117     200    1500     191    1233    2000      93
##  [5017]    8500    3000     173     456    8000     150     171     800
##  [5025]    3300      33     900    8000    1000     750     850      55
##  [5033]     890     309   12000     355   22750     740    1000     169
##  [5041]    1500     102    1800      79    2000     237    1000      27
##  [5049]    1250     600     262    1750     275     150    2400    2000
##  [5057]      47    1600      74    1500    1000     176    7500     750
##  [5065]    1500    2550     154    3250     110    2000     116      27
##  [5073]     306    1750    1000    1250    1500     603     813     542
##  [5081]     459    2000    1000     316     329      78    3500     125
##  [5089]    1000      69    1250     144    1416    1250     126    1000
##  [5097]      99    1000      65    2750    4750      25    1000     575
##  [5105]   18500     232     900     143    1350      85    2000      96
##  [5113]   25000      50    1000     101     160    1750     600    2250
##  [5121]     537     168    5500     291     602    1361     150    2400
##  [5129]    1500     220     625     653     847     747    1560    7000
##  [5137]    1750     121    1000     636     560      71    2500     233
##  [5145]    2500     163     581    1500     292     461   12000     836
##  [5153]     112    2500     149    1812    3750     336     875      92
##  [5161]    2500    3000     121    1000      94      42    2750     520
##  [5169]    1308    1750     900    3500     119    1600    3600    1107
##  [5177]    2500     695    1000     415     568    2800     980     669
##  [5185]      26    5000    1000      52    1500     644     278    4712
##  [5193]     516   27681     254     750    2300     957     692     292
##  [5201]    1750      64    3000    2059      47    1500     121     558
##  [5209]    1000     128     492     560    5705     150    4500    1250
##  [5217]      49    1200     165    2000      53      26      67    1000
##  [5225]     214     500     191     138      85     320    3000    1750
##  [5233]    1817      39   15250     984    3300     390     779     739
##  [5241]     639   10976     494    2000      52      55    1000     386
##  [5249]    1500     875     666    1193    2500   12500     680    1600
##  [5257]     500     625     121     841     560     111    1100     145
##  [5265]    3850     188     529   13625    1539      87    4500     199
##  [5273]      66    1594     552    4500     164    1824     374    4579
##  [5281]    1127     487      96    1610   12875    3000      36    1000
##  [5289]    4460     585      33    3750     703     390     272    1750
##  [5297]     186      93    4000     356     115     650     325     390
##  [5305]    2116    1053     355     336      88     258    1750    1250
##  [5313]      83     132    3200    2050    2000    1800     750      77
##  [5321]    2000    3024   41250    1646     390    6000   13411    4000
##  [5329]      66   12000    7000     500     750      58    2000     313
##  [5337]    2074    3500    1187   15250   73288    1750     108     750
##  [5345]    3760    1000      87      65    2375     151    3000     490
##  [5353]     190    5250      29    4454    1143     816    5750     361
##  [5361]     625     102    2000      58      28    1250      28     893
##  [5369]     549      43    1000     750      84    1020     318    1750
##  [5377]    1000     107     126    1750     153     510     500      28
##  [5385]     286    2300    1000    1500    1750      85    1344     343
##  [5393]    3000     927     579    3000    2000      82    3000      38
##  [5401]      66    1500    4181   35750    1370    2500    8500     628
##  [5409]     800     303    1000     354     542    1875     307     138
##  [5417]     320    3000   21757    2000    1750     264    9250     118
##  [5425]      72    1000      88    2500      49    1850      45     598
##  [5433]      60    5500     390    3000     111     648    1000    1250
##  [5441]    1750      84    2000      96    1250     144    2000     549
##  [5449]     157     387     315     750      32    3000      52   75566
##  [5457]    2800    1000     232    1000     432     679   12500     482
##  [5465]      85    1000      84     669     773    1550    1000      55
##  [5473]    1000     133    1000      38    2500     661     384     500
##  [5481]     501    3500    2250     380    2200      98    4000      83
##  [5489]    4000     787     831     213     500      38    1000     910
##  [5497]     343    3000     185      50    3500     124     114    3500
##  [5505]     234   87610    1250     144     696    9900     207      91
##  [5513]     900     400     116     750     875    1500     274   10250
##  [5521]     546     502      30    3750    1212     343    7884    2500
##  [5529]     241    1000    1000      47     750     100    2000     105
##  [5537]     370     142      82     925      83     744     669     545
##  [5545]     669    1500    1000     625      85    2750      38    2000
##  [5553]     106     139      80    2345     104     761    3250    1250
##  [5561]     255    2500     750     150     641     236    2218   23250
##  [5569]     725   19375      33    1000     800     247    3000     515
##  [5577]     560    5000     500    7330   37500    1538    1653    1000
##  [5585]     116    7000     243    2000    1000      62      60    2500
##  [5593]    1033    1218    1000     123      48    3125    1000    2000
##  [5601]    9000    3060   24000   31500     660     290     349    1250
##  [5609]     188    5750     486     174    2000     573    6250      90
##  [5617]      26    5000     249    2000     206    1000     133    2300
##  [5625]    2000    1000    1100      69    2500     260      33    3000
##  [5633]     296    2250     540   25702  151642   61175   10000       0
##  [5641]       0    1000     179     750      81      48     625     128
##  [5649]     750     754     750    1000     216    1500      97    1500
##  [5657]      84    6500     308    1500     600      93    2795     400
##  [5665]     500     348     384    1250     148    1000    2000     987
##  [5673]    1000      90    2250     588    7500     146     756     487
##  [5681]      98    1000     134     575     649     456     384     669
##  [5689]     779     560     100     376     669      66     875     805
##  [5697]     669      38    5250      53     875     439    7300     278
##  [5705]     624      86    1000    1750    1000    1000      70     300
##  [5713]     669    4531    6000     149     209    2750      25    3500
##  [5721]     116      96     500    2047    3000      40   10500     989
##  [5729]     547   15619      35    1250      38     300      79     669
##  [5737]      78    1500    2000     148   22556     869   20750     594
##  [5745]      47    1500      83    2300     750    3750     500     182
##  [5753]    3250   24552    1250     744    7500    8500    3371   30000
##  [5761]   70041  117225    2000      33    1000      37     500    4500
##  [5769]   20000    3200    1500     750     189    2500      61    3000
##  [5777]     478    6500     381    1000     761    8500     408      54
##  [5785]     750     152     568     503    1250      25     348    1750
##  [5793]      50     864     437    1000      75     605     290    1500
##  [5801]    1886    2108   20175     699     374    3000     875    1000
##  [5809]      82     435    4750     313    2300     165    3000    1468
##  [5817]    5250     722   12500   20913     540    3750     230    1000
##  [5825]     500      94     717     468    1500     102    1500     140
##  [5833]     385    1000     118      60    3000     294     750    1000
##  [5841]     120     740     459     142    1233     150    2107   26250
##  [5849]    2844    2097      44    2000    4625   43446     525     236
##  [5857]    3000     500      87     171    1000    1125     669    1000
##  [5865]      85    1000     132    1015     669    1000      36    1000
##  [5873]     221    2000     893     358    2400      50    2000     286
##  [5881]    4000     108    1000      77    5650    3650      77    1000
##  [5889]     250    1250     135    3000    3400     231    7875      27
##  [5897]    2500    2000    1000     625      31    4000     500    1000
##  [5905]    3750     266     500   66516   18750     369    5200     330
##  [5913]     482     330    1750    1250      81    1000      37    2000
##  [5921]      52    1142    4000    2000     293     500     235     666
##  [5929]      78    4500     122   26911      47     151    3500    1006
##  [5937]    2000     669    4816     900    1500    1400    6749   78000
##  [5945]    1992    3000     500      72     148    3400    1000     950
##  [5953]    1000      99    1500      30     500     275     180    1000
##  [5961]     499    2500     750     100    1000     267     298    8500
##  [5969]     269      26    2250      87    1250    3300     102     560
##  [5977]    2000     339     242    2500     880     415     750     106
##  [5985]    1700    1000     130     156    1750     383    2750     750
##  [5993]     265     757    8000      63    3000     103    1000     778
##  [6001]    1000    5000     185     200     262    1750      54    5500
##  [6009]     310     625     283      99    1875    1000     377     846
##  [6017]     137    2500     223    1500    3750     131    2000      69
##  [6025]     480    3000     414    1000    1800      96    4500      70
##  [6033]     500    1000    1000      83      99    2375      48     750
##  [6041]      77     466    3750      53     394     437     750     127
##  [6049]     768    1103    2134    3000     177     500     421     498
##  [6057]    3000    1000    2000      83    8528    1000      78    2500
##  [6065]     842     280    4750     553     937     384     191    6250
##  [6073]      82     503      64    1000      89     875    1200      93
##  [6081]    1500     130      27    2000      25    1000      94    2000
##  [6089]     104     750      59     144    1000     399   11500     346
##  [6097]     750      32      63    1000      74    1028      56     625
##  [6105]      91    2000    2300     500      90      65     206    1000
##  [6113]    1000      80     750     103    1000     145     136     392
##  [6121]    3000     731     459    2500      70     365      85    7250
##  [6129]      62    2500     200    1500     875    2000    3000      55
##  [6137]    3250     115     343   15500     741    2500    1000     335
##  [6145]    1250     249    7630     262      44    1000      94   13686
##  [6153]    1000     806     318    1750      41    1000    1000      92
##  [6161] 1185466      55    2000     180    3000     286    3000     445
##  [6169]      47    6300     284     625      37    6250      77     750
##  [6177]      64     853      75    3400    1400    1100     121     900
##  [6185]      25      35    1000     103     329    5000      30     800
##  [6193]      80    1000     344    6250     243    1000    1000      97
##  [6201]      45    3000     204      99    1000    3500    3000      94
##  [6209]      77    3000     246      44    4500     182    6000     435
##  [6217]      48    3600     215     486    1250     794    1000     500
##  [6225]     652     343    3000     723     273    2000      87    5000
##  [6233]      76    5500      79    1000     760     669     515     431
##  [6241]    2100    2500    1250    2000     689    5000    2000      33
##  [6249]    1250     904     794     920     560     102     106      27
##  [6257]    2500     117     500      59     750     141      55    1375
##  [6265]      35    1000      98     784     560    9500     929      73
##  [6273]     625      70    1750    5194     919    2500   18573   14250
##  [6281]    1994   58750     110    2000    1383     750    9409    2000
##  [6289]      73    2500     131      39      46     533     640    6000
##  [6297]     297     755    2250     200    1000     226     750    2000
##  [6305]     800    1295   19750    1750      46    1000      35    5000
##  [6313]     241      85    2250     394     154    1900      81    1750
##  [6321]      95    1250     153     519     132    1000     622    2250
##  [6329]      59    3000     160     625     261    1800    1800     875
##  [6337]     623    1738    1218      39     750    2000    1000    1000
##  [6345]    2091   39200    8750     304   19000    1300     325    2500
##  [6353]    3000    3000      27   12750    9049    1750    2250   23946
##  [6361]   29202    1750      49    1250      43     792     549    1101
##  [6369]      42     875    1250     165    1000     803     343    3000
##  [6377]    1000      53    1082     536     222    1750    2000     368
##  [6385]      49    3750      32   25500      39    1000     322    1219
##  [6393]     389    3588    1000     116    3557   70500    3100     126
##  [6401]     285   12150     715    5750     467     190    1000     750
##  [6409]      33     750      60      60    1500     170    3000    1250
##  [6417]     105      66    4000     445     601     782    2500      92
##  [6425]    1750      76     280    3500    3555   22500     591   13063
##  [6433]    1000     142    2000    1000      98    2000     153    2000
##  [6441]    8333     384    1000    2000    6813    1250   12000     500
##  [6449]     160    2500   12710      35    1000      27    1000   90000
##  [6457]  160984      79    3000     182    3500    8753     919     669
##  [6465]    1150     100    2000    1313     669    1000      72     409
##  [6473]    1244    7250    2000     500     307    1650     104     935
##  [6481]     669    2000    1000     711    8125     310  107292   17930
##  [6489]    2000     143    1000      90    1750      54    1000    2000
##  [6497]      78     363   14500     570      52    2000     136   27746
##  [6505]     160     103    2500     823      27    1750      52     750
##  [6513]     171     800    3500      70    2500    1000      93      36
##  [6521]     819    1000     383    7250     180    3000    2500     232
##  [6529]    1750    1500     110  186490    1000     855     384    2000
##  [6537]     219     750     132    2000    3000     387    1000      93
##  [6545]     822     459     135    2000      55    3000     153      80
##  [6553]     625      33    1500    4500    1250    2000     445    2000
##  [6561]     523     390     108    1324     723     155    2500      28
##  [6569]      70   14245    1250     135    2226    1218     557     459
##  [6577]      49     233    2000    1000     347    2000    2500      31
##  [6585]    3750      87    3793    1278    1000     125    3500    1774
##  [6593]      33    1500    9575    1000    1000     562    2750     117
##  [6601]      38    2250     417     308      86    5316      27    2000
##  [6609]     105    2000     800      71    3000      62    1500    1000
##  [6617]     625     632    1500      76    7952     246    1686    1000
##  [6625]      28     140    5750     598     287    2188    1046      56
##  [6633]    2500     728     560    1094     384      55    2000      27
##  [6641]    2000      57    1000     114    2050    2000     140      96
##  [6649]   50162    2000      61      74    5000     186    1294    2070
##  [6657]     500      62    1250     327   13728     565      42    1750
##  [6665]    1000      85    1000    1000    2000     206     754   18000
##  [6673]     465    3500     248    5750     242      94    2750      42
##  [6681]    1000     125    3500      29    5750     280    8568     221
##  [6689]    2850     374    1600    2250     264    1500    1250      80
##  [6697]    1000    2000     641    1000     978    7250     155   10500
##  [6705]     426     750      75    2750      66    4500      59     750
##  [6713]      55     750    3000      86    1000      82    1000     277
##  [6721]     899     318    1500     118     121    1000    1000      78
##  [6729]    5500     106      49    2625    1670    1250     241    3500
##  [6737]      80     939   23500     589    1000    1250    1250     520
##  [6745]    4500     800     168    3000      57     827    9750     217
##  [6753]    9000      32    2500      75     830     777     519     384
##  [6761]     750      81     248    7500    1986   11500    2000     700
##  [6769]     137    1250     625      28    1000     759   13750     137
##  [6777]    3750     165      47    1250     166    1000     105     550
##  [6785]     275     750      42     406     384     625      28     130
##  [6793]      63    3500    1405     688    2000    1000      39    1500
##  [6801]      92    4000     255      77    1750     247     797     549
##  [6809]    2500      82      26     500      83     584     560      27
##  [6817]    2500      58    1000      69     117    7500     347     223
##  [6825]    1875     625     180   48349     443    1000    1750     136
##  [6833]    1250      71     399    5000     397    3250     119     976
##  [6841]    8500     291   25000    2000     112     972    4750     298
##  [6849]    3350   11000     973   15000    1000     172     277    2400
##  [6857]     750      96    2150      25     191      79    2500     156
##  [6865]    1250    1250     638    3500    1750    3946    1250      49
##  [6873]     878     376    2000    1000    3000     144    2625    3500
##  [6881]      64    1750      26     500      49    5000     426      49
##  [6889]    2000    5000    1250      44    1600     193      37     800
##  [6897]     750    1088     290      62    1000      26    2500      39
##  [6905]    2000     151      47    1000     177    1250   16000    5000
##  [6913]      39    1000     131      66    1750    3000    2000    2000
##  [6921]     117     158    1500    1000      96     134    6750     168
##  [6929]     750     136    1000      81    1043    2750    1750     566
##  [6937]     442     258    3000     168     601     669    4000     398
##  [6945]     500     100    1000    1650     225    1500     239     893
##  [6953]     669     652   14034   28900     884     669     114    5500
##  [6961]      25    1750     680     423      29      79    2300     508
##  [6969]   10500     235      31      79    2500      40     750   21100
##  [6977]     269   13000     750      54    1000     601     273    2000
##  [6985]    1756    1500    1199   13500    1090     384      77    1250
##  [6993]    1085    4800    3165     331    1141    4500     991     290
##  [7001]   25039      44     800    6111     155   16662     933     669
##  [7009]    3000     745    1750     367    2750     625      50    1000
##  [7017]    1500     314     497     384    1000     766     292    1750
##  [7025]     318    4175    3040    2435   48350    1476    7000     178
##  [7033]    1600     248    5125      29     247    4500     232    1000
##  [7041]      90     508     387     366    9500     525    1000     354
##  [7049]     683     669    1500   79922     335    3000     192     800
##  [7057]      83    2400    1000      89     532    3500   61407     229
##  [7065]    3000     451    1000    1845     472     500      39    3000
##  [7073]     114    1000      93     925      47     517    5400     307
##  [7081]    3000     249    1000     380    2000      53    6000     488
##  [7089]    2000     221    2500    1000    3000     244   24250   28500
##  [7097]    1000     159    6500    1051      56   37588      43    2000
##  [7105]     560    1000      91    2500     113    2500     239     767
##  [7113]    1000     562    1000     643    1468   22750     891    3500
##  [7121]     536    1000     833    6500      25     302     625     549
##  [7129]    1000    5250      50    3774   22500    6850    1750    3198
##  [7137]     402    6000      45     275     216     127    1500      47
##  [7145]    1000      54    4790     938    7500     163    1250     101
##  [7153]     187    2000     514     536     236    3000     237    4284
##  [7161]   22500     793   10500     818     107     380   15000      80
##  [7169]     750      57     768     280    3500     242      78    3500
##  [7177]      89     839     139    4500    1500    1500     247      38
##  [7185]    2000     456     387      99    2000      37      69    2500
##  [7193]     412     459     151     500     150    1000    1000    3500
##  [7201]     978     750      55    4250     271    1000     460     500
##  [7209]      68     500      57    1000      80    1715    1375   27410
##  [7217]    1044    3250     500    2000     155      44      88    1000
##  [7225]      45      51    3000     750     185    3000     360    1000
##  [7233]    1500      42    7200    1303     536     866     139   17000
##  [7241]     800     207     750     575     306    1750    4000    2000
##  [7249]     147     750    1175   17500    2500     442   13250     750
##  [7257]     750      45    2250     426     753    1500     415    6250
##  [7265]     686     384     500    1750     221      88    2549    1000
##  [7273]      76    1535     663   10000     545     262     500    1750
##  [7281]     385    1000     104     594     243    5000     203     671
##  [7289]      85    3500    1078    6250    1000    1250    1000     625
##  [7297]    2000     109     198    2250      43     170    1750     121
##  [7305]    1250     102     159    4500     136    1000     119    2500
##  [7313]     133    2000    8625    1000    4000     178      77    4125
##  [7321]      55      33    2000     267    3750     160    1500     944
##  [7329]     124    1000   10156    2294   40500      47    3000     458
##  [7337]   11250   53153   56710  174631  323122    2000   20188   38500
##  [7345]    2188   37500    1053  146623    5449    1000    2500      47
##  [7353]    2000      30    4750     535     449    1000     114    7250
##  [7361]     554     669     648     236    3695     640     456    3000
##  [7369]   69176    2000    1000     268    1000      27    3750     219
##  [7377]      41    1500      44    2000     722     489    1750      75
##  [7385]    2500     750   62951     968     454     813    2586   14000
##  [7393]     297   28750      27     625     136     301     669     668
##  [7401]     318    1750     226    4500   18229    1500      35    3000
##  [7409]    2000    3000     240    4500     297    3039     518    8125
##  [7417]    1886    1218     147    2134     732     139     500      34
##  [7425]    2500     270   13000     327    1750    1000     555    2625
##  [7433]    2000    1000      71    2000    2000      80     407     459
##  [7441]     589     262    1750    1250      85    2500     459     560
##  [7449]     121    5250      47     111    2500     219    1750      26
##  [7457]    1109     671    2000     677    1500     669    1000      93
##  [7465]    1076      88    9560    1500     184    6754   10500    3796
##  [7473]   36000     194      88    2625     703     318     750      30
##  [7481]    1000     121   12735     129    2500    1500      32     652
##  [7489]     236    8250     839    1000     406    1000     167     330
##  [7497]    6000     386     142      56    5055    2500      43     104
##  [7505]    7750     994     560    2000    2750      43    1000    2134
##  [7513]   60750      61    1375      95    6750    1500      61     741
##  [7521]    5500      44    2000      90    1750    1000      92    3375
##  [7529]      59    2000      37   10250     116    2000     194    1000
##  [7537]     359    3000     660     242    3000     624     958     273
##  [7545]    2000     750     209    2000     504    2000      83    1150
##  [7553]     707     261    1250    1000      77     800      78     875
##  [7561]    1000     100      99    1500      40    1000      87     590
##  [7569]    2250      83     593      63    1250      99    1924      87
##  [7577]    3000    2000     275     129    3100     306    8630    2500
##  [7585]    1250    1657      32    1250     439    1250    3000      72
##  [7593]    2500    1200      89     278     159     700      41    1000
##  [7601]     119     750      65     412      85    4250     686    8250
##  [7609]     221    1250    1000      26     875    3000    4750    1000
##  [7617]    1000      76     548     500      66     800     202    1000
##  [7625]      64    1050     669      67    3000      52     818    2250
##  [7633]     650    3250    1600      79    1250     108    1135    1500
##  [7641]     712   15000    1346     655    1000     183    1250     112
##  [7649]    2801     790    1000     124    3500    2000     144    2618
##  [7657]    9000    3000     887     669    1000      61    2250      33
##  [7665]     501     384     316     213      80     723     914    1000
##  [7673]     185    1087     292    1750     839     459    4438     392
##  [7681]    6000     306     302     750     550    7500     328    3000
##  [7689]     353    2500      80    1197     286   11000      40    1000
##  [7697]    1810     300   10000     659     292    1750    4000     195
##  [7705]     367    2250    1250      28    1250     336    1000    2000
##  [7713]     875      30      79    2500      90    3500      69    1000
##  [7721]     117    3000    2500    2000      71    1375      69      83
##  [7729]     257    2600   43046    5000      50    1000      44    2000
##  [7737]   10039     100    3000    1000      74     114    1000      82
##  [7745]    2000     225      97    3000     337     589   17750     188
##  [7753]     350      47     594      76    3000     243    5717     964
##  [7761]    1531    1000     373    3500     111    1000      66      90
##  [7769]      79    2500    5500    1250  146500    4001   12962    1000
##  [7777]     125     792     726     128      89    1000      25    3637
##  [7785]     362     669    1750    1000     229    1250    1250      96
##  [7793]    5423    4250    1189    8825     921     103     809     335
##  [7801]    9000    2153   11880     508    1000     111     164      79
##  [7809]    2500     827      30    2000     281     500     104   15830
##  [7817]    1000     105    1000      91    3000     122     519    1000
##  [7825]      82    1000    1000      84     442   11500     290     500
##  [7833]  252745    1021     120    2500     313    8750     408     875
##  [7841]    3000     219    2325     178      60    2500     174    2000
##  [7849]     156    2250    1750      93    1250     555    1000      88
##  [7857]    3750      93     717     242    2500    3750   15000     607
##  [7865]     719     669    1000      55    1000     199     954    1750
##  [7873]     280    2500    1250    8075    8000    1794   33000     111
##  [7881]    3000    1000     625     622     750    1000    1000      92
##  [7889]      86    1075      34      99     607     839    6000    1134
##  [7897]   12000    1000      50    3000      82    2000      32    1000
##  [7905]     145    6500     741     507    1750    1200    1000     121
##  [7913]     575     191     500     124    4500     171     162    1000
##  [7921]    2000      54     203    3000      66     750     243    1000
##  [7929]     445    7125    1000      33    2000     265     747     210
##  [7937]    1250      44    2000     204     875    3750   14200    1000
##  [7945]    1000     212     692     343    3000     551   12500      47
##  [7953]    1000      92      96  100000      95    3000     297    3000
##  [7961]    1000      79     625      77     598   33250     768    1750
##  [7969]     640     775    1599     236    4500    2000    2500      95
##  [7977]    4459   36500     490    2500    1916      82      47    1500
##  [7985]      27    1000      50    1477     786    7000   12000   12000
##  [7993]    1029     358    3375    1250      74    2500      65     506
##  [8001]     236     683     335    2813     750      80    2500     346
##  [8009]    2000      44    1000      42     678      25    8400      51
##  [8017]    4500     106     140    4000     213     792     337    1750
##  [8025]    2000     107      40    3500    7250     523    2250    5206
##  [8033]   21500     718   11000    1000    1250     146    3500      86
##  [8041]    1250    4500     466      43    1750      31    1250      62
##  [8049]    2000     286    1000     806      27    1500    1500      29
##  [8057]     814     560    1500     266    1000     578     261     371
##  [8065]     669    1031     290   25080    2000      52      55     500
##  [8073]     132    1000      28     740     332    1750    1250     100
##  [8081]   44202    1250    1500    1000      63    1000    2813    2000
##  [8089]     232    1145     290  162901     750     875    1617    5500
##  [8097]     733   14500   10370    1000     102    1125      25    1000
##  [8105]     104     227    4000     742    4000     923     638      90
##  [8113]    2500      57      99    1000     110    2148   13000    1048
##  [8121]    4125     500      67    2122   25564    1728      30   15963
##  [8129]     877     342    1750     578     669    2000     173    1500
##  [8137]    1000      29      65     500    3000     113    5402    1873
##  [8145]   19650    2100    1638   42000     899      44    4500     150
##  [8153]      38    1000      30     654    6250     340     159    5000
##  [8161]      31     625      56    2000     224      66    2000     418
##  [8169]   10000      86     750     225    1000     101      77    3375
##  [8177]      35    8500    3000     100    1000      44      47    2500
##  [8185]     127     365    1500     124      79    1000     111    1000
##  [8193]      93    3500     198      31    2000     324     301     182
##  [8201]    2500     503    3300     316    1000      33    1000      86
##  [8209]    2000     281    1000    1000    1136    5000      89    1250
##  [8217]     100      94    1875     713     252    2625    2000     249
##  [8225]     554    2000      44    1000      28    1000      88    6000
##  [8233]     183    1250     257    2000     190    1000     512      79
##  [8241]    2500    6000     482     199    5750     750    7159   53500
##  [8249]    8265    2237    3000      56     506     506     153   37500
##  [8257]    1500     292    1000      93     859     564     459    1431
##  [8265]    4350     130    1000      26    1500     466     427      50
##  [8273]     578    1500      88    1250    1000     122    2625     307
##  [8281]    1075      63      83    1700     145    3500     486     540
##  [8289]    2500     267      66     220     750    6457     251    3500
##  [8297]     625     100     161    4375    1423     333    3140    1000
##  [8305]    1000     103    1800     705      47    2000     793    1750
##  [8313]    2813    8878   29250    1700   62000    1000     297    3447
##  [8321]     290   25431    1000      60    7250     324    1000      91
##  [8329]     128    6000     353    2625      80     111    2500    1000
##  [8337]     118    1000     176     343    4000    2000      35    2000
##  [8345]     142      31    1000     513     409     519      78    1250
##  [8353]      48     193    3000      85     422     300     669    7878
##  [8361]    1000    2000     165    1414      68    2000      38     380
##  [8369]      79     669     111     500    1250    4502      39   25262
##  [8377]     118    4500     135    3000      63    5500     246      26
##  [8385]     126    5700     431     390    3000     593    3250     272
##  [8393]     136    2500      73    2000    5500     305    1000    1983
##  [8401]    1000      84    1088     613    1750     880     560   10179
##  [8409]     601     669     500    1274    7500     346      70    1000
##  [8417]    1750     105    1000      60     573     223    1000     332
##  [8425]     800    1750    2200      48     806     384     728     590
##  [8433]     625      49    1750     114    1000      90     725     172
##  [8441]    4500     142      57    2000     500    2000     918     669
##  [8449]     193    2375     436    1500     199   31138      66      84
##  [8457]    2600     368    3000     172      60     625     720     390
##  [8465]     581      50    1250     123      33    7000     105     102
##  [8473]    4000      29    2172     419    3750     659     381    9625
##  [8481]     414    2500      28     714     861     669     819     384
##  [8489]    4000      45      49    6000    3000     712     100    2750
##  [8497]      55    1250    2000     426     384     384    5200     193
##  [8505]    1200      54    3000     408     387    1056     352    3000
##  [8513]      51    1375      60    1500    2940      37    1000     111
##  [8521]    1893   31500     738      60    2500     114    3750     123
##  [8529]     299    2500    1153    4000     486    6000     750    3175
##  [8537]     354    5549   56500    7000     276     237    6375      40
##  [8545]    2500     206    6313    5000    1375      66    3250     114
##  [8553]      35      63      79    2500      74    2750     113     500
##  [8561]    5000     196     484     390      27    1000     145      32
##  [8569]    3000     125     750     103    1000      26     179     914
##  [8577]   46494   37500    1750      49     350    2500    1000    2750
##  [8585]    6188    3143     750     144     625      82     567     128
##  [8593]    5875    2000     750      92    1000     107    2750    1750
##  [8601]      78    2500     329    7000    1164     669     139      80
##  [8609]    5392      47    7000    1000      49     299      85    2500
##  [8617]     683    4000      27    1250      90     671     387     750
##  [8625]     347   18000     214    1000    2000    1068      95    2938
##  [8633]    4000      26    2000      70      47     625    6025     153
##  [8641]    4000    1250    2000    1053     183     111    3500     899
##  [8649]     384   20000    1100     129     527     416     625    1200
##  [8657]     170    2400    1050      62   11272   29902   59638     934
##  [8665]    1000      67    1500     198    2500      75    3376    2422
##  [8673]   17750     486    7000    2730     574    1000      52      55
##  [8681]    2500     145    2000      89    2250     200    1750      83
##  [8689]    5000     116      90    1400     500     502    3000     291
##  [8697]    3000    1500      96    1250      44    5750      82    2500
##  [8705]    1750    1250    4564    4600     103     125    1000      88
##  [8713]     449    2000     315     669    1000    4800      40     500
##  [8721]      62      67    1000     185     555    1000    3600     653
##  [8729]     262    1750    2100     750     279     164      27    2300
##  [8737]     295     168    2500   12000     473      35    2609    3750
##  [8745]      40    6187     750     354      37    8500     201     223
##  [8753]     390     473     121    2000     137      67    1000    1746
##  [8761]    3100   11500   15413    1250     159    4000     119    7090
##  [8769]   50500    1799     185    9000     387    1750    1000      91
##  [8777]    4000      44    1563      38    1200      70    4500    1000
##  [8785]     112     750     875    1596   19500     938    5225     251
##  [8793]    7000     854     549    4419     165    1250    2000    1500
##  [8801]    1000    1000     263   15000     868    7000    1000      72
##  [8809]    1750    2391     916   11600    5455   42500    1831    3900
##  [8817]    1500      27    1500     203     134    4000      77    3500
##  [8825]     549     140    7000     320     384    1627      35    2000
##  [8833]      27    1750     217     724      56    2528     785    7700
##  [8841]     445     425     487     869    4000     172    9500     769
##  [8849]     318    1750    1000    3000      82    1000     115   11977
##  [8857]      99   11875    1919   26625    1750      83      33    3375
##  [8865]    1017     252    1750    2000      56    1000      35     845
##  [8873]     290    1000      85     150    4000     243     691     167
##  [8881]      44    1250      56      97    2375     106     754     290
##  [8889]    4500      38    2000     373    1312     721    4147     576
##  [8897]     387     255    8000     103    4000     601     669     500
##  [8905]      82    3500      80     132    5500     228     151    2188
##  [8913]     306     415     357     638     487     415     800     215
##  [8921]    4419   38750    1301    7189      63    2000     154    2300
##  [8929]     144    2000    1000    1000    2000    2750     169   43984
##  [8937]    4975    1222    1375     380    1375     331    7000     363
##  [8945]    2750     273    1000     115    1000      97    2200      60
##  [8953]    4000     104      47    6500    1000    2000     288      79
##  [8961]    2500    1000      63    1000     110    3000     205      52
##  [8969]    2000     266    1000     750      49    1600    2600   34514
##  [8977]   21540    2000     208    2000  282565   28593   24440    4862
##  [8985]   14800   57970   54288  171986    5067     231    6000    3000
##  [8993]    3500    2504   72416   12000   75609     123    3750   15494
##  [9001]   13000   47945    2000   91933    1000    3153   16623   22157
##  [9009]     110    6500    6000      90    3375     739     390      52
##  [9017]    2000    1938     551     236    1000     127     251    1000
##  [9025]    8750   81390    5067    1000    1250    2500     233     141
##  [9033]    2500     138    1750    1000      35      25     825     193
##  [9041]     625    1000     100    1250      75     655    1000     121
##  [9049]     500     750    1038    2800     947     487    1219      79
##  [9057]    1218    1037     453    1250      32    1750     232    1250
##  [9065]     107      39    4000      87     550    4647    1750     694
##  [9073]   10000    4000     394    2500     691    6000     313    1250
##  [9081]     389     500    7470     274    1561     459      33    3250
##  [9089]     756     273    2000    4090    7750    1109   11600    2750
##  [9097]     198     257    9000     122    1250     173    1250      33
##  [9105]      47    1000      32     400    1750    1100      40     500
##  [9113]     104  177786      90    1250     187    1375      43     727
##  [9121]     236    5000     202    3000     158    1000    1000     330
##  [9129]     387    2000     101     159     495     110    2500    1250
##  [9137]     213    1000      27    2000    1000      52     182      42
##  [9145]    8125     437    1377     669     625      92     111    1000
##  [9153]    3500   11256     127   10000    1250      52    1750     938
##  [9161]     223    1600    3000      64   29206    1111     669    5235
##  [9169]   21546   11551   43273   20000  238232   16336    7384   45010
##  [9177]      31    2000      93     676     669      35      47    1000
##  [9185]      88    5000     505     553    1000     156     535      42
##  [9193]    2000     750      50     561    6750      78    2500     500
##  [9201]     335   92000   42895    1500      43    2000     295     787
##  [9209]    1000     638    1500     115     221     625     580     425
##  [9217]     487     140     519     415      47    1000     530     500
##  [9225]      84     800     725     560    1000     158    4000    1000
##  [9233]    1021     341    1750      80    2813     750     238     278
##  [9241]    3000     700     600     600      81    3000     136   15446
##  [9249]    7800    1365    1035   23500    2500    3500    1000   55937
##  [9257]  232991   66096   31137   50400   73973   77670   50000   24759
##  [9265]    8898    9426   70420  224617   33062    3687   51580   39632
##  [9273]    6247   32207  123375    2710   29255   44488    4530  137642
##  [9281]   16000   24214   18808   28994    8737   88087  185687    6800
##  [9289]   17808   33515   18750    5000  117819    7802    7084    3600
##  [9297]  150778  287095   13334  672263    6500    2500   14820     780
##  [9305]   15891    3600   49018    5944  140656   21841   16237  162900
##  [9313]   94800   23100  479314    1250   64385   11000  224997   46660
##  [9321]  131863    2000     750    1173   12500    2802      33    1000
##  [9329]      55    1144     540    1750      34    1000    2000     220
##  [9337]    7750    1000      99    1750     677     459    6024     750
##  [9345]    1250    1000     319   10000     417     694      27    1500
##  [9353]      46     750     151     317    5075     493    2500      49
##  [9361]     714     213     750      36    3750     120     119    1800
##  [9369]      31    1250    2500     761   12677  117780   67473      80
##  [9377]    9500     358    2000     875     902     669     750      77
##  [9385]    1750      45      27    6000     688    5000     934     669
##  [9393]    1750    1078     280     101    3500     750      51    1000
##  [9401]      26     648    1153   17500     548   11500     669    4800
##  [9409]     352      62    3250      85    2000     198    1250     313
##  [9417]    1000     104    2000     148     350    7000     167    1500
##  [9425]      76    1850      27    1000     235    1500     572      94
##  [9433]      85    3000     106    3375    2000      81     180    1750
##  [9441]     344     711     233    2500     842     726    1000     975
##  [9449]     263     245     102    1000   38102    3300    3000     509
##  [9457]   11250     393    3375     132    2750     237     457     242
##  [9465]    3500     510     327    3750     322    1000     232      85
##  [9473]     502    2000     110     123    7500     647    1500    1100
##  [9481]     115    1250      25    1500      97     245    3250     108
##  [9489]    1250     343    6500     215    1000      41     247    1000
##  [9497]   72133    1500    3250     475      65      60    1000     105
##  [9505]     655     387     175      31    2000     163    3000     747
##  [9513]    4500     113    5500      82     750      67    1100      86
##  [9521]     500      65    3200     267     381     290     187   13500
##  [9529]     876     135    5125     287    5000      33    1000     800
##  [9537]     980     560      97    1000     104    2000     205    2000
##  [9545]     240      99     485    3376     195     750    1469     794
##  [9553]     301    1500     220     875     875     800      78    2000
##  [9561]      55    1304     318    5428     353    4500     500     270
##  [9569]     669      39    1000   88302   18112    1250     163    7497
##  [9577]     420    7000     391    2975     115    3000     326    2000
##  [9585]     515    1000    2250    3000     143     246     560      55
##  [9593]      71    2750    3000     750   30001     208    5500    9871
##  [9601]   75400    3679   10600     162     604    5000     252     505
##  [9609]     384     170    1000     111    4500    1000     102    1000
##  [9617]    2070   26000    1086    9500   23215     594     323     321
##  [9625]   54000      28    2000     394    2000    8356    5161    1250
##  [9633]     107      74    2000     489    1500     140     143    7500
##  [9641]     220      43    4000     104    1500      84     638      96
##  [9649]    2000    7000     201    1000    1914    1250     138     589
##  [9657]     264    4200    1000     224      66    2000      67     210
##  [9665]     500     750     128      94      42    1500    8750    1075
##  [9673]      34    1000     594     182     425     487     315     724
##  [9681]     638     128    3000    1000     124    8500    9749     648
##  [9689]     459     160     800     176     750     101    1000      35
##  [9697]    1200     582     669    1750      81    1048     395     489
##  [9705]    3600    2489   29750     468    4165     409     474    1500
##  [9713]     221   15000     543     292    1750     140    2500      40
##  [9721]    3800     580      96   27216   37097      63    1750      39
##  [9729]     702    1500     129      66    1750    8750     153    3000
##  [9737]     192     577    2000     509    2000     750   10000      79
##  [9745]    1500      37    3333    1000     196    1500     800   85621
##  [9753]   18000   10000      26    1000    1142      27    2000     350
##  [9761]     181    2905     959    3225    1337     188    4000    1000
##  [9769]     800      76    1250     125     159    1000    2000     106
##  [9777]      41    3000    4000     296    1000    8000    1250      26
##  [9785]    2699    3700     750      27    2661   38750     711    1250
##  [9793]     134     548      78     486     254    2000     195    2000
##  [9801]     450     132    3500   35442    2000    1000      71     143
##  [9809]     134    1375    1000     126    1000      87      86    3000
##  [9817]     756     487    1173     924    2500     669     974     259
##  [9825]   13793     458     309    3000     743     487     234    3000
##  [9833]     198    4000     187    1500     625      70    1358    3500
##  [9841]     775    2000    1000      90     476    2006     900      67
##  [9849]    8091     251     708     312    2250      50    1000    2000
##  [9857]      79    1750      44     138     320    3000     600    2000
##  [9865]      47    1000     114    1020     151   10000     748     669
##  [9873]      78     500     847   11250     213      88    1775     148
##  [9881]     242     485     390     306    1750    2625    5250      33
##  [9889]     996     318    2625     143    1150      79    1075      94
##  [9897]    1100     760    1000     259      93    2000      42      66
##  [9905]      99     950      91     625     313     137     621     228
##  [9913]    3500    3000     131    1250     108      55    2500      33
##  [9921]    4000     224     688   12750     872    3433    1000     750
##  [9929]     797    2940    2000      81  132853     486   10000    1000
##  [9937]     180    1625      96     589     290     165     102    1000
##  [9945]     111    5750      40     100      78    1000      28     891
##  [9953]      33     122    1250    1000      50      55    1000      33
##  [9961]    2000      41    3500    5000      31     600    1000     628
##  [9969]    3000     348     381    1800     750      99     625     181
##  [9977]    2000     108    1250      51    1000     256    1190     264
##  [9985]     750     184     205    2500    2813    1000     126    2000
##  [9993]      83     347     750      66      63    4000     356    4750
## [10001]     313    1750     116    1576     148    1140     750     234
## [10009]    2500      93    2500    1500      33    1000     102     750
## [10017]     333    1500     871    1500     216    7500    2000     195
## [10025]     250    9000     306    1250     700     802      66    4750
## [10033]     100     946   11500     585    2000     207    1066    3500
## [10041]     441    3000     500      64    1000      93     418     119
## [10049]    1800    2000      72    2000     326    1250      58    1625
## [10057]      26    1500     516     560      60    1750    1254     697
## [10065]    2000     100    2000     189   12500    1000     100    2000
## [10073]      72     750      66     821     415      47     348    2100
## [10081]     214     500    1750      65      61    2000      28
# The output will be the first 10,000 values for that column.
# convert total to numeric variable
pfizer$total <- as.numeric(pfizer$total)  
str(pfizer)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 10087 obs. of  10 variables:
##  $ org_indiv : chr  "3-D MEDICAL SERVICES LLC" "AA DOCTORS, INC." "ABBO, LILIAN MARGARITA" "ABBO, LILIAN MARGARITA" ...
##  $ first_plus: chr  "STEVEN BRUCE" "AAKASH MOHAN" "LILIAN MARGARITA" "LILIAN MARGARITA" ...
##  $ first_name: chr  "STEVEN" "AAKASH" "LILIAN" "LILIAN" ...
##  $ last_name : chr  "DEITELZWEIG" "AHUJA" "ABBO" "ABBO" ...
##  $ city      : chr  "NEW ORLEANS" "PASO ROBLES" "MIAMI" "MIAMI" ...
##  $ state     : chr  "LA" "CA" "FL" "FL" ...
##  $ category  : chr  "Professional Advising" "Expert-Led Forums" "Business Related Travel" "Meals" ...
##  $ cash      : num  2625 1000 0 0 1800 ...
##  $ other     : num  0 0 448 119 0 0 47 0 0 396 ...
##  $ total     : num  2625 1000 448 119 1800 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   org_indiv = col_character(),
##   ..   first_plus = col_character(),
##   ..   first_name = col_character(),
##   ..   last_name = col_character(),
##   ..   city = col_character(),
##   ..   state = col_character(),
##   ..   category = col_character(),
##   ..   cash = col_double(),
##   ..   other = col_double(),
##   ..   total = col_double()
##   .. )
# summary of pfizer data
summary(pfizer)  
##   org_indiv          first_plus         first_name       
##  Length:10087       Length:10087       Length:10087      
##  Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character  
##                                                          
##                                                          
##                                                          
##                                                          
##   last_name             city              state          
##  Length:10087       Length:10087       Length:10087      
##  Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character  
##                                                          
##                                                          
##                                                          
##                                                          
##    category              cash             other             total        
##  Length:10087       Min.   :      0   Min.   :    0.0   Min.   :      0  
##  Class :character   1st Qu.:      0   1st Qu.:    0.0   1st Qu.:    191  
##  Mode  :character   Median :      0   Median :   41.0   Median :    750  
##                     Mean   :   3241   Mean   :  266.5   Mean   :   3507  
##                     3rd Qu.:   2000   3rd Qu.:  262.0   3rd Qu.:   2000  
##                     Max.   :1185466   Max.   :27681.0   Max.   :1185466  
##                     NA's   :1         NA's   :3

Manipulate and analyze data

Now we will use dplyr to manipulate the data, using operations and functions:

. Sort: Largest to smallest, oldest to newest, alphabetical etc.

. Filter: Select a defined subset of the data.

. Summarize/Aggregate: Deriving one value from a series of other values to produce a summary statistic. Examples include: count, sum, mean, median, maximum, minimum etc. Often you’ll group data into categories first, and then aggregate by group.

. Join: Merging entries from two or more datasets based on common field(s), e.g. unique ID number, last name and first name.

. select - Choose which columns to include.

. filter - Filter the data.

. arrange - Sort the data, by size for continuous variables, by date, or alphabetically.

. group_by - Group the data by a categorical variable.

. mutate - Create new column(s) in the data, or change existing column(s).

. rename - Rename column(s).

. bind_rows - Merge two data frames into one, combining data from columns with the same name.

. summarize - Summarize, or aggregate (for each group if following group_by). Often used in conjunction with functions including:

o mean Calculate the mean, or average

o median Calculate the median

o max Find the maximum value

o min Find the minimum value

o sum Add all the values together

o n Count the number of records

There are also various functions to join data, which we will explore below.

Filter and sort the data

Filter and sort the data in specific ways. For each of the following examples, copy the code that follows into your script, and view the results. Notice how we create a new object to hold the processed data.

# Find doctors in California who were paid $10,000 or more by Pfizer to run "Expert-Led Forums."

ca_expert_10000 <- pfizer %>%
  filter(state == "CA" & total >= 10000 & category == "Expert-Led Forums")

# Notice the use of == to find values that match the specified text, >= for greater than or equal to, and the Boolean operator &.
# Add a sort (using arrange funcion) to the end of the code to list the doctors in descending order by the payments received.

ca_expert_10000 <- pfizer %>%
  filter(state == "CA" & total >= 10000 & category == "Expert-Led Forums") %>%
  arrange(desc(total))

# If you arrange without the desc function, the sort will be from smallest to largest.
# Find doctors in California or New York who were paid $10,000 or more by Pfizer to run "Expert-Led Forums."

ca_ny_expert_10000 <- pfizer %>%
  filter((state == "CA" | state == "NY") & total >= 10000 & category == "Expert-Led Forums") %>%
  arrange(desc(total))

# Notice the use of the | Boolean operator, and the brackets around that part of the query. This ensures that this part of the query is run first. See what happens if you exclude them.
# Find doctors in states other than California who were paid $10,000 or more by Pfizer to run "Expert-Led Forums."

not_ca_expert_10000 <- pfizer %>%
  filter(state != "CA" & total >= 10000 & category=="Expert-Led Forums") %>%
  arrange(desc(total))

# Notice the use of the != operator to exclude doctors in California.
# Find the 20 doctors across the four largest states (CA, TX, FL, NY) who were paid the most for professional advice.

ca_ny_tx_fl_prof_top20 <- pfizer %>%
  filter((state=="CA" | state == "NY" | state == "TX" | state == "FL") &     category == "Professional Advising") %>%
  arrange(desc(total)) %>%
  head(20)

# Notice the use of head, which grabs a defined number of rows from the start of a data frame.
# Filter the data for all payments for running Expert-Led Forums or for Professional Advising, and arrange alphabetically by doctor (last name, then first name)

expert_advice <- pfizer %>%
  filter(category == "Expert-Led Forums" | category == "Professional Advising") %>%
  arrange(last_name, first_name)

#Notice that you can sort by multiple variables, separated by commas.
# The grepl function finds values containing a particular string of text. This can simplify the code used to filter based on text.
# The search string comes after the | symbol. In this case, the pattern is "Professional".
# Grepl is case-sensitive, capitals matter
# use pattern matching with grepl to filter text

expert_advice <- pfizer %>%
  filter(grepl("Expert|Professional", category)) %>%
  arrange(last_name, first_name)
# You can add the ! Boolean operator to grepl.

not_expert_advice <- pfizer %>%
  filter(!grepl("Expert|Professional", category)) %>%
  arrange(last_name, first_name)
# The bind_rows function appends one data frame to another, here recreating the unfiltered data from the two data frames above.
# merge/append data frames
pfizer2 <- bind_rows(expert_advice, not_expert_advice) 

Write data to a CSV file

readr can write data to CSV and other text files.

# write expert_advice data to a csv file
write_csv(expert_advice, "expert_advice.csv", na="")

# na="" ensures that any empty cells in the data frame are saved as blanks - R represents null values as NA, so if you don't include this, any null values will appear as NA in the saved file.

Group and summarize data

# calculate total payments by state
state_sum <- pfizer %>%
  group_by(state) %>%
  summarize(sum = sum(total)) %>%
  arrange(desc(sum))

# Notice the use of group_by followed by summarize to group and summarize data, here using the function sum.

Calculate some additional summary statistics, by state

# As above, but for each state also calculate the median payment, and the number of payments
state_summary <- pfizer %>%
  group_by(state) %>%
  summarize(sum = sum(total), median = median(total), count = n()) %>%
  arrange(desc(sum))

# Notice the use of multiple summary functions, sum, median, and n. (You don't specify a variable for n because it is simply counting the number of rows in the data.)

Group and summarize for multiple categories

# As above, but group by state and category
state_category_summary <- pfizer %>%
  group_by(state, category) %>%
  summarize(sum = sum(total), median = median(total), count = n()) %>%
  arrange(state, category)

# As for arrange, you can group_by by multiple variables, separated by commas.

Working with dates

Now let’s see how to work with dates, using the FDA warning letters data.

Filter the data for letters sent from the start of 2005 onwards. FDA sent warning letters from the start of 2005 onwards

You will have to fix “issued”" to be read as a date. If you look back at str(fda), it was read in as a chr (character). To coerce it to be a date, use the command,

fda$issued <- as.Date(fda$issued, "%m/%d/%Y")

Check it out by running. Alternatively use the package “lubridate”

#install.packages("lubridate")
library(lubridate)
## 
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
## 
##     date
fda$issued <- ymd(fda$issued)
fda$issued
##   [1] "1999-05-25" "2000-04-19" "2002-01-28" "2004-11-17" "2004-07-19"
##   [6] "2000-02-25" "2000-07-19" "2002-10-30" "2004-01-21" "2000-01-14"
##  [11] "2006-11-08" "2000-11-30" "2002-09-27" "2004-06-01" "2004-06-01"
##  [16] "2000-08-02" "1997-07-30" "1999-04-30" "2004-08-31" "2005-06-07"
##  [21] "1998-11-06" "2008-03-20" "2009-01-14" "2001-07-25" "2006-03-27"
##  [26] "1997-11-21" "2009-04-09" "2000-11-30" "2009-11-24" "2009-03-30"
##  [31] "2003-06-25" "2003-12-11" "2002-06-11" "2001-12-11" "2007-10-26"
##  [36] "2007-03-29" "2009-02-02" "2010-03-17" "2004-06-01" "2002-01-02"
##  [41] "2005-05-16" "2000-03-29" "2004-12-10" "2005-05-26" "2004-11-17"
##  [46] "2006-11-22" "2008-05-28" "2009-03-02" "1999-07-22" "2005-06-13"
##  [51] "2002-06-12" "2003-06-19" "2006-06-16" "2004-07-14" "2002-09-23"
##  [56] "2000-05-24" "2009-11-09" "2001-03-09" "1997-10-07" "2008-03-19"
##  [61] "1997-06-24" "1997-02-03" "2010-04-01" "2000-03-23" "2009-03-02"
##  [66] "2006-04-21" "1998-03-20" "2003-03-17" "2004-05-14" "2005-12-21"
##  [71] "2000-04-07" "1999-11-17" "1998-02-09" "1997-08-14" "2001-12-04"
##  [76] "2004-02-05" "2001-07-27" "2004-06-14" "2006-08-22" "1999-05-19"
##  [81] "2003-10-09" "2009-05-20" "2001-12-21" "2006-03-21" "2002-03-21"
##  [86] "2003-07-25" "2007-01-24" "2003-09-29" "2009-04-20" "2002-10-04"
##  [91] "2008-09-03" "2009-11-24" "2003-07-08" "2003-07-25" "1998-10-14"
##  [96] "2008-05-01" "2006-07-06" "2009-06-26" "2008-04-21" "2005-08-23"
## [101] "2006-03-06" "2006-02-24" "2005-04-11" "2002-02-13" "2001-11-15"
## [106] "2003-04-14" "1997-10-09" "1997-10-10" "2002-01-16" "2002-06-05"
## [111] "2001-07-06" "2009-05-19" "2002-09-12" "2006-07-10" "2008-10-01"
## [116] "2005-06-06" "2004-01-16" "2004-01-16" "2002-09-27" "2008-05-30"
## [121] "2008-07-23" "2000-04-28" "2001-02-22" "2003-06-24" "1998-12-17"
## [126] "2001-04-27" "2004-08-02" "2005-06-10" "2005-10-27" "2009-07-01"
## [131] "2001-02-23" "2007-01-12" "1999-11-24" "2005-06-23" "2004-07-30"
## [136] "2003-11-07" "2004-07-26" "1999-03-01" "2009-09-15" "1997-06-11"
## [141] "2004-12-15" "2005-10-18" "2000-06-21" "2005-05-16" "2001-07-31"
## [146] "1997-10-03" "2006-11-03" "2006-10-12" "2000-09-27" "2000-04-17"
## [151] "2010-03-08" "2007-07-03" "1999-09-21" "2009-06-12" "2008-10-06"
## [156] "2005-05-13" "2000-05-24" "2004-07-28" "2005-01-27" "2005-07-06"
## [161] "2005-07-06" "2004-07-19" "2000-09-20" "1997-01-10" "2009-10-23"
## [166] "2004-07-02" "1998-08-04" "1999-09-28" "2000-08-15" "1999-08-06"
## [171] "2006-10-03" "2002-11-27" "2004-11-22" "2008-05-16" "2005-10-07"
## [176] "2010-01-28" "2008-04-23" "2001-07-06" "2005-02-24" "2005-02-24"
## [181] "1998-10-14" "2007-01-08" "2001-05-23" "2006-08-18" "2005-09-29"
## [186] "2001-08-30" "2009-03-11" "2008-12-01" "2004-07-13" "2003-06-17"
## [191] "2008-06-06" "2004-11-05" "2009-03-03" "1997-10-14" "2008-01-09"
## [196] "1999-10-27" "2000-11-30" "2007-10-26" "2004-03-25" "2008-11-13"
## [201] "2009-05-20" "2004-10-04" "2006-12-04" "2006-12-04" "2001-08-02"
## [206] "2000-07-18" "2005-04-11" "2005-10-03" "2005-10-11" "2001-04-03"
## [211] "2008-11-13" "2008-11-13" "2001-08-30" "2008-07-23" "2006-11-07"
## [216] "2001-02-23" "2008-03-19" "2006-12-20" "2004-05-13" "2002-03-26"
## [221] "2004-05-27" "2004-03-25" "2003-01-23" "1999-10-04" "2004-07-13"
## [226] "2004-09-10" "2003-05-27" "2006-02-20" "2000-07-19" "2006-06-28"
## [231] "2009-01-03" "2006-07-06" "2003-06-18" "2009-01-21" "2010-02-04"
## [236] "2003-03-17" "2002-08-07" "2005-02-15" "2000-06-20" "2006-07-14"
## [241] "2003-10-23" "2005-12-19" "2007-09-04" "2003-03-31" "2000-04-03"
## [246] "2007-07-27" "1997-10-02" "2007-05-30" "1999-04-09" "1996-11-19"
## [251] "1997-11-20" "2009-12-03" "2005-10-14" "2005-03-29" "2007-12-05"
## [256] "2008-09-05" "2008-03-06" "2005-03-16" "2006-02-07" "2000-01-28"
## [261] "1998-07-07" "2005-05-01" "2003-04-08" "2006-09-28" "1997-11-04"
## [266] "2000-06-15" "2009-02-18" "2005-04-11" "2003-07-30" "1999-03-26"
## [271] "2008-08-27" "2009-06-16"
str(fda)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 272 obs. of  5 variables:
##  $ name_last  : chr  "ADELGLASS" "ADKINSON" "ALLEN" "AMSTERDAM" ...
##  $ name_first : chr  "JEFFREY" "N." "MARK" "DANIEL" ...
##  $ name_middle: chr  "M." "FRANKLIN" "S." NA ...
##  $ issued     : Date, format: "1999-05-25" "2000-04-19" ...
##  $ office     : chr  "Center for Drug Evaluation and Research" "Center for Biologics Evaluation and Research" "Center for Devices and Radiological Health" "Center for Biologics Evaluation and Research" ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   name_last = col_character(),
##   ..   name_first = col_character(),
##   ..   name_middle = col_character(),
##   ..   issued = col_character(),
##   ..   office = col_character()
##   .. )
post2005 <- fda %>%
  filter(issued >= "2005-01-01") %>%
  arrange(issued)

#Notice that operators like >= can be used for dates, as well as for numbers.

Count the number of letters issued by year

# count the letters by year
letters_year <- fda %>%
  mutate(year = format(issued, "%Y")) %>%
  group_by(year) %>%
  summarize(letters=n())

# This code introduces dplyr's  mutate function to create a new column in the data. The new variable year is the four-digit year "%Y (see here for more on time and date formats in R), extracted from the issued dates using the format function. Then the code groups by year and counts the number of letters for each one.
# add new columns showing how many days and weeks elapsed since each letter was sent
fda <- fda %>%
  mutate(days_elapsed = Sys.Date() - issued,
          weeks_elapsed = difftime(Sys.Date(), issued, units = "weeks"))

# Notice in the first line that this code changes the fda data frame, rather than creating a new object. The function Sys.Date returns the current date, and if you subtract another date, it will calculate the difference in days. To calculate date and time differences using other units, use the difftime function.

# Notice also that you can mutate multiple columns at one go, separated by commas.

Join data from two data frames

Here is an animation for the different types of joins: https://github.com/gadenbuie/tidyexplain

There are a number of join functions in dplyr to combine data from two data frames. Here are the most useful:

. inner_join() returns values from both tables only where there is a match

. left_join() returns all the values from the first-mentioned table, plus those from the second table that match

. semi_join() filters the first-mentioned table to include only values that have matches in the second table

. anti_join() filters the first-mentioned table to include only values that have no matches in the second table.

To illustrate, these joins will find doctors paid by Pfizer to run expert led forums who had also received a warning letter from the FDA:

# join to identify doctors paid to run Expert-led forums who also received a warning letter

expert_warned_inner <- inner_join(pfizer, fda, by=c("first_name" = "name_first", "last_name" = "name_last")) %>%
  filter(category=="Expert-Led Forums")

expert_warned_semi <- semi_join(pfizer, fda, by=c("first_name" = "name_first", "last_name" = "name_last")) %>%
  filter(category=="Expert-Led Forums")

# The code in    by=c() defines how the join should be made. If instructions on how to join the tables are not supplied, dplyr will look for columns with matching names, and perform the join based on those.

# The difference between the two joins above is that the first contains all of the columns from both data frames, while the second gives only columns from the pfizer data frame.

In practice, you may wish to inner_join and then use dplyr’s select function to select the columns that you want to retain, for example:

# as above, but select desired columns from data

expert_warned <- inner_join(pfizer, fda, by=c("first_name" = "name_first", "last_name" = "name_last")) %>%
  filter(category=="Expert-Led Forums") %>%
  select(first_plus, last_name, city, state, total, issued)

expert_warned <- inner_join(pfizer, fda, by=c("first_name" = "name_first", "last_name" = "name_last")) %>%
  filter(category=="Expert-Led Forums") %>%
  select(2:5,10,12)

# Notice that you can select by columns' names, or by their positions, where 1 is the first column, 3 is the third, and so on.