If I have an R script called arscript.r
with the following content:
#!/usr/bin/R
newvar = 10
then in the R interactive shell I can do
> source("./arscript.r")
> newvar
[1] 10
I would like to do the equivalent in Python. How would it be possible? Obviously in Python I would write print(newvar)
...