Closed krissen closed 4 years ago
That's more a trackeR matter rather than trackeRapp one. So, it is best placed in trackeR's issues.
On support for those files: I see how this might be useful, but these are summary tcx files, containing information only about a few select summaries of the session. These summaries are either manually entered or produced by (typically proprietary) code for particular use in proprietary dashboards or software. It is also hard to predict their contents. So, we opted in not supporting them, and I do not see that decision being revisited before versions >2.0. Sorry.
On failing graciously: The current behaviour with such (and more) raw data files is acceptable and fails as graciously as anything should fail in R:
readContainer
will throw an informative error "No usable data have been found ...", so that standard R exception handling (the try
family) can be used if you are reading one file at a time.readDirectory
will ignore those files throwing exceptions but not failing, whenever they are ancountered unless silent = TRUE
.I will enrich the help files a bit with the above in upcoming trackeR
versions.
Please use trackeR's issues page, for sharing files that fail; these are useful to us.
I've got some oddball files among my datafiles; this is one category. Occasions when, for one or another reason, I've been unable to record workout with the watch but manually added duration and length into Garmin Connect and downloaded the TCX.
Like this one.
On the one hand I could understand not adding support for such tcx'es, as there is "no raw data". On the other hand it is sometimes handy to have the option of adding workouts manually, and it'd be nice if trackeR would support them.
If you'd opt for not adding support (of reading overview data from manually created files), then perhaps
read_container
could fail gracefully? (Yes, I know I cantryCatch
etc. I'll do that in the meantime. But nevertheless thought I'd report files that fail.)