RFC: Pass Arguments from Drupal to R

Created on 13 July 2015, over 9 years ago
Updated 9 November 2024, about 1 month ago

I want to be able to pass data into an R Filter enabled node, such as the arguments.

Goals:

  1. Pass in the arg()and params() arrays from Drupal to the R code in array format (as variables 'd_arg' and 'd_params').
  2. Pass results back from R to drupal. (as array $r_result - this is only a theory since the R filter wouldn't know what to do with this yet? )

Not sure the best approach, but I have played around with one that uses json. jsonlite is the initial test, and of course this would break your install if you did not have the jsonlite library installed. Anyhow, consider it an RFC. Attached patch adds a function called "_r_add_arg()" which is called in the writing of the temp R file to be executed. The following code block will demonstrate the function:

[R]

print(darg);

[/R]
✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robertwb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024