Displaying 20 results from an estimated 1000 matches similar to: "call R function from C code"
2017 Oct 20
3
Re: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
2017-10-20 14:59 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
> On Thu, Oct 19, 2017 at 09:11:00PM +0300, Matwey V. Kornilov wrote:
>>
>> Hello,
>>
>> I use libvirt 3.3.0 and qemu 2.9.0
>>
>> My domain XML spec is the following:
>>
>> <domain type='qemu'>
>> <name>s390_generic</name>
>>
2017 Oct 24
2
Re: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
On Fri, Oct 20, 2017 at 10:12:19PM +0300, Matwey V. Kornilov wrote:
>2017-10-20 17:14 GMT+03:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
>> 2017-10-20 15:16 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
>>> On Fri, Oct 20, 2017 at 03:07:19PM +0300, Matwey V. Kornilov wrote:
>>>>
>>>> 2017-10-20 14:59 GMT+03:00 Martin Kletzander
2017 Oct 25
2
Re: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
2017-10-25 17:28 GMT+03:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
> 2017-10-24 12:58 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
>> On Fri, Oct 20, 2017 at 10:12:19PM +0300, Matwey V. Kornilov wrote:
>>>
>>> 2017-10-20 17:14 GMT+03:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
>>>>
>>>> 2017-10-20 15:16
2017 Oct 19
2
terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
Hello,
I use libvirt 3.3.0 and qemu 2.9.0
My domain XML spec is the following:
<domain type='qemu'>
<name>s390_generic</name>
<uuid>82b4d16e-b636-447e-9fda-41d44616bce8</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu
2009 Sep 29
3
How do I access class slots from C?
Hi
I'm trying to implement something similar to the following R snippet using
C. I seem to have hit the wall on accessing class slots using C.
library(fPortfolio)
lppData <- 100 * LPP2005.RET[, 1:6]
ewSpec <- portfolioSpec()
nAssets <- ncol(lppData)
setWeights(ewSpec) <- rep(1/nAssets, times = nAssets)
ewPortfolio <- feasiblePortfolio(
data = lppData,
spec = ewSpec,
2015 Mar 25
4
F77_CALL/NAME problem
Dear R-devel,
I am trying to use Fortran DGESV subroutine into C. Here it is the relevant
part of the C file I am currently writing
#include<stdio.h>
#include<R.h>
#include<Rmath.h>
#include<math.h>
void F77_NAME(DGESV)( int*, int*, double*, int*, int*, double*, int*, int*);
void solve( int *p, double *A, double *Ainv)
{
...
F77_CALL(DGESV)(p, p, Ain, p, ipiv,
2017 Oct 20
0
Re: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
2017-10-20 17:14 GMT+03:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
> 2017-10-20 15:16 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
>> On Fri, Oct 20, 2017 at 03:07:19PM +0300, Matwey V. Kornilov wrote:
>>>
>>> 2017-10-20 14:59 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
>>>>
>>>> On Thu, Oct 19, 2017 at
2023 Mar 23
1
`dendrapply` Enhancements
Hello Aidan,
Sorry for dropping this for a while.
? Thu, 2 Mar 2023 21:03:59 +0000
"Lakshman, Aidan H" <AHL27 at pitt.edu> ?????:
> //after
> curnode = eval(lang3(R_Bracket2Symbol, parent->node, DEND_IND), env);
lang3() always constructs a new language object. If you do end up using
eval(), it may make sense to move lang3() out of the loop and reuse the
existing object
2014 Jun 25
1
Need help on calling Head from C
Hi ,
I am trying to call head function from C . My doubt is with the parameter
n,how to pass it .
PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
PROTECT(head=lang3(install("head"),res,ScalarInteger(1)));
head = PROTECT(eval(head,R_GlobalEnv));
I tried
2010 Jul 19
1
Calculation of Covariance Matrix Calculation
Hi,
Excuse me for asking this silly question. But I really couldn't understand
why cov() and ccov() don't work for my calculation of covariance matrix.
a <- matrix(1:8, 2, 4)
a
[,1] [,2] [,3] [,4]
[1,] 1 3 5 7
[2,] 2 4 6 8
> ccov(a)
Error in solve.default(cov, ...) :
Lapack routine dgesv: system is exactly singular
I also tried colume bind, but it
2009 Oct 29
2
Help with lang4
Hi
I seem to have run into a situation where I have more than 3 arguments to
pass to a function from C.
the following functions help me build an expression for evaluation:
lang
lang2
lang3
lang4
What should one do if there are more arguments than lang4 can handle?
Regards
Abhijit Bera
[[alternative HTML version deleted]]
2019 Nov 01
3
R C api for 'inherits' S3 and S4 objects
Dear R developers,
Motivated by discussion about checking inheritance of S3 and S4
objects (in head matrix/array topic) I would light to shed some light
on a minor gap about that matter in R C API.
Currently we are able to check inheritance for S3 class objects from C
in a robust way (no allocation, thread safe). This is unfortunately
not possible for S4 classes. I would kindly request new
2007 Jun 24
1
There was a problem by the use of snow.
problem of the very large memory require by the Sign extension.
--- R-2.5.0.orig/src/main/serialize.c 2007-03-27 01:42:08.000000000 +0900
+++ R-2.5.0/src/main/serialize.c 2007-06-25 00:48:58.000000000 +0900
@@ -1866,7 +1866,7 @@
static void resize_buffer(membuf_t mb, int needed)
{
- int newsize = 2 * needed;
+ size_t newsize = 2 * needed;
mb->buf = realloc(mb->buf,
2017 Oct 25
0
Re: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd)
2017-10-24 12:58 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
> On Fri, Oct 20, 2017 at 10:12:19PM +0300, Matwey V. Kornilov wrote:
>>
>> 2017-10-20 17:14 GMT+03:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
>>>
>>> 2017-10-20 15:16 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
>>>>
>>>> On Fri, Oct 20, 2017
2019 Nov 01
4
[External] R C api for 'inherits' S3 and S4 objects
Thank you Luke.
That is why I don't use Rf_inherits but INHERITS which does not
allocate, provided in the email body.
I cannot do similarly for S4 classes, thus asking for some API for that.
On Fri, Nov 1, 2019 at 5:56 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote:
>
> On Fri, 1 Nov 2019, Jan Gorecki wrote:
>
> > Dear R developers,
> >
> > Motivated by
2008 Feb 27
1
Warnings generated by log2()/log10() are really large/takes a long time to display
x <- rnorm(1e6);
y <- log(x); # or logb(x) or log1p(x)
w <- warnings();
print(object.size(w));
## [1] 480
str(w);
$ NaNs produced: language log(x)
- attr(*, "dots")= list()
- attr(*, "class")= chr "warnings"
y <- log2(x); # or log10(x)
w <- warnings();
print(object.size(w));
## [1] 8000536
str(w);
## List of 1
## $ NaNs produced: language
2009 Aug 25
2
Clarifications please.
Hi
I think I have asked these questions earlier, but I been able to find
answers from the documentation (which I found poorly written in several
places). Will someone be kind enough to give me answers and enlighten me?
(as in explain with CODE?)
I want to embed R in my application and use the fPortfolio package for
carrying out risk management computations. Right now I'm reading the
Rmetrics
2012 May 23
2
Expected behaviour of is.unsorted?
Hi,
I've read ?is.unsorted and searched. Have found a few items but nothing
close, yet. Is the following expected?
> is.unsorted(data.frame(1:2))
[1] FALSE
> is.unsorted(data.frame(2:1))
[1] FALSE
> is.unsorted(data.frame(1:2,3:4))
[1] TRUE
> is.unsorted(data.frame(2:1,4:3))
[1] TRUE
IIUC, is.unsorted is intended for atomic vectors only (description of x in
?is.unsorted). Indeed
2009 Sep 16
2
I want to get a reference to this time series object
I'm trying to get a reference to this object in C
SWX.RET[1:6,c("SBI,"SPI","SII")]
While i am able to access and use a plain SWX.RET object, I'm getting
confused on how to create an object with the array subscripts like above.
Here is what I tried to do. It doesn't work because "[" is obviously not an
operation or function on SWX.RET. So how do I
2010 Nov 21
3
Can't invert matrix
Hi,
I'm trying to use the solve() function in R to invert a matrix. I get
the following error, "Lapack routine dgesv: system is exactly singular"
However, My matrix doesn't appear to be singular.
[,1] [,2] [,3] [,4]
[1,] 0.99252358 0.93715047 0.7540535 0.4579895
[2,] 0.01607797 0.09616267 0.2452471 0.3088614
[3,] 0.09772828 0.58451468 1.4907090