On Thu, 28 Feb 2019, Sven Schreiber wrote:
Am 27.02.2019 um 20:13 schrieb Allin Cottrell:
> for series, lists, matrices and arrays. We could accept a negative value
> for start or stop as meaning count back from the end,
> We already have apparatus to parse such a specification for ranges of
> matrix rows/columns, which could probably be reused without too much
> difficulty.
Could you clarify the negative index values? In the changelog for 2016d I
read:
"Matrix manipulation syntax: allow use of negative indices to
drop specified rows/columns"
So are negative indices now supposed to have a different meaning?
In the context of the "range" option to "print", yes. This is what you
get
with current git:
<hansl>
open AWM18 --quiet
list X = YER PCR
print X --byobs --range=-10:
matrix c = seq(1,4)[-3]
print c
</hansl>
<output>
? print X --byobs --range=-10:
YER PCR
2015:2 1904626 1031468
2015:3 1911551 1035907
2015:4 1919630 1040917
2016:1 1931003 1047582
2016:2 1936446 1050751
2016:3 1943524 1054460
2016:4 1958592 1060904
2017:1 1970469 1064738
2017:2 1984528 1069921
2017:3 1998858 1074034
2017:4 2012519 1076214
? matrix c = seq(1,4)[-3]
Generated matrix c
? print c
c (1 x 3)
1 2 4
</output>
-------------------------------------------------------
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
-------------------------------------------------------