Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSun, 03 Nov 2013 02:18:49 +0100Design Suggestion: A better way for array functions?https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/I'm a big fan of spreadsheets, but I've never like how spreadsheets including LibreOffice Calc handle functions with multiple cell outputs.
Here's what I imagine.
=transpose(A2:A5, B2:E2)
Where A2:A5 are the input cells and B2:E2 are the transposed output cells. I'm not sure what the cell itself should show, maybe something to indicate whether the procedure completed successfully.
or
=sort(A2:A5, B2:B5)
Where Where A2:A5 are the input cells and B2:B5 are the sorted output cells.
or maybe
=linear.regression(A2:B10, C1, C2, C3)
C1=slope, C2=intercept, C3=r²
I think this sort of design would be far more intuitive than the current standard.Sat, 02 Nov 2013 00:40:17 +0100https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/Comment by oweng for <p>I'm a big fan of spreadsheets, but I've never like how spreadsheets including LibreOffice Calc handle functions with multiple cell outputs.</p>
<p>Here's what I imagine.</p>
<pre><code>=transpose(A2:A5, B2:E2)
</code></pre>
<p>Where A2:A5 are the input cells and B2:E2 are the transposed output cells. I'm not sure what the cell itself should show, maybe something to indicate whether the procedure completed successfully.</p>
<p>or </p>
<pre><code>=sort(A2:A5, B2:B5)
</code></pre>
<p>Where Where A2:A5 are the input cells and B2:B5 are the sorted output cells.</p>
<p>or maybe</p>
<pre><code>=linear.regression(A2:B10, C1, C2, C3)
</code></pre>
<p>C1=slope, C2=intercept, C3=r²</p>
<p>I think this sort of design would be far more intuitive than the current standard.</p>
https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?comment=24741#post-id-24741Thanks. Confirmed. Bug fdo#71175 is the reference.Sun, 03 Nov 2013 02:18:49 +0100https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?comment=24741#post-id-24741Comment by MegaTallDave for <p>I'm a big fan of spreadsheets, but I've never like how spreadsheets including LibreOffice Calc handle functions with multiple cell outputs.</p>
<p>Here's what I imagine.</p>
<pre><code>=transpose(A2:A5, B2:E2)
</code></pre>
<p>Where A2:A5 are the input cells and B2:E2 are the transposed output cells. I'm not sure what the cell itself should show, maybe something to indicate whether the procedure completed successfully.</p>
<p>or </p>
<pre><code>=sort(A2:A5, B2:B5)
</code></pre>
<p>Where Where A2:A5 are the input cells and B2:B5 are the sorted output cells.</p>
<p>or maybe</p>
<pre><code>=linear.regression(A2:B10, C1, C2, C3)
</code></pre>
<p>C1=slope, C2=intercept, C3=r²</p>
<p>I think this sort of design would be far more intuitive than the current standard.</p>
https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?comment=24740#post-id-24740I submitted it to the bugzilla section. We'll see if it attracts any interest. (I bet those guys are already pretty busy with other parts of this project.)Sun, 03 Nov 2013 00:41:21 +0100https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?comment=24740#post-id-24740Answer by oweng for <p>I'm a big fan of spreadsheets, but I've never like how spreadsheets including LibreOffice Calc handle functions with multiple cell outputs.</p>
<p>Here's what I imagine.</p>
<pre><code>=transpose(A2:A5, B2:E2)
</code></pre>
<p>Where A2:A5 are the input cells and B2:E2 are the transposed output cells. I'm not sure what the cell itself should show, maybe something to indicate whether the procedure completed successfully.</p>
<p>or </p>
<pre><code>=sort(A2:A5, B2:B5)
</code></pre>
<p>Where Where A2:A5 are the input cells and B2:B5 are the sorted output cells.</p>
<p>or maybe</p>
<pre><code>=linear.regression(A2:B10, C1, C2, C3)
</code></pre>
<p>C1=slope, C2=intercept, C3=r²</p>
<p>I think this sort of design would be far more intuitive than the current standard.</p>
https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?answer=24714#post-id-24714I agree, at least in part. I would use the term "array" in deference to "multiple output". It is also worth noting that this type of change would likely be dependent upon a change to the ODF specification, so it may not happen quickly.
The entire manner in which arrays are handled in Calc is inelegant, including the CTRL+SHIFT+ENTER entry method, the non-editable / hidden bracket / control characters nature, and non-conformant notation. I would have thought:
=TRANSPOSE({A1:B2})
=TRANSPOSE({name_of_range})
... to be more sensible and conforming with existing array notation in other languages than the current:
{=TRANSPOSE(A1:B2)}
{=TRANSPOSE(name_of_range)}
... which has to be entered in a non-standard manner. The proposed examples should be able to be entered in the usual manner i.e., using ENTER.
>I'm not sure what the cell itself should show, maybe something to indicate whether the procedure completed successfully.
I think is the single biggest drawback to the method / notation indicated in the question. All current functions are entered in the cell they output to. I think so long as the main entry cell (i.e., top left) is somehow marked and the formula remains editable, that it is better to keep the required parameters as simple as possible.
Please [file an enhancement bug](https://www.libreoffice.org/get-help/bug/) and provide as much information about this new feature as possible. Don't forget to mark your bug as an 'enhancement'. The QA team will be happy to help you triage your feature request in the bugtracker.
Please post a link to any bugs you file in a comment below using the format "fdo#123456".
Thanks!Sat, 02 Nov 2013 06:16:23 +0100https://ask.libreoffice.org/en/question/24712/design-suggestion-a-better-way-for-array-functions/?answer=24714#post-id-24714