williamcioffi / parsegonio

parse Argos Goniometer log data and convert into prv
GNU General Public License v3.0
1 stars 1 forks source link

sometimes hexcodes look like scientific notation #11

Closed williamcioffi closed 9 months ago

williamcioffi commented 9 months ago

read.table tries to guess the type of the data. it is possible to have hex codes that end in E1 for instance that look like scientific notation. When there are other hex codes that have letter digits it isn't a problem read.table understand character but if it is all numeric digits and this scientific notation looking stuff it'll guess wrong and convert the notation incorrectly.

can fix by changing:

pttkey <- read.table(pttkey_file, header = TRUE, sep = ',', stringsAsFactors = FALSE)

to:

pttkey <- read.table(pttkey_file, header = TRUE, sep = ',', stringsAsFactors = FALSE, colClasses = "character")

this will only really cause a problem if the user adds a bunch of extra columns that are ruined by being characters. I don't think this is likely though.