6
$\begingroup$

I thought I was late to the party and that ResourceFunctions had been around for some time, but I see now from @DanielLichtblau 's post community post here they arrived only in June 2019.

It seems MMA 12 is required to use the built in function ResourceFunction, but many functions would probably work perfectly well in MMA <12.

The question is: can one get and use ResourceFunctions without MMA 12 - if so, how?

$\endgroup$
3
  • 3
    $\begingroup$ Try running PacletUpdate["ResourceSystemClient"] and then restart the kernel. That's all it took to get it into my version of Mathematica 11.3. Another option is to find the v12 version of the paclet via the Wolfram Cloud, download it, and change the version spec. I did that one time when I wanted to look at some futurized feature. $\endgroup$
    – b3m2a1
    Jul 28, 2019 at 16:40
  • $\begingroup$ @b3m2a1 I see a note at the bottom of many resource documentation pages " requires 11.3... " I'll try it, but is there another dependency? $\endgroup$ Jul 29, 2019 at 5:04
  • $\begingroup$ you might need to download the packet as I did in my answer. I think I may have done that like 8 months ago when I wanted to try this feature out. $\endgroup$
    – b3m2a1
    Jul 29, 2019 at 5:18

2 Answers 2

4
$\begingroup$

Go to the web page of the resource you're trying to access. In the top-right corner there is a button "Source Notebook" that allows you to download the notebook that defines the resource function. Open it, execute it, and you're probably good to go.

$\endgroup$
3
$\begingroup$

Note: once the new "ResourceSystemClient" is on the paclet server all of this gymnastics will be unnecessary

Run this in the cloud:

rsc=PacletFind["ResourceSystemClient"][[1]]["Location"];
pac=CreateArchive[rsc,"RSC.paclet"];
CopyFile[pac, CloudObject["RSC.paclet", Permissions->"Public"]]

Then click on the link which will download the file.

Next, locally, install that with

pac = PacletInstall["path/to/RSC.paclet"]

That should complain about version mismatches, so then run

SystemOpen@pac["Location"]

Find the PacletInfo.m file and change the MathematicaVersion->"12.0+" to MathematicaVersion->"11.0+".

Next run

RebuildPacletData[]

And if all goes well ResourceFunction will be made available. If it's not, you'll need to restart Mathematica to get it to show up.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.