/trunk/Examples/r/simple/runme.R
R | 24 lines | 10 code | 8 blank | 6 comment | 0 complexity | ef848e158c5bc047dffc8a4ca20a10df MD5 | raw file
1# file: runme.R 2 3dyn.load(paste("example", .Platform$dynlib.ext, sep="")) 4source("example.R") 5cacheMetaData(1) 6 7# Call our gcd() function 8 9x <- 42 10y <- 105 11g <- gcd(x,y) 12sprintf("The gcd of %d and %d is %d", x, y, g) 13 14# Manipulate the Foo global variable 15 16# Output its current value 17Foo() 18 19# Change its value 20Foo(3.1415926) 21 22# See if the change took effect 23Foo() 24