Am 08.11.2014 um 01:38 schrieb Allin Cottrell:
On Fri, 7 Nov 2014, Sven Schreiber wrote:
>
> Maybe we have a misunderstanding on what this change is supposed to be
> doing, but I tried for example the following:
>
> <hansl>
> open abdata.gdt
>
> list tobepassed = EMP WAGE
>
> foreign language=R --send-data=tobepassed
> print(gretldata)
> end foreign
> </hansl>
>
> And R prints all the variables of abdata.gdt, not just the ones in the
> list 'tobepassed'. (And I've also tried print(tobepassed) which gives an
> error.
No, it's not a misunderstanding. It's just that I hadn't noticed
that if --send-data is applied to the first line of the block, the
option parameter is not remembered at the end. So the list is NULL
and the whole dataset gets passed.
If you append --send-data=tobepassed to "end foreign" it will work
as intended. Now I just have to figure out how to get the parameter
to be remembered, so it'll work when the option is given at the top
of the block.
Ah, I see. Well the gretl standard so far (for gmm, mle and so forth)
has been to append options at the very end, so why not here, too?
Or perhaps one could use the 'setopt' command which Jack explained to me
the other day:
<hansl>
list tobepassed = EMP WAGE
setopt foreign --send-data=tobepassed
foreign language=R
print(gretldata)
end foreign
</hansl>
This would be nice I think.
thanks,
sven