After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570689 - non-contiguous arrays
non-contiguous arrays
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
1.9.x
Other All
: Normal enhancement
: ---
Assigned To: Morten Welinder
Jody Goldberg
: 553044 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-02-05 18:18 UTC by Dale Shumaker
Modified: 2010-07-13 07:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dale Shumaker 2009-02-05 18:18:12 UTC
I would like to construct a non-contiguous arrays containing variables to use in various functions such as slope and linest. 

Using functions such as slope({1,2,3,4},{1,2,3,4}) or slope(a1:a4,a5:a8) work but the combination of variables and non-contiguous arrays do not work "slope({a1, a2, a4,a5},{a6, a7,a8, a10}). 

I haven't found any spreadsheets which allow non-contiguous arrays but I can't be the only person who would find this useful.

Thank you
Comment 1 Andreas J. Guelzow 2010-07-09 06:02:09 UTC
@Morten: I am wondering whether an easy solution would be to introduce a new function c(...) or array(...) that evaluates to an array with the given entries, so that instead of "slope({a1, a2, a4,a5},{a6, a7,a8, a10})" one could write  "slope(c(a1, a2, a4,a5),c(a6, a7,a8, a10))".
Comment 2 Andreas J. Guelzow 2010-07-11 22:24:30 UTC
I have added a new function ARRAY that can be used for this purpose, eg. slope(array(a1, a2, a4,a5),(a6, a7,a8, a10))

ARRAY by itself creates a vertical array from its arguments. The arguments can be any other expressions.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 3 Morten Welinder 2010-07-12 17:42:29 UTC
Andreas: I am not sure this is going to do what you want in the general
case.  For example, it kills the handling of missing data.
Comment 4 Andreas J. Guelzow 2010-07-13 07:44:03 UTC
*** Bug 553044 has been marked as a duplicate of this bug. ***