I am using the exact code that you proposed, but I still get the same output.
When I change the frequency to monthly (12) or quarterly (4) I get the correct transformation of the data into a ts-format. It only seems to be a problem with yearly (1). I would be very grateful if you have any idea what the problem could be!