similar to: calling a DLL/shared lib from R directly?

Displaying 20 results from an estimated 2000 matches similar to: "calling a DLL/shared lib from R directly?"

2002 Oct 08
1
dyn.load and c-function
I've got a c function in a dll and have been able to call it from R. The function is : void __stdcall testfunc2( unsigned long *a, double *b, unsigned long *c, double *result ) { *result = 0; *result = (*a) * (*b) * (*c); } and the R code to call the function is as follows: dyn.load("c:/openfvs/biometrics/debug/biometrics.dll" ) tf2 <- function(
2010 Feb 02
0
[LLVMdev] jit X86 target compilation callback bug
Hello > We are running llvm jit x86 on MS Visual Studio 2005. It seems there > is a bug in asm code in function X86CompilationCallback in file > X86JITInfo.cpp. Current code sets stack pointer to invalid value in > instruction "and   esp,  16". Depending on current stack pointer value > it sometimes overwrites ecx and edx registers with next three lines. How so? The stack
2010 Jul 11
1
difficulty with R expressions in text/legend
hi, i'm trying to prepend some plain (i.e. unevalutated) text to a typographically evaluated R expression in a legend(...) call. here's a working legend(...) call that is close to what i'd like (where x and y are returned from an lm(...) call): legend("topleft", legend = c(bquote(R^2 == .(summary(x)$r.squared)), bquote(R^2 == .(summary(y)$r.squared))), fill =
2010 Oct 01
3
scoping goes wrong when some functions are used within others.
Dear, I'm following the r tag on stackoverflow.com, and couldn't but notice there are quite some questions popping up that deal with scoping in relation to custom functions. I grinded my teeth on it already, and I have absolutely no clue what goes wrong. The general pattern is as follows : ff <- function(x){ y <- some_value some_function(y) } > ff(x) Error in eval(expr,
2007 Jun 11
5
string conversion?
Hi there! Is it possible to do something string converison like in puppet? My problem: I have a variable that contains a path ($variable = "some/value"). This variable is passed on as an option to an external script, which uses the variables content to generate I) a path and II) a filename, converting the "/" to "_" for that filename. I don´t really see a way to
2011 Nov 22
4
Data Frame Search Slow
Hey All, So - I promise to write a blog post on this topic and post it somewhere on the internet once I get to the bottom of this. Basically, the set-up to the problem is like this: 1. I have a data frame with dim (2547290, 4) 2. I need to make SQL like lookups on the dataframe. I have been using the following sort of syntax: a.dataframe[a.dataframe[[column_index]] %in% some_value, ] 3.
2010 Feb 02
3
[LLVMdev] jit X86 target compilation callback bug
Hi! We are running llvm jit x86 on MS Visual Studio 2005. It seems there is a bug in asm code in function X86CompilationCallback in file X86JITInfo.cpp. Current code sets stack pointer to invalid value in instruction "and esp, 16". Depending on current stack pointer value it sometimes overwrites ecx and edx registers with next three lines. We have fixed this problem by changing this
2008 Nov 10
6
Variable passed to function not used in function in select=... in subset
Hello! I have the problem that in my function the passed variable is not used, but the variable name of the dataframe itself?- difficult to explain, but an easy example: TestFunc<-function(df, group) { ??? print(names(subset(df, select=group))) } df1<-data.frame(group="G1", visit="V1", value=0.9) TestFunc(df1, c("group", "visit")) Result: [1]
2008 Feb 21
7
looping through a list
what is the proper way to loop through a list in a rails view (assuming that you need to check if it is empty or not) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2007 Jul 26
2
[LLVMdev] Multiversioning
Hi, I am interested in generating two different optimized versions of a function into a single binary, so that I can dynamically select the function to execute at runtime. Can anyone shed some insight into the difficulties in achieving this in the LLVM infrastructure? Thank you! vj. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Jun 29
2
[LLVMdev] Confuse on getSCEVAtScope
hi all, i have SCEVAddRec {{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1> where Loop0 and Loop1 are brothers (loops at the same level of the loopnest), and Loop0 have a computable backedge taken count. when i call getSCEVAtScope({{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1> , Loop1), it just give me a {{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1>, instead of
2006 Apr 30
0
latest cvs head makes api more strongly typed
In previous versions the following would work as you expect with a dynamic language like Ruby. Method signature of wxGrid::SetRowLabelSize void SetRowLabelSize(int width) ex. gird = Wx::Grid.new(....) grid.set_row_label_size(some_value*0.5) which Ruby translates to gird = Wx::Grid.new(....) grid.set_row_label_size((some_value*0.5).to_i) In the latest cvs head you get this error:
2009 Sep 21
3
Basic function output/scope question
Hello Group, I'm trying to learn R and am having a problem getting output from a function I'm trying to write. The problem is clearly one of scope, but I can't find the documentation that tells me how to get around the issue. Here is an example of my problem. testfunc<-function(x) { y<-10 print(y) print(x) } testfunc(4) The variables x and y are accessible during execution
2010 Feb 03
2
[LLVMdev] jit X86 target compilation callback bug
Hello again. I still think that you are wrong. Realignement with and esp,-16 not always changes stack poiner. If esp is already aligned to 16 byte boundary, it will not change! Take a look at following example. Assume esp has value 0x000001000 at start of X86CompilationCallback function. Then execution of it will yield following esp values: 0x000000FFC - after push ebp 0x000000FFC - after mov
2004 Feb 18
0
return a list of vectors from C?
I've been working on a shared library that will be called from R. The functions pass several vectors in and out (residuals, parameters, etc) and I would like to be able to return a list of objects. I'm familiar with return single objects (vectors, etc) from a C function, but need a little help for returning a list of objects. My code so far looks something like: /* this function will
2004 Feb 18
0
return a list of vectors from C?
I've been working on a shared library that will be called from R. The functions pass several vectors in and out (residuals, parameters, etc) and I would like to be able to return a list of objects. I'm familiar with return single objects (vectors, etc) from a C function, but need a little help for returning a list of objects. My code so far looks something like: /* this function will
2008 Jun 12
4
Background thread - entension code - switch contexts
Hi, I am using wxRuby 1.9.7 and Ruby 1.8.6. I have built an extension in C++ and used swig to load it into Ruby interpreter, which works great. The extension is an often long executing algorithm, and I''ve noticed that if I fork a new Ruby thread in button clicked event, and in this thread run the algorithm the application freezes for the time of execution. I have looked through the
2006 May 18
4
Problems using ''select''
I use :filter action to display form and allow record filtering. It contains form with combo box, submit button and list of record matching value in combo. filter.rb: class Filter attr_accessor :owner def initialize(params) @owner = ''''; if !params[:filter].nil? and params[:filter].has_key?(:owner) @owner = params[:filter][:owner] end end end Controler: @users =
2007 Mar 05
1
Setting Sip Headers From Dial App?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This might sound strange, but is there anyway for Asterisk to set extra sip headers based on a sip phone returning a 302 in a dialplan? Example: PSTN => Asterisk => SIP-Phone, SIP-Phone returns 302 Redirect, Asterisk sets X-Something: Some_Value & X-Somethingelse: Some_Other_Value, then sends the new invite with added headers. Stu Sheldon
2006 Aug 01
2
Partial Naming Madness
Hi, I am having the following issue with a partial. During initial page load, I am doing a "render_partial_collect ''foo'', @foos", and all goes well. Each foo partial makes use of a variable inside called ''foo'' (and can get foo.id etc). After all the partials are loaded, I need to :update a div corresponding to one of the partials (ie re-load the