Re: two questions
- To: mathgroup at smc.vnet.net
- Subject: [mg100341] Re: two questions
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Mon, 1 Jun 2009 07:10:06 -0400 (EDT)
On 5/31/09 at 6:32 AM, fgutiers2002 at yahoo.com (Francisco Gutierrez) wrote: >a. I made a package and I want to retrieve the functions it has. >What I would want is: Command[mypackage] Output: functions for the >user contained in myg package >How can I do this? Somehow, I have failed to find this in the >documentation. First, load the package using either Get or Needs. Then doing ?contextname`* will list all of the symbols available to the user where contextname is the name of the context for the package loaded. Usually (not always), this is the same as the package name. For example, if I load a package I've created for my usage by doing: In[1]:= << Statistics`SplineSmoothing` In[2]:= ?Statistics`SplineSmoothing`* Statistics`SplineSmoothing` EDF NaturalSpline SplinePolynomial MonotonicQ SplineD SplineResiduals MonotonicSmoothing SplineEvaluate SplineRoot I get a list of functions in the package >b. According to you what are the best references to study the theme >of packages in Mathematica? Maeder has written a couple of texts on programming in Mathematica that would make a good starting point. But even without using Maeder's books, simply opening packages that are distributed with Mathematica with a text editor to see how they are written can be quite informative.