Displaying 20 results from an estimated 2000 matches similar to: "Use of Rf_duplicate"
2008 Feb 12
4
assigning NULLs to elements of a list
Dear developers:
I have just came across an (unexpected to me) behaviour of lists when
assigning NULLs to list elements. I understand that a NULL is a valid R
object, thus assigning a NULL to a list element should yield exactly the
same result as assigning any other object. So I was surprised when
assigning a NULL in fact removed the element from the list. Is this an
intended behaviour? If
2007 Sep 16
1
Using gsl libraries in R packages
I have some compiled C code that I call from R, and I would like to
distribute this code as an R package through CRAN. In the C code, I use the
gsl numerical libraries, mainly for the BLAS interface, some linear algebra
functions, and some optimization routines. As I prepare this code to
conform to the specs for R packagtes, I am wondering if there is a
restriction on the use of external
2007 Feb 13
2
anyone has C++ STL classes stability issue if used with R
Hello,
is there any one who uses C++ STL classes when programming shared libs
for R and has had any problems with STL?
In the very simple example below I am constantly getting segfaults when
trying to populate the queue. The segfault occurs at what looks like a
random index in the loop when pushing another element to the queue.
Reproduced on 4 machines. Object x is an Image as in EBImage,
2008 Jan 07
3
Finding windows DLLs
The XML package relies on libxml2.dll (e.g., bundled with the CRAN
binary) installed in library/XML/libs. Unfortunately,
c:/WINDOWS/system32/libxml2.dll will be found and loaded before
this.
Is there any programatic solution?
Thanks,
Martin
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold
2008 Nov 20
3
Turning off compiler optimization
Hi. I am writing some code in C that I would like to link into R.
My Makevars file is:
PKG_CPPFLAGS=-I/usr/local/include
PKG_LIBS=-L/usr/local/lib -lgsl
PKG_CFLAGS = -Wall -O0 -g -p -pg
The source file is core.c,. and I am compiling using R CMD SHLIB
core.c The output is
gcc -arch x86_64 -O3 -g -p -std=gnu99 -I/Library/Frameworks/
R.framework/Resources/include
2007 Oct 18
3
append/concatenate an element to a list in C-language
dear people,
i need to code a function in C working in R and receives two R SEXP
objects as parameters, where one is a list and another is a vector of
integers:
void f(SEXP list, SEXP vector) {
...
return list;
}
and it should return the given list with the integer vector concatenated
at the end (as the last element of the list). the list can be really big
so i would not like to create a
2010 Mar 11
1
Shrinking a List
Hello,
I create a VECSXP(call it A) with size N(~ 5000), i then proceed to
fill the elements and find out I don't need to fill more than
M (M<< N).
Thus if i return A to the user's R code, he/she will see a list of
length 5K of which N-M are NULLs.
To avoid this, I create a new VECSXP B of length M and /duplicate/ the
elements of A.
Since I do this often, it appears to be wasteful,
2008 May 04
1
texi2dvi instead of pdflatex in R2.7.0? and related bioc 2.2 builds
Dear lists:
I am somewhat puzzled by the use of texi2dvi/pdflatex in R2.7.0. When
building EBImage (bioconductor) with 2.7.0 I get the same error both in
Windows and Linux, which reads the following:
** building package indices ...
* DONE (EBImage)
* creating vignettes ... ERROR
/usr/bin/texi2dvi: pdflatex exited with bad status, quitting.
Error in texi2dvi(file = bft, pdf = TRUE, clean =
2007 May 25
2
R scripts slowing down after repeated called to compiled code
Thanks in advance to anyone that might be able to help me with this
problem. I have not been able to find a reference to it in the
documentation on online sources, so I am turning to this group.
I am running R 2.4.1 under Red Hat Enterprise Linux 4, on an x86_64
platform (multi-core Intel Xeon processors, 3.6Ghx, 8GB of RAM). I have
some rather complicated code (so I won't attach it here),
2008 Mar 05
1
SEXP size management.
Hi,
Trying to decrease the size of a SEXP variable without reassigning
values individually in a loop.
So far, I've tried using Realloc, as the follow source demonstrates:
SEXP dothis() {
SEXP Rblah;
PROTECT(Rblah = NEW_INTEGER(6));
int* blah = INTEGER(Rblah);
blah[0] = 1;
blah[1] = 2;
blah[2] = 3;
Realloc(Rblah, 3, INTEGER);
UNPROTECT(1);
return(Rblah);
}
According to the
2008 May 04
1
help with segmentation fault
Hello all,
I'm trying to have C called by R. I wrote C codes that worked
perfectly fine with R-2.6.0 in
windows system ( using R tools).
I had to change to SuSE Linux (this system has 3.2 GHz Intel
Xeon processors and 4 GB of RAM), the C codes were compiled okay but
when it was called to R-2.6.2, I got
error mesage :
***caught segfault***
address 0x1df5000, cause 'memory not
2007 Mar 12
3
reading BMP into R
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070312/112cd7f9/attachment.pl
2006 Oct 11
2
Compiling R 2.4.0 in ubuntu/linux
I'm not sure if this is the place to post this question, but, I am
having trouble compiling the source code. I do have a suitable C
compiler and f2c but I get this error when I run ./configure
configure: error: --with-readline=yes (default) and headers/libs are
not available
Any ideas? Thanks.
2006 Oct 11
2
Compiling R 2.4.0 in ubuntu/linux
I'm not sure if this is the place to post this question, but, I am
having trouble compiling the source code. I do have a suitable C
compiler and f2c but I get this error when I run ./configure
configure: error: --with-readline=yes (default) and headers/libs are
not available
Any ideas? Thanks.
2007 Feb 21
3
Omiting repeated values
Dear all R users,
Is there any function to omit repeated values in a vector? Your help will be highly appreciated.
Thanks
stat
---------------------------------
Here’s a new way to find what you're looking for - Yahoo! Answers
[[alternative HTML version deleted]]
2007 Feb 08
3
Running source from Unix line
How can I run something like source("filename") from the Unix command line?
Maybe somthing like ./R CMD source("filename") - this does not work.
I need to run an R source code file with a command from the Unix command
line.
assuming that I have R installed on my system.
Thank you all
Amir.
--
View this message in context:
2007 Mar 06
3
Passing command line parameters to a script
Hi,
Does any one know if it is possible to create an R script that can use
command line parameters. I can execute an R script from the command line,
but I cannot figure out how to pass parameters to the script. The only
resources I have found seem somewhat involved or incomplete.
Any help is appreciated.
Akintayo
[[alternative HTML version deleted]]
2007 May 22
2
inline C/C++ in R: question and suggestion
This is a question and maybe an announcement.
We've been discussing in the group that it would be nice to have a
mechanism for something like "inline" C/C++ function calls in R. I do
not want to reinvent the wheel, therefore, if something like that
already exists, please give me a hint -- I could not find anything. If
not, here is a working solution, please criticise so I could
2007 May 04
3
decimal values
hello,
how can I do to drop decimal after the comma please for example for tthis line
> print(P)
[1] 62.000000 1.000000 7.661290 5.200000 17.100000 2.318801
how canI do to keep only 62 1 7.66 5.2 17.1 2.32
thanks
__________________________________________________
ble contre les messages non sollicités
[[alternative HTML version deleted]]
2007 Sep 17
3
Call C code from R
Hello, All!
I'm new for R-devel list. And I'd like to ask some questions,
maybe they will be stuped for the most part of members of the
list.
I need to call function which is written in C++ from R.
My questions are:
1. How should I include libraries (for example, iomanip,
sstream, iostream)?
2. Can I use namespace?
Thanks All :)
Olga