I am trying to run a t-test on pupillometry data. Using the PupillometryR pipeline I have completed the “create_difference_data” step. However, I am running into problems when trying to do the next step, “create_functional_data”. The error “replacement has [x] rows, data has [y] keeps occurring”.
I have 49,777 rows of data, but it is telling me that the functional_data should have 50,412. I am using basis 10 and order 4, and using the same code (changed data) provided in the CRAN documentation (linked below).
The steps that I have tried are to input NA rows, although this made the code stop working altogether, I removed all of the NA’s in the pupillometryR data frame (as the CRAN example had none), and I also ensured that the class of columns used were the same as the CRAN example.
However, I think that the code is running just that it will not be put into the pupillometryR data frame as the first mean pupil given in the error and it is different than the difference_data
Check the Answers