As seen in the code, d is a character vector 'ffilt'. Thus, accessing it as a structure or object with dot indexing for a field or property data, causes an error. Replace d equals ffilt with someother variable. I assume d is a variable from your import file.
Hope this helps. Regards, Sriram