Here is my temp.R
a=1
print(a)
but when I use the source ("temp.R"), the variable a is replaced
> a=3
> source("temp.R")
[1] 1
> a
[1] 1
And I expect that
> a=3
> source("temp.R")
[1] 1
> a
[1] 3
Can this be done in R? Any help to get the result, as described above, would be greatly appreciated.
source
share