79156714

Date: 2024-11-04 19:20:49
Score: 1
Natty:
Report link

As you indicated, while using tstrsplit with := in data.table, the length of the list must be equal to the number of columns you are trying to construct. Since tstrsplit produced three columns while the list's length was two, there is a discrepancy in the first example because you called the full column at once.

However, tstrsplit automatically and error-free discards the additional value for the second one. The data was grouped in a column and called separately rather than all at once. That's why it does not produce an error.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Elif Sena Akçay