1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
This directory provides a simple example of using RInside with the Qt
toolkit---using a SVG renderer. Usage is standard Qt usage, through cmake.
To build from commandline try the following from this directory:
```
mkdir build; cd build
cmake -S ../cmake -G "Unix Makefiles"
make -j
```
On Ubuntu you would need at least the following packages installed: libqt6svgwidgets6 qt6-tools-dev-tools qt6-base-dev r-base-dev libqt6svg6-dev
What could be easier on some systems, depending on how Qt was installed, is using Qt Creator.
This can be done through "Open Project" and loading "CMakeLists.txt".
If you are on macOs and there are errors on "SUBSTRING" needing 4 arguments try starting QtCreator manually from a terminal.
If you get similar errors on Windows then perhaps R isn't on the PATH and you might need to add the `bin/x64` folder of R manually.
To generate SVG output, this version depends on the cairoDevice package for R
which you may need to install. According to its author Michael Lawrence,
there are two small issues. The first is that the SVG produced by
cairoDevice is a littler richer than the subset which Qt can show. We
address this by filtering the file before viewing it. The other is an
apparent error in the clipping which we cannot do anything about---Michael
considers it a rendering issue.
All the help by Michael in getting the svg variant to roll is gratefully
acknowledged.
|