This file contains hidden or 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
| Item_Id | Category | Menu_Item | Store_Name | Price | Sales_Qty | Gross_Sales | Item_Disc | Net_Sales | |
|---|---|---|---|---|---|---|---|---|---|
| 10004 | cold beverages | Dr. Pepper | Grab n go | 1.85 | 242 | 447.7 | 0 | 447.7 | |
| 10006 | cold beverages | Snapple 16 oz | Grab n go | 1.75 | 316 | 553 | 0 | 553 | |
| 10009 | cold beverages | Deja Blue | Grab n go | 1.75 | 2 | 3.5 | 0 | 3.5 | |
| 10011 | cold beverages | Pepsi | Grab n go | 1.85 | 104 | 192.4 | 0 | 192.4 | |
| 10013 | cold beverages | Muscle Milk | Grab n go | 4.09 | 12 | 49.08 | 0 | 49.08 | |
| 10014 | cold beverages | Powerade | Grab n go | 2.15 | 172 | 369.8 | 0 | 369.8 | |
| 10016 | cold beverages | Coca Cola | Grab n go | 1.85 | 567 | 1048.95 | 0 | 1048.95 | |
| 10018 | cold beverages | Gold Peak Tea | Food Court | 2.15 | 881 | 1894.15 | 0 | 1894.15 | |
| 10018 | cold beverages | Gold Peak Tea | Grab n go | 2.15 | 246 | 528.9 | 0 | 528.9 |
This file contains hidden or 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
| ## Write a function that reads a directory full of files and reports the number of completely observed cases in each data file. | |
| ## The function should return a data frame where the first column is the name of the file and the second column is the number | |
| ## of complete cases. A prototype of this function follows | |
| complete <- function(directory, id = 1:332) { | |
| ## 'directory' is a character vector of length 1 indicating | |
| ## the location of the CSV files | |
| ## 'id' is an integer vector indicating the monitor ID numbers | |
| ## to be used | |
| ## Return a data frame of the form: |