Hi,
I would like to know if there is a compact way to remove attributes
from an object. I know attributes(obj) <- NULL works, but I wonder if
there is something similar to unclass or unname. RSiteSearch didn't
reveal anything.
Thanks,
Tamas
__
R-dev
On Tue, 30 Jan 2007, Tamas K Papp wrote:
> Hi,
>
> I would like to know if there is a compact way to remove attributes
> from an object. I know attributes(obj) <- NULL works, but I wonder if
> there is something similar to unclass or unname. RSiteSearch didn't
> reveal anything.
as.vector is us
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 dep
Dear R Community,
Due to maintenance work CRAN will not be available at 30th January around 10
o'clock in the morning CET.
Best regards,
Stefan Theussl
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Full_Name: Jose Gaetan Pierre
Version: 2.4.1
OS: Fedora Core 6
Submission from: (NULL) (196.27.87.14)
I have been using R from within rpy for a while because I am more familiar with
Python syntax. I first noticed this bug with R-2.4.0.
Screendump: --
>>> from rpy impor
This is not the address for bug reports on 'rpy'.
Your example works in R.
On Tue, 30 Jan 2007, [EMAIL PROTECTED] wrote:
> Full_Name: Jose Gaetan Pierre
> Version: 2.4.1
> OS: Fedora Core 6
> Submission from: (NULL) (196.27.87.14)
>
>
> I have been using R from within rpy for a while because I am
--nextPart1830390.4s8xi7h1go
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Tuesday 30 January 2007 06:29, [EMAIL PROTECTED] wrote:
> >>> Error during wrapup: C stack usage is too close to the limit
Probably the stack-ch
Tom,
*apply's generally speed up calculations dramatically. However, if and
only if you do a repetitive operation on a vector, list matrix which
does NOT require accessing other elements of that variable than the one
currently in the *apply index. This means in your case any of *apply
will not
On Tue, Jan 30, 2007 at 12:15:29PM +, Oleg Sklyar wrote:
> magnitude using c-functions for "complex" vector indexing operations. If
> you need instructions, I can send you a very nice "Step-by-step guide
> for using C/C++ in R" which goes beyond "Writing R Extensions" document.
Hi Oleg,
Ca
I know this should not go to [Rd], but the original post was there and
the replies as well.
Thank you all who expressed interest in the "Step-by-step guide for
using C/C++ in R"! Answering some of you, yes it is by me and was
written to assist other group members to start adding c/c++ code to
On Tuesday 30 January 2007 15:46, Tamas K Papp wrote:
> On Tue, Jan 30, 2007 at 12:15:29PM +, Oleg Sklyar wrote:
> > magnitude using c-functions for "complex" vector indexing operations. If
> > you need instructions, I can send you a very nice "Step-by-step guide
> > for using C/C++ in R" which
I'm trying to load Affy Annotation data from an Access database into R using
RODBC. This has worked fine for quite some time. The bug seems to be
correlated to RODBC versions 1.1-7 and later.
Works fine: R 2.2.0 with RODBC 1.1-4; R 2.3.0 or R 2.4.1 with RODBC 1.1-6
Fails: R 2.3.1 with RDOBC
Hello,
apologies if I missed something well known. I'm just revising an own
package and wonder if it is still common to use "generating
functions" which have the same name as the corresponding S4 class as
suggested by Chambers, 2001. "Classes and Methods in the S Language".
-- or should one conse
Oleg Sklyar <[EMAIL PROTECTED]> writes:
> As Tony correctly writes one can generally use nargs() to get the number
> of arguments, and this works for "["(x,i,j,...,drop) method as well. The
> problem I had with the EBImage where I could not distinguish between
> x[index] and x[index,,] is that s
Tom McCallum wrote:
> 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 ) {
>
Actually, why not use a closure to store previous value(s)?
In the simple case, which depends on x_i and y_{i-1}
gen.iter = function(x) {
y = NA
function(i) {
y <<- if(is.na(y)) x[i] else y+x[i]
}
}
y = sapply(1:10,gen.iter(x))
Obviously you can modify the function for the bo
Actually, better yet:
gen.iter = function(y=NA) {
function(x) {
y <<- if(is.na(y)) x else x+y
}
}
sapply(x,gen.iter())
On 1/30/07, Byron Ellis <[EMAIL PROTECTED]> wrote:
> Actually, why not use a closure to store previous value(s)?
>
> In the simple case, which depends on x_i and y_{i-1}
It is surely an elegant way of doing things (although far from being
easy to parse visually) but is it really faster than a loop?
After all, the indexing problem is the same and sapply simply does the
same job as for in this case, plus "<<-" will _search_ through the
environment on every single
IIRC a for loop has more per-iteration overhead that lapply, but the
real answer is "it depends on what you're doing exactly." I've seen it
be a faster, slower and equal approach.
On 1/30/07, Oleg Sklyar <[EMAIL PROTECTED]> wrote:
> It is surely an elegant way of doing things (although far from be
Hi,
Byron Ellis wrote:
> IIRC a for loop has more per-iteration overhead that lapply, but the
> real answer is "it depends on what you're doing exactly." I've seen it
> be a faster, slower and equal approach.
gen.iter = function(y=NA) {
function(x) {
y <<- if(is.na(y)) x else x+y
}
}
sapply
Greetings all,
PGF is a package for LaTeX which works with both ps
and pdf output without any nasty hacks like pictex.
Is there any technical reason why there could not be a
PGF graphic device for R? If not, I'm going to try to
throw one together. Any tips for getting started?
Cheers,
Caleb
___
Has anyone ever suggested making segments() and arrows() generic (as
indeed they are in another not dissimilar implementation)?
The practical issue with these functions is the need to specify origin
and destination using four separate arguments. It would be much more
convenient to use only two.
22 matches
Mail list logo