Displaying 20 results from an estimated 1000 matches similar to: "matrix to a C function"
2009 Feb 08
2
Strange behavior of C compiled program
Hi the list,
I need to include some C code in R, but the behavior of the C code is
strange : Here is my code :
--- 8< ---
Rprintf("\n XXXX mTraj=%f
mClus=%f",mTraj[i+nbId*c],mClustersCenter[j+nbClusters*c]);
Rprintf("\nDistA=%d Tmp=%d",dist,tmp);
tmp = mTraj[i+nbId* c] - mClustersCenter [j+nbClusters* c];
Rprintf("\nDistB=%d
2013 Dec 06
3
Matrix memory layout R vs. C
Hi everybody,
I'm trying to pass a matrix from R to C, where some computation is done
for performance reasons, and back to R for evaluation. But I've run into
the problem that R and C seem to have different ways of representing the
matrix in main memory. The C representation of a 2D matrix in linear
memory is concatenation of the rows whereas in R, it's a concatenation
of the
2012 Apr 17
1
Test-Predict R survival analysis
Hi,
I'm trying to use the R Survival analysis on a windows 7 system.
The input data format is described at the end of this mail.
1/ I tried to perform a survival analysis including stratified variables
using the following formula.
cox.xtab_miR=coxph(Surv(time, status) ~ miR + strata(sex,nbligne, age),
data=matrix)
and obtain the following error message
Warning message:
In fitter(X, Y,
2003 Feb 02
1
printing reals from C with digits -- once more
Thank for Brian D. Ripley for the answer to my previous question.
My aim is to print single values from different real vectors with
different digits option. This is quite a possible with Rprintf() but
that one supprots printing format as C does, not in R native way
(setting digits=7 or printing with "%12.7f" are two quite different
things). So I would like to find something more
2009 Aug 30
3
Computer Modern Fonts in R graphic
Hello all,
I am trying to use computer modern fonts in my r grahics. I tried to do,
as described here: http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html
but unfortunately, it does not work.
First of all I downloaded the cm-lgc package and the AFM and PFB-files
from the page and put them in my R working directory, so far, so good.
Then I tried to run the following code:
> sn <-
2013 Jun 25
1
Correct scaling of axis in persp3d plot
Hi,
I want to format my axis in my persp3d plot.
With my data, which I attached I created a persp3d plot with the following code, which I summarized from different code snippets I found:
library(rugarch)library(rgl)library(fGarch)fd <-as.data.frame(modelfit,which ='density')color <-rgb(85,141,85,maxColorValue=255)x <-seq(-0.2,0.2,length=100)y <-c(1:2318)f
2003 Jan 29
1
printing reals from C with digits
Hi,
I want to print real numbers in C code with different values for
digits. How to do that?
As I have understood, what I should do is to call
StringFromReal()
which calls FormatReal(), that one suggests the parameters (width,
decimal places and exponential form). FormatReal() includes
eps = pow(10.0, -(double)R_print.digits);
So I guess I have to change the value of R_print.digits.
2006 Jun 02
1
doubt with integrate ()
Dear members,
I'm getting an error with the "integrate" function. Searching in the r-help
archives, I think this may have something to do with the function (it is not
returning a vector but a number), but I don't see exactly what.
The function to integrate was defined with a for loop first:
for (i in 1:(nbcol-1))
{tdon1<-tdon[,i]
2017 Jun 17
3
write.dna command
Hi all,
I am learning R by "doing". And this is my first post.
I want to use R: 1- to fetch a DNA sequence from a databank (see bellow)
and 2- store it as FASTA file.
The problem: neither an error is prompted nor the fasta file is created.
Testing the code (see bellow), I notice that everything works until
the *"write.dna"
*command - which is not creating the fasta file.
2006 May 17
0
script S-plus -> R
Dear List,
I'm trying to transfer a script that uses S-plus functions for the
kernel and integration calculations to R. This it what it looks like in
S-plus:
qrm(cpt,don,ect,h,intctk,nbcol,nbl1,nbl2,nbl3,nlc,nlgn,overlap,Results,tdon,tdon1,tdon11,tdon2,tdon21)
don<-guiDisplayFileDialog()
import.data (DataFrame="tdon",FileName=don,FileType="EXCEL")
2011 Mar 18
0
keep color range constant across three persp() graphs
Hi All.
I have created two, 3-D, color graphs using persp(). Z values range from 1
to 100 on the first plot, and 0.5 to 50 on the second plot.
I would like to keep the color range constant between the two graphs, rather
than each graph showing the full range of colors.
So the first graph should go from yellow to red and the second graph should
go from yellow to orange.
Below I present a
2017 Jun 17
0
write.dna command
I suspect you meant
WD <- "~/Documents/Scripting/R_Studio/Sequences/"
but I am entirely unfamiliar with the packages you are using, and know nothing about what is on your hard drive.
For future reference:
A) Read the Posting Guide. This is a plain text email list, and your html formatting gets removed leaving a mess that is not always readable.
B) Most frequent users of R
2011 Oct 28
2
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
Hi all.
I found next code when switch instruction differs:
Engine.logf("right switch has extra case %r") << CaseValue;
Where CaseValue is a ConstantInt object. Looking how logf works I found
that it invokes DiffConsumer::printValue method for CaseValue. And here
I found that CaseValue itself will never printed. On first look how
DiffConsumer::printValue works it seems that for
2011 Oct 31
3
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
Hi,
Please find the attached patch for review.
-Stepan.
John McCall wrote:
> On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote:
>> I found next code when switch instruction differs:
>>
>> Engine.logf("right switch has extra case %r")<< CaseValue;
>>
>> Where CaseValue is a ConstantInt object. Looking how logf works I found
>> that it
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
Dear all,
my aim is to integrate R in an interactive visualisation software
called Bulk Analyzer developed by VrVis (http://www.vrvis.at).
the code:
SEXP e, tmp;
ParseStatus status;
PROTECT(tmp = mkString("x <- c(1.234,-3.45)"));
PrintValue(tmp);
PROTECT(e = R_ParseVector(tmp, -1, &status, R_NilValue));
PrintValue(e);
UNPROTECT(2);
produces the following output:
[1] "x
2009 Feb 22
4
'unique' error message is printed despite silent=TRUE (PR#13547)
In 2.8.0/Windows Vista:
When 'unique' gives a type error message, it prints out even if errors
are being caught:
> try(unique(quote(hello)),silent=TRUE)
hello
This comes from the .Internal unique routine:
> try(.Internal(unique(quote(hello),NULL,NULL)),silent=TRUE)
hello
I guess it is using the internal equivalent of print rather than the
internal equivalent of stop.
2006 Jul 11
0
script problem to obtain pairs of overlap values
Dear,
I wrote a code to estimate the overlap between two kernel distributions.
The script must estimates the overlap among each columns of data frame.
With S sampled species (columns) in my data frame, I want obtain
S(S-1)/2 pairs of overlap values between species.
However, the code is not well write at all (only an overlap value is
produced) and I can't find the solution.
To illustrate the
2011 Oct 29
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote:
> I found next code when switch instruction differs:
>
> Engine.logf("right switch has extra case %r") << CaseValue;
>
> Where CaseValue is a ConstantInt object. Looking how logf works I found
> that it invokes DiffConsumer::printValue method for CaseValue. And here
> I found that CaseValue itself will
2011 Nov 03
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
ping.
-Stepan.
Stepan Dyatkovskiy wrote:
> Hi,
>
> Please find the attached patch for review.
>
> -Stepan.
>
> John McCall wrote:
>> On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote:
>>> I found next code when switch instruction differs:
>>>
>>> Engine.logf("right switch has extra case %r")<< CaseValue;
>>>
2000 Jun 21
1
Port of R header files to Delphi
I'm in the process of porting R header files to Delphi. The short
term aim is to be able to make calls into the R.dll from Delphi; the
longer term aim is to play around with writing a Windows front-end
with some of the features of the S-PLUS environment (e.g. scripts),
and other features from other IDEs I've used (e.g. watch windows,
popup values of variables selected by mouse, etc.)