comparison R/rdc/demo/sqrt.R @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1 # File: rdc/demo/sqrt.R
2 # Description: call sqrt
3
4 if (.Platform$OS.type == "unix") {
5 dyn.load("/lib/libc.so.6")
6 } else {
7 dyn.load("/windows/system32/msvcrt")
8 }
9
10 sym.sqrt <- getNativeSymbolInfo("sqrt")
11
12 x <- 144.0
13 rdcCall( sym.sqrt$address, "d)d", x)
14