Questions on Mathematica packages, which are self-contained bundles of Mathematica code that add new functions and other functionality.

learn more… | top users | synonyms (1)

38
votes
4answers
3k views

Creating Mathematica packages

I'm building a package to help me write packages and their documentation. In this post I explained how to make a package and its documentation. In the answer I provided I describe how to build a very ...
19
votes
3answers
943 views

How to load a package without naming conflicts?

This question applies to any package, but I encountered this problem while working with graphs. There are symbols in the Combinatorica package (such as ...
7
votes
2answers
674 views

Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
33
votes
3answers
1k views

How to distribute proprietary Mathematica code

If I want to make package-code completely unreadable, in a way that the end-user can only call my functions, but has no way to re-engineer my definitions, how would I do that? I know I can use ...
20
votes
3answers
5k views

Differential geometry add-ons for Mathematica

I need a differential geometry tool for Mathematica. Is there any add-on? Unfortunately, Mathematica does not include such functionality or I can not find it.
27
votes
1answer
1k views

Recommended settings for git when using with Mathematica projects?

Background I'm relatively new to git — currently overseeing an offshore .NET-based development project on GitHub within a private business account, but little experience beyond that. I'd like to set ...
33
votes
3answers
2k views

Custom package development: Basic steps [duplicate]

Every once in a while, I write a generic function that I use quite often for months to come. However, package development in Mathematica is not very well documented from what I can tell, and I was not ...
18
votes
1answer
565 views

What is the proper method to load a Mathematica package inside a DynamicModule

I have a DynamicModule that requires loading of Mathematica packages. The usual methods do not seem to apply (...
19
votes
2answers
701 views

What are recommended guidelines for developing packages?

This might be of general interest – I have different questions regarding naming conventions, contexts, subcontexts, shadowing, etc., but I do feel that they are closely related, thus I don't really ...
20
votes
4answers
621 views

Defining functions in stylesheets

Is there a way to define functions in a stylesheet? So far I have managed to write my stylesheets without the need to use my own custom functions or definitions. For instance, maybe I have some color ...
11
votes
3answers
396 views

How to program a F::argx message?

How useful is it to program a user-built function in a package to produce a red warning message F::argx if you give the wrong number of arguments to that function? ...
13
votes
3answers
581 views

How can I return private members of a Mathematica package as the output of package functions without the “PackageName`Private`” prefix?

I have created a Mathematica package that manipulates various types of input physics data into a common form of output data for further analysis. To make this process more efficient and manageable, I ...
8
votes
4answers
710 views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
9
votes
1answer
631 views

How to work with Application Project files in Wolfram Workbench?

I have figured out that in a basic project I simply have to call the main package (m file) from the notebook using <<nameofmfile` and then the notebook ...
22
votes
2answers
1k views

What is a “Paclet”?

I often see references to "paclets", for example the PacletManager` context, the PacletInfo.m file in some packages and next to ...
21
votes
2answers
354 views

What's the difference between these two ways of specifying dependent packages?

What's the difference between these two ways of specifying dependent packages? Method 1: BeginPackage["foo`bar`", {"xxx`", "yyy`"}] Method 2: ...
18
votes
2answers
596 views

How safe is Encode?

How safe is an encoded package (using locked, etc)? If I don't specify a personal key, I understand that the encoding key must be somewhere in the Mathematica program itself, and so it is not a ...
9
votes
2answers
2k views

Two x-axis with different units connected by function using CustomTicks

I am trying to make a plot of some photoluminescence data, where wavelength is on the x-axis, and intensity is on the y-axis. Also, I would like to have the graph boxed, with the upper x-axis having ...
8
votes
1answer
2k views

How do I create and use Mathematica packages?

I have created a package following the tutorial in Mathematica 8 virtual book. However this tutorial is quite, let's call it, "short". I have a TestPackage.m file: ...
11
votes
2answers
775 views

How to unload automatically loaded packages?

I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of ...
6
votes
1answer
1k views

How to execute a function in the package from java?

I use Wolfram Workbench 2.0. I can get a KernelLink object and evaluate some simple expressions like "2+2". But I don't know how to export a package and execute ...
15
votes
2answers
515 views

Automated testing for compatibility with older Mathematica versions

I have several packages which I actively develop and maintain. I try to stay up to date with new releases of Mathematica and usually update within a couple of months of a new version coming out. As a ...
13
votes
1answer
975 views

Installing CRAN Packages

When I install RLink: Needs["RLink`"] InstallR[] then evaluate the command ...
9
votes
1answer
211 views

Preserving indentation when creating a new line (when editing in a package)

Background: This is the third question in a row of questions about how to make editing packages in the front-end much more bearable (the other two are here and here). It seems that the front end is ...
16
votes
3answers
735 views

Listing the functions defined in a package

Assume that I know a package's (Context?) name that is loaded. Now I want to list the functions defined in this package. How can I do it? I remember that I found a way once, but I cannot re-find it. ...
14
votes
1answer
430 views

Creating a R DataFrame like construct in Mathematica

I kept getting my data mixed up so I decided to see if I could construct a package adding a R DataFrame like construct to Mathematica. I managed to cobble something together that sort of works, but ...
11
votes
1answer
248 views

Can Wolfram's Player Pro use proprietary packages?

A few entwined/related questions: Can Wolfram's Player Pro use proprietary packages? I have searched Wolfram's site pages on Player Pro and don't see anything that provides a clear answer to this ...
10
votes
2answers
174 views

Globally loading packages while using a CellGroup as the default context

I have a notebook I wish to set up where the sections are conceptually related to each other. But, I wish to isolate them from each other programmatically, so that they do not interfere with one ...
9
votes
2answers
270 views

Problem with PlayerPro recognizing a proprietary package

This question follows on from my earlier question Can Wolfram's Player Pro Use Proprietary Packages. That question appeared to have established that, yes, PlayerPro can use proprietary packages. ...
18
votes
2answers
384 views

When to use Get vs Needs

When should I use << vs Needs? I just always use Needs as ...
12
votes
2answers
297 views

Mathematica “prelude”

Is there any way to have the functions from a mathematica file be loaded on startup? For example, in this excellent answer, Jens helps me out and gives me some functions for creating legends for ...
11
votes
4answers
511 views

Strategies for avoiding and handling shadowing

When dealing with namespaces in Mathematica (BeginPackage, $ContextPath ...) one is unavoidably confronted with the problem of ...
10
votes
2answers
443 views

FiniteFields package is very slow. Any fast substitute for Mathematica?

I want to compute the inverse of matrix, say with dimensions $100 \times 100$, defined over a large finite field extension such as $GF(2^{120})$. I am using the package FiniteFields, but Mathematica's ...
8
votes
1answer
285 views

How to provide your own example data for a custom package?

A nice feature of the mathematica documentation is the copious use of ExampleData in illustrating functionality. I would like to provide some example data for a ...
3
votes
1answer
74 views

Run encoded package code through .NET/Link?

An earlier question of mine, Prevent package from being opened in a notebook interface, never received an answer, but Albert Retey's comments did lead me to an entirely different solution. To secure ...
8
votes
2answers
588 views

Why is JLink loaded every time I start Mathematica?

When I start a Mathematica 8 session (either command line or with the notebook front end), I notice that there are several packages that have already been loaded for me (using ...
6
votes
1answer
202 views

Summa package problem

I need to use the features of the Summa package but it doesn't work in Mathematica 9. It gives the error Cannot open Utilities`FilterOptions` My question is: ...
3
votes
2answers
172 views

Package relative file path specification

I have some packages inside a folder (named Packs) that is in the same file level of some executed package. ...
2
votes
2answers
298 views

Packages problems on version 9 under OS X

Using Version 9 on OS X, I've run into some problems with creating packages and accessing them. I've done the following: wrote all the function definitions in a notebook and tested that they all ...
15
votes
3answers
676 views

Generate a Random Polygon

Does some package exist with a function that takes a parameter $n$ and generates a random 2D $n$-sided simple polygon (convex or non-convex), possibly within a certain bounding box? It does not ...
12
votes
2answers
144 views

How to find out what files are touched when Get is called?

Is there a way to capture all package files touched whenever a package is called via Get, Needs, ...
11
votes
1answer
205 views

Making a Mathematica package manager?

I'd like to get a serious discussion started about a package manager. This has come up elsewhere, and many people have implemented their own solutions. It would be nice to have a standardized way to ...
15
votes
2answers
3k views

How to install packages?

This is always a problem when I distribute my packages to colleagues working on different platforms. I have my packages installed into a private directory and I autoload some of them when Mathematica ...
12
votes
2answers
666 views

How to make a parallel auto-generated .m package from Initialization cells?

according to the documentation at ref/InitializationCell, When you first save a notebook that contains initialization cells, you have the option to make a ...
11
votes
2answers
885 views

How do I compute sidereal time and JD?

There was once a package that provided a wide range of functions for computing astronomical information. This package now appears to be out of date; but as near as I can tell, many of the useful ...
12
votes
2answers
350 views

Compile for deployment

Is there any way (other than the manual one) to grab all the functions a notebook uses from the different user-defined packages and putting everything into one file to deploy the code for e.g. CDF? I ...
10
votes
4answers
990 views

Plotting ErrorBars with a different style

I would like to plot the error bars of ErrorListPlot with a different style than the points. I know of ErrorBarFunction, but ...
13
votes
1answer
682 views

Using a different R version with RLink

I wish to use a different version of R than what is provided by Mathematica 9. For example, I want to use the Macports version of R, where R_HOME is ...
12
votes
1answer
353 views

Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
8
votes
1answer
439 views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...