Skip to content

Commit

Permalink
doc: example
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Jun 12, 2024
1 parent 58192f4 commit 6eb3355
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ cd cowsaywebr
webrcli install cowsay
```

Modify the index.js with this line juste before the end of the function
Add to your index.js

```javascript
await globalThis.webR.evalR('cowsay::say("Hello from R!")');
// At the top of the script
const { library } = require('spidyr');

const cowsay = await library("cowsay");
await cowsay.say("Hello world");
```

Then run
Then, back to your console :

```bash
npm start
Expand Down

0 comments on commit 6eb3355

Please sign in to comment.