This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> test | |
SHA PCT PRACTICE BNF.CODE BNF.NAME | |
123490 Q30 5E1 A81057 0407041T0AAAGAG Sumatriptan_Aq Nsl Spy 20mg/0.1ml Ud | |
2671358 Q32 5N1 B86044 0407041Z0AAACAC Zolmitriptan_Nsl Spy 5mg/0.1ml Ud | |
3550019 Q33 5N9 C83037 0407041T0BBAGAG Imigran_Nsl Spy 20mg/0.1ml Ud | |
3550022 Q33 5N9 C83037 0407041Z0AAACAC Zolmitriptan_Nsl Spy 5mg/0.1ml Ud | |
3599025 Q33 5N9 C83072 0407041Z0AAACAC Zolmitriptan_Nsl Spy 5mg/0.1ml Ud | |
3824533 Q33 5PD K83002 0407041Z0BBACAC Zomig_Nsl Spy 5mg/0.1ml Ud | |
3862639 Q33 5PD K83027 0407041Z0AAACAC Zolmitriptan_Nsl Spy 5mg/0.1ml Ud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test<-subset(august_raw,august_raw$QUANTITY==0) | |
nrow(test) | |
[1] 19 | |
nrow(subset(august_raw,august_raw$QUANTITY==0)) | |
[1] 19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
august_raw$costperunit <- august_raw$ACT.COST/august_raw$QUANTITY | |
summary(august_raw) | |
SHA PCT PRACTICE BNF.CODE | |
Q31 :1570430 5QC : 213379 M85063 : 3208 0103050P0AAAAAA: 8561 | |
Q36 :1459636 5QV : 179775 C83019 : 3039 0407010H0AAAMAM: 8537 | |
Q34 :1165719 5P5 : 173293 K83002 : 2953 0501012G0AAABAB: 8499 | |
Q35 :1044825 5N9 : 151460 N83028 : 2866 0501013B0AAABAB: 8498 | |
Q32 :1039957 5QA : 147953 Y01008 : 2786 0501080W0AAAEAE: 8483 | |
Q39 : 972798 5N1 : 146439 C84024 : 2776 0103050L0AAAAAA: 8475 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> unique_bnfname <- unique(august_raw$BNF.NAME) | |
> unique_bnfcode <- unique(august_raw$BNF.CODE) | |
> length(unique_bnfname) | |
[1] 17626 | |
> length(unique_bnfcode) | |
[1] 19741 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> head(august_raw) | |
SHA PCT PRACTICE BNF.CODE BNF.NAME ITEMS NIC | |
1 Q30 5D7 A86001 20020200822 K-Lite 10cm x 4.5m M/Layer Compress Band 1 11.76 | |
2 Q30 5D7 A86001 20020200905 Flexi-Ban 10cm x 3.5m Sub-Compress Waddi 1 5.88 | |
3 Q30 5D7 A86001 20030100167 Dressit Ster Dress Pack 1 12.00 | |
4 Q30 5D7 A86001 20031700015 Flaminal Forte 15g Tube Wound Dress Prot 1 36.95 | |
5 Q30 5D7 A86001 20100000543 Scanpor 5cm x 5m Surg Adh Tape Perm Non- 1 4.64 | |
6 Q30 5D7 A86003 0101010G0AAABAB Co-Magaldrox_Susp 195mg/220mg/5ml S/F 19 63.79 | |
ACT.COST QUANTITY PERIOD X | |
1 10.87 12 201208 NA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> class(august_raw) | |
[1] "data.frame" | |
> ncol(august_raw) | |
[1] 11 | |
> system.time(august_raw <- read.csv("T201208PDPI BNFT.CSV")) | |
user system elapsed | |
231.41 6.43 238.73 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> nrow(august_raw) | |
[1] 10056632 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> august_raw <- read.csv("T201208PDPI BNFT.CSV") |