diff options
Diffstat (limited to 'Examples/r/simple/runme.R')
| -rw-r--r-- | Examples/r/simple/runme.R | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Examples/r/simple/runme.R b/Examples/r/simple/runme.R new file mode 100644 index 0000000..7830937 --- /dev/null +++ b/Examples/r/simple/runme.R @@ -0,0 +1,24 @@ +# file: runme.R + +dyn.load(paste("example", .Platform$dynlib.ext, sep="")) +source("example.R") +cacheMetaData(1) + +# Call our gcd() function + +x <- 42 +y <- 105 +g <- gcd(x,y) +sprintf("The gcd of %d and %d is %d", x, y, g) + +# Manipulate the Foo global variable + +# Output its current value +Foo() + +# Change its value +Foo(3.1415926) + +# See if the change took effect +Foo() + |
