Hi, Yes you can. As William says, the 'seq_len' approach seems to be better. 'head' function is the wrapper for 'seq_len' approach and slower. I didn't know that '-length(x)' approach is slow for long vectors.... -- Noia Raindrops noia.raindrops at gmail.com