filter() returns a ts object even if x is an its. Is there a filter function that returns an its output for an its input?