R API has a types problem

Issue #30 new
Sean Kauffman repo owner created an issue

Really this could be called R has a types problem. The first problem is that timestamps in R are permitted in 3 different types because…

  1. Ideally they should be integers, but R only supports 32-bit ints so timestamps are often going to be longer
  2. Numeric is maybe okay but they might be modified in the conversion leading to incorrect results
  3. Strings are also fine and maybe preferred, since they don’t lose any data and nfer can just parse 64bit ints in C. The problem is that, when R auto-types, it wants numeric columns to be numeric, of course.

Solving this is maybe not a super high priority, but it is annoying.

The other problem is how data is typed when rules specify maps. Right now everything is just output as a string, because it works and is simple enough. The user can retype when they get the data back. It’s not great, though. Ideally there would be some type inference. That is, there is some type inference in nfer, but it isn’t easy to access and so the R api doesn’t try.

Again, not a real high priority, but generally improving type checking in nfer would be good.

Comments (0)

  1. Log in to comment