On Mon, 20 Jan 2014, Allin Cottrell wrote:
On Mon, 20 Jan 2014, Leandro Zipitria wrote:
> Dear Gretl users,
>
> I have a dataset that have 200 variables, all by the name prod_# (that is,
> a list of products from 1 to 200). I also have a csv with the description
> of that product (oil, ham, etc.).
>
> Is there any (simple) way of adding the information of each product to the
> description of the variable by reading the csv file? I know that it could
> be done "by hand" by editing each variable and copy and paste on the
> description of the variable.
Example (your case may vary somewhat) [...]
Ha, I was forgetting, there's the menu item /Data/Variable labels, which
also maps onto the "labels" command with the --from-file option.
To use that approach, your descriptive labels must be one per line, as in
my pnames.txt example. The scripting approach is more flexible: you could
use gretl's string-handling functions to deal with other cases such as
labels on one line, separated by commas.
Allin Cottrell