Skip to main content

New answers tagged

2 votes

How to keep private package function private when adding package name to function name inside the package?

This is how I do it. There's no need to use full context names: ...
Michael E2's user avatar
  • 237k
3 votes
Accepted

How to keep private package function private when adding package name to function name inside the package?

Extend my comment to an answer. I am still not sure why using mypkg`parseODE[ode] caused the function to be exported. It looks like this is just how packages work ...
xzczd's user avatar
  • 66.9k
3 votes
Accepted

Gillespie (stochastic simulation) algorithm

It is not complete answer since paclet we try to use has some typos in it (maybe it needs just version update). At first step we compute data using GillespieSSA ...
Alex Trounev's user avatar
  • 45.5k
5 votes
Accepted

How to make my OOP class work inside a package?

The symbols getAge and getName aren't exported as package symbols so that is why the definitions don't fire. If you want to use ...
Jason B.'s user avatar
  • 68.8k
0 votes

Package function doesn't plot math function when given as input

When in the package I get this if i try and plot x: But this works (SymbolTools` is my own package I put this in to test): ...
Tapiocaweasel's user avatar
4 votes

How do packages handle local variables?

Simple experiment shows it works as expected. calling collatz from inside a function in the package will call the package collatz...
Nasser's user avatar
  • 145k
2 votes

How do packages handle local variables?

Oh! This has messed me up before! you need `Private` instead of Private` That doesn't answer your question really, but it does ...
Tapiocaweasel's user avatar

Top 50 recent answers are included