/trunk/Examples/r/simple/runme.R
R | 24 lines | 10 code | 8 blank | 6 comment | 0 complexity | ef848e158c5bc047dffc8a4ca20a10df MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- # 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()