R version compatibility

Similar to rkward_min_version and rkward_max_version, the <dependencies> element allows specification of the attributes R_min_version and R_max_version. However, there are the following differences:

  • Plugins which fail to meet the R version requirement are not currently skipped when reading a .pluginmap file. The user can still call the plugin, and will not see any immediate warning (in future versions, a warning message will probably be shown)

  • In consequence it is also not possible to define alternative versions of a plugin depending on the running version of R.

  • However, it is often easy to achieve backwards compatibility as shown below. If you are aware of R compatibility issues, please consider using this method, instead of defining a dependency on a particular version of R.

In many cases, it is easily possible to provide reduced functionality, if a certain feature is not available in the running version of R. Consider the following short example of a plugin .xml file:

<dialog [...]>
	<logic>
		<dependency_check id="ris210" R_min_version="2.10.0"/>
		<connect client="compression.xz.enabled" governor="ris210"/>
	</logic>
	[...]
	<radio id="compression" label="Compression method">
		<option label="None" value="">
		<option label="gzip" value="gzip">
		<option id="xz" label="xz" value="xz">
	</radio>
	[...]
</dialog>
	

In this example the compression option "xz" will simply be disabled when the R runtime version is older than 2.10.0 (which did not support xz compression). The <dependency_check> element supports the same attributes as the <dependencies> element in .pluginmap files. It creates a boolean property, which is true, if the specified dependencies are met, false otherwise.