Displaying 20 results from an estimated 5000 matches similar to: "assigning NULLs to elements of a list"
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
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
Dear list:
working with date/times I have come across a problem that ISOdate and
ISOdatetime are too slow on large vectors of data. I was surprised just
until I looked at the implementation and the man page: "ISOdatetime and
ISOdate are convenience wrappers for strptime". In other terms, they
convert data to character representation first in order to create a
POSIXlt object that is then
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,
2010 Jul 21
1
Bug: broken exception handling in S4 methods
Hi all:
we have noticed for quite a while that certain errors cannot be handled
by R try, tryCatch etc blocks, but it was fairly difficult to understand
what were the conditions for this incorrect behaviour. Finally I stabbed
across a very understandable case, which is outlined in the (runnable)
example below.
The main message is: wrapping an S4 method call in a try block will not
help if an
2007 May 29
1
Use of Rf_duplicate
First, thanks to those of you who responded to my previous post about my
code that was taking longer and longer to process. After following your
suggestions, and I now thinking that the problem was some calls to
Rf_duplicate in my C code.
So I'm hoping I could get some clarification on what Rf_duplicate actually
does. What is the real difference between
PROTECT(y=x); and
PROTECT (y =
2008 Apr 22
1
graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC
Following my previous post on S3 method despatch, I put debug messages
in the code of Axis, Axis.default and plot.default in graphics/R/axis.R
and graphics/R/plot.R to print the class of x, at and y on plot. After
recompiling R, what I see is that x *lost* its class attribute (at least
for classes not known to 'graphics') in Axis, called directly from
plot.default and this could be the
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 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 =
2008 Jun 27
2
plot(type="l") disjoint between 100 and 101st datapoint
Dear All:
We have been experiencing networking issues so I don't know if this
got through; I can't see it in the archive. My sincere apologies if
this appears twice.
I may have found an unusual bug and am posting here to see if anyone
can reproduce it on their system. First of all, sessionInfo():
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-apple-darwin8.10.1
locale:
2005 Feb 25
3
passing command line arguments to 'R CMD BATCH myScript.R'
Hi Community,
I have a question about how to pass command line parameters to R script
running in the batch mode. The problem is: there is a banch of data
files which are to be processed by R script called from a web-server,
i.e. in the batch mode. The web server generates data files and passes
their names calling 'R CMD BATCH' one by one for every file. Now the
question is how to
2007 Jan 30
4
Speed of for loops
Hi Everyone,
I have a question about for loops. If you have something like:
f <- function(x) {
y <- rep(NA,10);
for( i in 1:10 ) {
if ( i > 3 ) {
if ( is.na(y[i-3]) == FALSE ) {
# some calculation F which depends on one or more of the previously
generated values in the series
y[i] = y[i-1]+x[i];
} else {
y[i] <- x[i];
}
}
}
y
}
e.g.
>
2007 Jan 30
4
Speed of for loops
Hi Everyone,
I have a question about for loops. If you have something like:
f <- function(x) {
y <- rep(NA,10);
for( i in 1:10 ) {
if ( i > 3 ) {
if ( is.na(y[i-3]) == FALSE ) {
# some calculation F which depends on one or more of the previously
generated values in the series
y[i] = y[i-1]+x[i];
} else {
y[i] <- x[i];
}
}
}
y
}
e.g.
>
2007 Aug 30
1
suggesting \alias* for Rd files (in particular for S4 method documentation)
Hi,
I do not know if everybody finds index pages of the html-formatted R
help useful, but I know I am at least not the only one who uses them
extensively to get the overview of functions and methods in a package
(even for my own package). Problems arise, however, if a lot of S4
methods need to be documented blowing out the index with (generally
irrelevant) entries like:
2005 Feb 25
5
[Rdev] any way to generate "bitmap" (tif, jpeg, png etc) files in R CMD BATCH
Hi Community,
here is the problem, Linux problem (reported to work on Windows). I need
to generate graphical output in any of bitmap format under the 'R CMD
BATCH'. Whereas the script generating png-s works perfectly in the R
session, such things as X11, png and jpeg are not usable in BATCH (they
cannot be switched on by --gui-X11 etc) and X11 is prompted to be
required for png. At
2005 Feb 25
5
[Rdev] any way to generate "bitmap" (tif, jpeg, png etc) files in R CMD BATCH
Hi Community,
here is the problem, Linux problem (reported to work on Windows). I need
to generate graphical output in any of bitmap format under the 'R CMD
BATCH'. Whereas the script generating png-s works perfectly in the R
session, such things as X11, png and jpeg are not usable in BATCH (they
cannot be switched on by --gui-X11 etc) and X11 is prompted to be
required for png. At
2007 Jun 12
1
bug in R environments? Was: [BioC] 'recursive default argument' error...
Dear developers,
has anyone experienced the problem described below? Is it a bug in
handling interrupts in R?
Best,
Oleg
-------- Original Message --------
Subject: Re: [BioC] 'recursive default argument' error in GOENTREZID2GO
From: Diego Diez <diez at kuicr.kyoto-u.ac.jp>
...steps that use to reach me to that point. It happens with any
environment, or at least annotation
2007 Jul 23
2
R2.6 bug in arithmetics of S4 classes inherited from 'array', or intended behavior?
Hi,
I have an S4 class directly derived from 'array' as shown in the code
below (EBImage package of Bioconductor 2.1, devel), it simply contains
array adding a couple of slots:
setClass ("Image",
representation (colormode="integer", filename="character",
compression="character", resolution="numeric", features="list"
),
2005 Mar 16
1
returning NULL from .Call call
Dear R developers,
I've just encountered one "feature" of R-C extensions. If it is known, I
would be thankful for any hints why it works this way (I found the way
around, which is also mentioned here, but maybe it is not the best one).
If it is however unknown, it might be considered for a "wish list".
Consider a simple "aka" C function (the original
2008 Sep 17
3
Dates in C api
r-devel,
I've been trying to write a C plugin for R, and I'm struggling to
understand how dates are represented.
I can create a date in R:
> mydate<-as.Date(1, origin="1900-01-01") mydate
[1] "1900-01-02"
When I pass my date to a plugin, though, it's type is that of a real.
There doesn't seem to be a date type in Rinternals.h, is there a way to
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