Displaying 20 results from an estimated 10000 matches similar to: "Memory problems with a custom R package"
2009 Dec 17
1
Error for making packages under windows XP-Error in library.dynam(lib, package, package.lib)
Hi,
I have installed the necessary tools for making a R package under windows
and am sure these tool have been correctly configured. I am very new to try
writing a package, so the error may be very obvious for you. Forgive me if
it is too easy.
My package name is *stam*, and i put it under the folder
"D:/StatSoft/R/MyPackage/". I have two folders,*R* and *man*. Besides, i
also have
2010 Jan 26
1
library.dynam
hi, i'm having some trouble getting a package to load a shared library
object in .onLoad(...)
i have a shared object file, say "mylib.so".
if i start an R session, and via the CLI specify the actual library
via:
> dyn.load("mylib.so")
everything works quite well (i.e. i can then follow with some .Call
(...) methods)
now, i'd like to include this shared library in
2006 Nov 06
2
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi:
I've been able to compile the attached "helloworld.c" file converted
from "helloworld.cpp".
My question is how does one usually use __main() and CODE_FOR_MAIN()
in tying up with the rest of the code?
Attached here are the original "helloworld.cpp" and "helloworld.c"
files.
Thanks.
Napi
On Sun, 2006-11-05 at 09:14 -0800, Reid Spencer wrote:
>
2006 Nov 06
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi Napi,
On Mon, 2006-11-06 at 10:44 +0800, Mohd-Hanafiah Abdullah wrote:
> Hi:
>
> I've been able to compile the attached "helloworld.c" file converted
> from "helloworld.cpp".
Great.
>
> My question is how does one usually use __main() and CODE_FOR_MAIN()
> in tying up with the rest of the code?
I'm not quite sure what you're asking.
2006 Mar 13
1
Help on interfacing C++ with R
Hi, I am trying to set up a C++ library for my R code. I followed the
R-extension manual but found out that the example of "X.cpp, X_main.cpp"
is somewhat too simple. Here is my code:
//lib4R.h testing for interfacing C++ with R -- using C++ library in R
#include <iostream>
using namespace std;
class lib4R {
public:
lib4R();
~lib4R();
int
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors...
Each of these commands correctly prints "hello":
echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit
echo -e '#include <iostream>\nint main(){ std::cout <<
2011 Jun 03
2
Checking and building package
Hello!
I am truing to compile an R-package having c-code. I put foo.c in src/
folder and useDynLib("foo") in NAMESPACE file. When trying R CMD check,
I got an error message that shared object 'foo' is not found. Then I did
R CMD SHLIB foo.c first. However, after that, I got warnings from R CMD
check that there is an object file in /src folder. Even worse is if I
run R CMD
2007 Sep 19
1
building a package - shared library loading problem
Dear All,
I am trying to write my first R package and I bump into loading shared
library problem( working on Mac OS X 10.4.10 as well as Linux Ubuntu).
I want to makes use of (incorporate) a shared library matchinglib.so in
the package. Library was created via R CMD -SHLIB.
Following 'Writing R Extensions' I place matchinglib.so in the 'libs'
directory and use NAMESPACE file
2007 May 31
1
Problems when linking to R shared library
Folks,
I'm fairly sure that I'm doing something stupid, but I'm getting a few
really strange results from *some* of the distributions, but by no means
all,
when I link directly to the R shared library.
I've tried this on both Windows with the precompiled Mingw binary of R-2.5.0
(compiling my code with MinGW-3.4.2), and by building R-2.5.0 on Mandriva
Linux with gcc-3.4.4 and
2006 Nov 17
2
Data table in C
After getting one list done, I am now struggling to form a data frame in C.
I tried to do a list of lists which gives me :
$<NA>
$<NA>[[1]]
[1] "BID"
$<NA>[[2]]
[1] 0.6718
$<NA>[[3]]
[1] 3e+06
$<NA>
$<NA>[[1]]
[1] "BID"
$<NA>[[2]]
[1] 0.6717
$<NA>[[3]]
[1] 5e+06
$<NA>
$<NA>[[1]]
[1] "BID"
2014 Apr 13
2
Adding an external library to Xapian
My code is not on Github. I am using the tarball as of now. The following
it the error that occurred:
http://pastebin.com/cVJrjUZX
On Sun, Apr 13, 2014 at 8:16 PM, James Aylett <james-xapian at tartarus.org>wrote:
> On 13 Apr 2014, at 15:37, Pallavi Gudipati <pallavigudipati at gmail.com>
> wrote:
>
> > A linker error is encountered even after following the above
2018 Dec 09
2
Parse LLVM IR
Hello,
I am a newbie to LLVM and right now I am on the hook to parse some IR code
and do some instrumentations. However, my problem is that no matter how I
tweak my parsing code, it simply cannot print out anything.
So here is my C code:
int your_fun(int arg2) {
int x = arg2;
return x+2;
}
And here is my parsing code:
#include <llvm/IR/Module.h>
#include
2006 Nov 09
2
Retrieving function name
Hi,
Does anyone know how I can retrieve a function name, for example
If I have a function f as follows:
f <- function( myfunc ) {
print( name_of(myfunc) );
}
I want to know what I should have as "name_of" such that I could call this
with :
f( median )
and it would print "median"
or f( my_function_name ) and it would print "m_function_name".
So far all I
2006 Nov 21
1
dyn.load
Hi everyone,
Now I know there is information on this in the help files - which I have
read. I am very close to implementing this but can't quite get how to
remove this final hurdle.
I have a DLL called "X.DLL" which I have no original code for, just the
DLL.
I have created a wrapper C file for the calls in X.DLL, and have
successfully (I think) created a wrapper DLL for X
2011 May 06
1
Create and access several instances of a C++ class from R
Hello
We have a C++ class with several methods that manipulate an object. How is it possible to create several instances of that class *from R* in the C++ realm, which can then be accessed via a given name character? Symbolic example (we hope this illustrates our problem):
// C++ side:
class Foo{
...
}
// perhaps:
void my_new_instance_wrapper("the_character") // plain to see that I am
2008 Feb 09
2
[LLVMdev] exception handling broken on x86-64?
Hi,
when building the second release candidate of llvm 2.2 I noticed that
exception handling seems to be broken on Linux x86-64. The exception is
thrown but never caught.
This can be seen by this trivial example:
#include <iostream>
using namespace std;
class A { };
int main()
{
cout << "A" << endl;
try {
cout << "B" << endl;
2008 Sep 27
3
Query::MatchAll
Why there still been rank when using Query::MatchAll() ?
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
I get a crash when I try to link multiple modules registered in their
individual contexts.
Documentation for Linker::LinkModules doesn't mention anything about
contexts, and the first link succeeds. But the second link crashes.
Is this not the right way to merge such modules? If not, then what is
the right way?
In any case, documentation for Linker::LinkModules should say if
contexts are
2006 Nov 14
2
String to list and visa versa
Hi,
I need to collapse a list into a string and then reparse it back into the
list. Normally when I need to do this I simply use write.csv and
read.csv, but I need to do this in memory within R rather than writing out
to file. Are there any bespoke commands that any knows of that does
something like this or any tips for doing this that anyone can suggest? I
basically don't care
2008 Mar 17
1
how to get access to C++ Objects
In the "Writing R Extensions" manual appears this example, to get access to C++ function using the R commands:
R> dyn.load(paste("X", .Platform$dynlib.ext, sep = ""))
constructor Y
R> .C("X_main")
constructor X
destructor X
list()
That gives me access to the function "X_main", but how to get access to methods and properties