sftrack icon indicating copy to clipboard operation
sftrack copied to clipboard

Elements of an 's_group' should be atomic

Open basille opened this issue 5 years ago • 0 comments

Simple example from the vignette:

singlegroup <- make_s_group(list(id = "TTP_058", month = 4))
str(singlegroup)

Which works as expected. However, I can also have vectors or lists of length >1 for each variable, e.g.:

singlegroup <- make_s_group(list(id = "TTP_058", month = list(a = 1, b = 2)))
str(singlegroup)

This also works with no error, but defeats the purpose of the individual identification. I think the structure should be stricter and only allow vectors of length 1 (or other things that can be coerced to a vector of length 1).

basille avatar Sep 29 '20 07:09 basille