RLink`
RLink`

RDataTypeDefinitionsReload

RDataTypeDefinitionsReload[opts]

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.

更多信息和选项

  • 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.

范例

基本范例  (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 语言函数,https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.

文本

Wolfram Research (2012),RDataTypeDefinitionsReload,Wolfram 语言函数,https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.

CMS

Wolfram 语言. 2012. "RDataTypeDefinitionsReload." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html.

APA

Wolfram 语言. (2012). RDataTypeDefinitionsReload. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/RLink/ref/RDataTypeDefinitionsReload.html 年

BibTeX

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

BibLaTeX

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