So I have a very large .txt file that contains strings and number values with no standard delimiter. It looks like this:
MIO Data Packet:
Event Node:099123910e373b4a9c59114ee9e6d83c
TrasducerValue:
Name: Thermometer Digital
ID: 0
Raw Value: 138
Typed Value: 13.800000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Thermometer Analog
ID: 0
Raw Value: 550
Typed Value: 13.350000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: RSSI
ID: 0
Raw Value: 12
Typed Value: 12.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Ping
ID: 0
Raw Value: 0
Typed Value: 0.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Motion Sensor
ID: 0
Raw Value: 0
Typed Value: 0.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Microphone
ID: 0
Raw Value: 82
Typed Value: 82.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Light Meter
ID: 0
Raw Value: 1023
Typed Value: 0.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Humidity Sensor
ID: 0
Raw Value: 158
Typed Value: 46.666668
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Battery Level
ID: 0
Raw Value: 267
Typed Value: 2.670000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Barometer
ID: 0
Raw Value: 99103
Typed Value: 99103.000000
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Accelerometer Z
ID: 0
Raw Value: 563
Typed Value: 0.396364
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Accelerometer Y
ID: 0
Raw Value: 606
Typed Value: 8.269162
Timestamp: 2015-03-18T09:22:59.703168-0500
TrasducerValue:
Name: Accelerometer X
ID: 0
Raw Value: 507
Typed Value: 1.181309
Timestamp: 2015-03-18T09:22:59.703168-0500
I have started by using:
library("stringr")
library("plyr")
dat = readLines("03181023.txt")
And I get the feeling the command I need to use is
x = ldply(dat, .fun)
But I am not very knowledgeable about creating functions so am at a bit of a loss when it comes to using the ldply() command properly.
I would like the data to look something like this when I'm done. (With the rest of the values filled in of course)
Name ID Raw Value Typed Value Timestamp
Thermometer Digital 0 138 13.80000 2015-03-18T09:22:59.703168-0500
Thermometer Analog
RSSI
Ping
Motion Sensor
Microphone
Light Meter
Humidity Sensor
Thanks for any suggestions!