bugGNU Octave - Bugs: bug #54965, Incomplete documentation of which...

 
 

bug #54965: Incomplete documentation of which and move of functions to packages

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Mon 05 Nov 2018 09:15:31 PM UTC  
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Godfrey Open/Closed:  Closed
Release:  4.4.1 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 22 Jan 2019 10:01:55 PM UTC, comment #4: 

I don't think we need to do anything about which.  It is designed for finding function on the path, not for generally hunting for a function name.  Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Tue 22 Jan 2019 09:12:49 PM UTC, comment #3: 

See also bug #55265 for cleaning up the table in "Appendix C Obsolete Functions".

Mike Miller <mtmiller>
Project Administrator
Tue 22 Jan 2019 09:09:48 PM UTC, comment #2: 

The list of statistics package functions moved from Octave has already been resolved in bug #55094.

What exactly should be done to the 'which' function in the bug report, or can we close this as resolved?

Here is the current behavior with Octave 5:

>> which exprnd
>> help exprnd
error: help: the 'exprnd' function belongs to the statistics package from Octave
Forge which you have installed but not loaded.  To load the package, run
'pkg load statistics' from the Octave prompt.

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
>> exprnd
warning: the 'exprnd' function belongs to the statistics package from Octave
Forge which you have installed but not loaded.  To load the package, run
'pkg load statistics' from the Octave prompt.

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'exprnd' undefined near line 1 column 1

Mike Miller <mtmiller>
Project Administrator
Mon 05 Nov 2018 11:46:49 PM UTC, comment #1: 

Attached is a patch for the statistics package.  Many of the functions listed as belonging to the package, in fact were no longer there.  I suspect that this is a general problem and that we need to script a way to automatically update the list of functions available.  That's a bigger deal.  For now, I think this patch will work.

(file #45365)

Rik <rik5>
Project Administrator
Mon 05 Nov 2018 09:15:31 PM UTC, original submission:  

There appear to be several problems with the documentation of
code moved to packages. The result is that users cannot find
functions which have been moved from the core to a package
and lack information and documentation.

For example:
octave:1> which(exprnd)
error: 'exprnd' undefined near line 1 column 7
octave:1>
And, the only occurrence of exprnd in the Manual is on page
981 (current dev version) where it is listed as the
replacement for exponential_pdf as of version 3.4.0.
exprnd is in fact in the statistics package.

The initial action items are:
1. Correct which() to at least work as intended and
   document it. Currently which is not documented, so
   someone who knows how it was intended to work will need
   to provide input.
2. Possibly extend which() to provide more information.
3. Document the results in the Manual.

Rik's comments are below:
++verbatim
On 11/04/2018 09:33 AM, Michael D Godfrey wrote:

>
>
> On 11/4/18 5:17 PM, Rik wrote:
>>
>>          
>> On 11/04/2018 08:58 AM, Michael D Godfrey wrote:
>>
>>          
>>>
>>>            
>>>>
>>>>              
>>>> On 11/4/18 3:01 PM, Mohammed Elmusrati wrote:
>>>> Hello,
>>>>
>>>> We had a complex simulation program to assist systems’ reliability.
>>>> Anyhow the code was written in Octave 4.0.2. We have observed that the
>>>> same code does not work on Octave 4.4.1 and the reason that ( 'exprnd’
>>>> undefined)!  This function generates random numbers with exponential
>>>> distribution. Is it a bug or the function has been removed from the new
>>>> version of Octave?
>>>>
>>>> Thank you
>>>>
>>>> Mohammed Elmusrati
>>>>
>>>>            
>>>
>>>            
>>> This got answered, but there appears to be no mention in the current
>>> Manual about the
>>> moves of functions to packages on sourceforge.
>>>
>>>          
>>
>>          
>> It was mentioned in the NEWS file for 4.4.
>>
>>  ** The following statistical functions have been moved from core
>>     Octave to the statistics package available from Octave Forge.
>>
>> followed by the list of functions which includes exprnd.
>>
>> --Rik
>>
>>        
> Not everyone reads the NEWS file, or, of course, the Manual...
>

Michael,

Can you file a bug about this?  What should have happened is that the list of functions in the statistics package was also updated in the core m-file _unimplemented_.m.  This m-file is called when someone types a word which is unrecognized by the interpreter.  There is already a test for possible keywords which belong to the statistics function.

    ## statistics
    case {"addedvarplot", "addlevels", "addTerms", "adtest", ...
          "andrewsplot", "anova1", "anova2", "anovan", "ansaribradley", ...

...
...
      txt = check_package (fcn, "statistics");

The change should be made on stable.

Cheers,
Rik
--verbatim

Michael Godfrey <godfrey>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45365:  54965.cset added by rik5 (11KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-22 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-11-06 rik5 StatusConfirmed => Patch Submitted
    2018-11-05 rik5 Attached File- => Added 54965.cset, #45365

    Back to the top


    Powered by Savane 3.5