Dear Gretl Community,

Is there a way to circumvent the fact that we can not use the command "dataset" inside a function? Please take a look in the following code:

function series TESTE (series Y, int tamanho)

    dataset addobs tamanho
    string nome = argname(Y)
    print nome
    gnuplot @nome Y_hat_$P_1_$Q --time-series --with-lines --output=display

end function

dataset clear
open fedstl.bin
data exbzus usphci


Best regards,
Henrique Andrade