0

I have to pass some values to a python script and get some values back from it in R. I am presently using rPython library in R. I am able to get values from script using python.get(var_name). How can I send values to python script?
Anything other than rPython which can help me do this is also appreciated.

1 Answer 1

1

python.assign seems to be the function you need.

From the package documentation for RPython:

Description
    Functions that assign and get Python variables from R.
Usage
    python.assign(var.name, value, ...)
    python.get(var.name)

Arguments
    var.name   a character string containing a valid python variable name
    value      an R object whose equivalent wants to be assigned to the variable in python
    ...        other arguments passed to the internal toJSON function cal
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.