searches for files with definitions of extra data types, defined by the user to extend the core data type system of RLink, and loads those definitions.

Details and Options

  • The following options can be given:
  • "AddToRDataTypePath"Noneadditional places to search for .m files with type definitions (a list of directories)
  • Using RDataTypeDefinitionsReload makes sense in situations when some new files with extended data types definitions have been created during an RLink session and need to be dynamically loaded without quitting the RLink session.
  • RDataTypeDefinitionsReload is called internally by InstallR. While being mostly an internal function, it is very useful for interactive development of extended data types definitions, which justifies its public function status.
  • All definitions for data types registered interactively in a given RLink session will be removed after RDataTypeDefinitionsReload is called, so purely interactive type registrations will be lost. Only definitions saved in files that are on the search path of RDataTypeDefinitionsReload will be reloaded.


Basic Examples  (1)

Calling RDataTypeDefinitionsReload only makes sense to dynamically (re)enable new data types just defined and stored in some external files.

This creates a temporary directory to store the sample definitions for new data types:

Here is the string version of the sample data type code used in the reference page for the RDataTypeRegister function, wrapped in a package (namespace):

Export this to create a file with this definition:

Now everything is ready to reload the data type definitions, including the new file:

You can test that the definition is now effective by using ToRForm:

You can now send your data to R, using the custom data container just defined:

The result is automatically converted according to the inverse conversion rule used above in RDataTypeRegister, when returned back from R:

You can now unregister the data type:

Wolfram Research (2012), RDataTypeDefinitionsReload, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.


Wolfram Research (2012), RDataTypeDefinitionsReload, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.


Wolfram Language. 2012. "RDataTypeDefinitionsReload." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.


Wolfram Language. (2012). RDataTypeDefinitionsReload. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html


@misc{reference.wolfram_2023_rdatatypedefinitionsreload, author="Wolfram Research", title="{RDataTypeDefinitionsReload}", year="2012", howpublished="\url{https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html}", note=[Accessed: 16-June-2024 ]}


@online{reference.wolfram_2023_rdatatypedefinitionsreload, organization={Wolfram Research}, title={RDataTypeDefinitionsReload}, year={2012}, url={https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html}, note=[Accessed: 16-June-2024 ]}