In R, how and where does the underlying C functions get their argument inputs?
I’m trying to understand what happens at the C level when I call a function in R. For instance, print("Hello, World!")
will call UseMethod("print")
. From the “table” in names.c, line 832, I know that UseMethod()
in turn will call do_usemethod
:
Is there a way to impose a time limit on a chunk of R code even though a part of the code is running in C?
I have a part of a function which later runs in a loop and I want to impose a time limit on a part of this function. It should return NAs in case the time limit is exceeded to prevent my whole program from running too long. The problem is that the optimisation, a part of the code, runs in C, so withTimeout() from R.utils doesn’t work.
The function I want to time-restrict is ugarchfit() from the rugarch package. The documentation indicated that the optimisation runs in C code for efficiency.
Is there a way to impose a time limit on a chunk of code even though a part of the code is running in C?
I have a part of a function which later runs in a loop and I want to impose a time limit on a part of this function. It should return NAs in case the time limit is exceeded to prevent my whole program from running too long. The problem is that the optimisation, a part of the code, runs in C, so withTimeout() from R.utils doesn’t work.
The function I want to time-restrict is ugarchfit() from the rugarch package. The documentation indicated that the optimisation runs in C code for efficiency.
How can I change where R compiles C scripts when installing libraries?
R is using /private/tmp/*
to install libraries and compile C scripts. I need to change where that is done because of permission issues on my machine. How can I change this?