Hello, so I am using 'readtable' to import some text data that I have. I am then using 'table2timetable' to be able to use my data as a time table. The data if have is collected sparatically at different minutes and hours, so I am using
NewData = retime(TimeTableOut,'hourly','mean');
to average the values into a whole hour row.
But I am getting this error.
All variables in input timetables must be numeric, datetime, or duration when synchronizing using 'mean'.
I understood what that meant so I deleted the coumns (variables) of the imported table that contain data that is not of these types. It worked once I did this, but I would like to know if there is a better way to do this so I don't have to go in and delete columns myself every time. I would like to import data columns (variables) that contain only these three types of data. Any help is appreciated! If you need, I can attach my table or text file that I am importing.
3 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912166
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912166
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912193
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912193
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912238
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/553987-i-want-to-import-only-specific-types-of-variables-using-readtable#comment_912238
Sign in to comment.