Functional Data Anlysis. PupillometryR. “Create_functional_data” returning replacement has [x] rows, data has [y]


This Content is from Stack Overflow. Question asked by Dylan Egan

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

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?