Open Huh opened 6 years ago
The headers of some of the data sets contain useful information, such as the collar serial number. We need a function to pull out the desired information from the headers. An example csv might look like...
Product Type: Lifecycle Pro 500,,,,,,, Product ID: 100892,,,,,,, Firmware Version: V8.77.0,,,,,,, ,,,,,,, GMT Time,Latitude,Longitude,Altitude,Duration,Temperature,DOP,Satellites
The function should be able to take a user input such as "Product ID" and return the value without the subsequent commas.
my_data %>% slice(which(grepl(pattern_to_find, .[,1]))) %>% ....?
The headers of some of the data sets contain useful information, such as the collar serial number. We need a function to pull out the desired information from the headers. An example csv might look like...
The function should be able to take a user input such as "Product ID" and return the value without the subsequent commas.