dbnomics addon: allow sorting beyond the current window
by Sven Schreiber
Hi,
what I mean is best explained by example:
- open File/Databases/Dbnomics/browse
- Locate and double-click on ECB
- I get a window saying "gretl: ECB datasets" at the top, and at the
bottom "show datasets 1-40 of 91"
When I click on the first column header "Code" on the little arrow, I
can sort the entries alphabetically (increasing or decreasing). That's
fine, but it only considers the 40 datasets in the current window.
That's of limited use, I think. Because typically you want to sort …
[View More]over
the entire set, not the arbitrary portion that happens to fit in the
window.
Similarly, the search facility does not allow to search in the labels of
all ECB datasets, only the current 40. (Or alternatively, going down one
level and search in the selected dataset, which is something different.)
Or am I missing something there?
thanks
sven
[View Less]
2 years, 8 months
dbnomics-related segfault
by Riccardo (Jack) Lucchetti
Hi all,
with current git, the following script
<hansl>
clear
open dbnomics
data Eurostat/namq_10_gdp/Q.CLV05_MEUR.SCA.B1G.EA
data OECD/MEI/EA19.LRHUADTT.ST.Q
</hansl>
triggers a segfault. I just pushed to git what I believe is a fix, but a
review by Allin would be most welcome!
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as …
[View More]Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
[View Less]
2 years, 8 months
SIGSEGV
by Marcin Błażejowski
Hi,
simple script:
<hansl>
eval varname({2}) # works
eval varname({2, 3}) # we get SIGSEGV
</hansl>
What I discovered is when a matrix is given, the value of "int i" in
'geneval.c:7793' equals 0 and "p->dset->varname[i]" gives "const", but
the whole line 'ret->v.str = gretl_strdup(p->dset->varname[i]);'
produces segmentation fault. It's invoked in 'geneval.c' by "ret =
int_to_string_func(l, t->t, p)" when we are in "F_VARNAME case". It
looks like "…
[View More]int_to_string_func()" losts information that it works with
matrix, because "*v" is null.
Marcin
--
Marcin Błażejowski
[View Less]
2 years, 8 months
Re: problem with "stack"
by Allin Cottrell
On Fri, 8 Apr 2022, Summers, Peter wrote:
> I'm getting some unexpected behavior with the stack() command. The
> attached spreadsheet has data structured as in the "by variable"
> example on p. 23 of the user's guide. I followed the sample script
> as on p. 24, except I opened the file as .xlsx and do the stacking
> from v2..v13 since v1 is the country names. When I open the
> spreadsheet, the "variables" v2, v3, etc have the correct column
> information, but the …
[View More]resulting variables x1 and x2 aren't correct.
> For example, x1 becomes integer-valued. I can't figure out what
> I'm doing wrong here; suggestions welcome!
Peter, the content of your xlsx file is somewhat confusing. All of
the negative numerical values are marked as strings (see
xl/sharedStrings.xml inside stack_eg.xlsx when it's opened as a zip
file). I guess that's because they contain a unicode minus sign. Any
software that takes the string designation seriously (e.g. gretl,
gnumeric) is not going to treat these data as you were apparently
expecting.
Allin
[View Less]
2 years, 8 months
build problem on current git
by Sven Schreiber
Hi,
I'm trying to build freshly pulled gretl git, but I'm getting the
following reproducible error:
/bin/sh: 1: cannot create .deps/arma.d: Directory nonexistent
make[1]: *** [Makefile:268: arma.lo] Fehler 2
I'm building in a separate directory (outside the source tree) and have
run the configure script after completely deleting the previous state.
Any ideas?
thanks
sven
2 years, 9 months
problem with "stack"
by Summers, Peter
Hi all,
I'm getting some unexpected behavior with the stack() command. The attached spreadsheet has data structured as in the "by variable" example on p. 23 of the user's guide. I followed the sample script as on p. 24, except I opened the file as .xlsx and do the stacking from v2..v13 since v1 is the country names. When I open the spreadsheet, the "variables" v2, v3, etc have the correct column information, but the resulting variables x1 and x2 aren't correct. For example, x1 becomes integer-…
[View More]valued. I can't figure out what I'm doing wrong here; suggestions welcome!
Thanks,
Peter
[signature_229785562]
Dr. Peter M. Summers| Associate Professor of Economics
Chair, Faculty Senate
One University Parkway, High Point, NC 27268
Office: 336-841-9650
Choose to be extraordinary!(r)
[Facebook logo]<https://www.facebook.com/HighPointU>[Twitter logo]<https://twitter.com/HighPointU>[Instagram logo]<http://instagram.com/highpointu>[LinkedIn logo]<https://www.linkedin.com/school/28206>
[View Less]
2 years, 9 months
Crash with cmod() or Im()
by Sven Schreiber
Hi,
I wanted to check whether the cmod() function is marked as deprecated
(see ticket https://sourceforge.net/p/gretl/todo/66/), but instead I ran
into a crash. Just try to run the following line (without unsaved data,
of course):
? eval cmod(Im(2.0))
This is with the latest snapshot.
thanks
sven
2 years, 9 months
choose() function
by Riccardo (Jack) Lucchetti
Guys,
looking at some old code I had I found this function, which gives you all
the possible combinations of k elements from a lis of n objects. For
example:
<hansl>
function matrix choose(matrix from, scalar h)
if h <= 0
ret = {}
elif h == 1
matrix ret = vec(from)
else
ret = {}
from = vec(from)
n = rows(from)
loop i = 1 .. n-h+1 --quiet
x = from[i]
matrix c = selifr(from, (seq(1,n)' .> …
[View More]i))
if rows(c) > 0
matrix ret |= x ~ choose(c, h-1)
endif
endloop
endif
return ret
end function
eval choose(seq(1,4), 2)
</hansl>
returns
<output>
1 2
1 3
1 4
2 3
2 4
3 4
</output>.
My question is: I was under the impression that we alreasy added something
like this, but I can't find it either among the native functions, nor in
the extra package. Any hint?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
[View Less]
2 years, 9 months
Indexing by 'end'
by Marcin Błażejowski
Hi,
simple example:
<hansl>
set verbose off
n = 3
# Works
m = unvech(seq(1,n)')
eval m[end,end]
# Works
m = seq(1,n)'
eval m[end,end]
# Does not work
m = seq(1,n)
eval m[end,end]
</hansl>
Is it expected?
Marcin
--
Marcin Błażejowski
2 years, 9 months