Displaying 20 results from an estimated 700 matches similar to: "method dispatch and in-place modification? - unclass, RemoveClass, getDataPart, method dispatch"
2010 Jul 12
1
S4 class extends "data.frame", getDataPart sees "list"
R-Devel:
When I get the data part of an S4 class that contains="data.frame", it gives
me a list, even when the "data.frame" is the S4 version:
> d<-data.frame(x=1:3)
> isS4(d)
[1] FALSE # of course
> dS4<-new("data.frame",d)
> isS4(dS4)
[1] TRUE # ok
> class(dS4)
[1] "data.frame"
2016 Jan 05
2
For integer vectors, `as(x, "numeric")` has no effect.
On Dec 19, 2015, at 3:32 AM, Martin Maechler <maechler at
stat.math.ethz.ch> wrote:
>>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>> on Sat, 12 Dec 2015 10:32:51 +0100 writes:
>
>>>>>> John Chambers <jmc at r-project.org>
>>>>>> on Fri, 11 Dec 2015 10:11:05 -0800 writes:
>
2011 May 26
0
Reference Classes: strange behavior when trying to change class def in the same R session
Dear list,
I'm getting some strange behavior with Reference Classes every once in a
while and I can't really put my finger on the cause. It'd be great if
someone using Reference Classes could check if he/she experiences
similar problems:
The thing is that when I alter the definition of a Reference Class in a
running R session and source the respective file containing the class
2009 Oct 26
1
How to browse all the functions in a package?
'?removeClass' shows that 'removeClass' is from package
'package:methods'. Is there a command which can show me all the
functions and the classed defined in a package such as
'package:methods'?
2009 Aug 29
3
what is the best way to delete so many queue files?
Hello, all.
I found that so many unnessary queue files are saved at /var/spool/clientmqueue/ directory.
I tested two way to delete these files.
1.
# rm -rf /var/spool/clientmqueue/*
2.
# cd /var/spool/clientmqueue/ ; find . | xargs rm -fv
But this makes a few load of the system and took too much time to delete.
What is the best way to delete fast without too much load?
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
Hello,
This problem originally surfaced as an interaction between 'brms',
'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
an object of an S4 class owned by the 'rstan' package tried to load its
namespace. rstan:::.onLoad needs to load Rcpp modules, which uses load
actions and reference classes. Since methods:::.findInheritedMethods
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
>>>>> Ivan Krylov via R-devel
>>>>> on Fri, 27 Sep 2024 13:32:27 +0300 writes:
> Hello,
> This problem originally surfaced as an interaction between 'brms',
> 'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
> an object of an S4 class owned by the 'rstan' package tried to
2013 Mar 13
1
removing union class
Hi,
I get the following error when trying to remove a union class:
> setClassUnion('a', c('matrix', 'numeric'))
> removeClass('a')
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
2015 Dec 11
0
For integer vectors, `as(x, "numeric")` has no effect.
Somehow, the most obvious fixes are always back-incompatible these days.
The example intrigued me, so I looked into it a bit (should have been doing something else, but ....)
You're right that this is the proverbial thin-edge-of-the-wedge.
The problem is in setDataPart(), which will be called whenever a class extends one of the vector types.
It does
as(value, dataClass)
The key point is
2008 Dec 16
1
Problem with alignDailySwries in R-metrics
Hi Folks! I seem to be having a problem with alignDailySeries in Rmetrics:
DTB6<-fredSeries("DTB6",frequency = "daily",from = "1980-01-01")
trying URL '
http://research.stlouisfed.org/fred2/series/DTB6/downloaddata/DTB6.txt'
Content type 'text/plain; charset=UTF-8' length 248392 bytes (242 Kb)
opened URL
downloaded 242 Kb
Read 13060 items
2008 Aug 07
1
'"ts" treated as a registered S3 class, but keep its "structure" behaviour' ?
Dear all,
In R-devel I have noticed the new approach for the "ts" class in the
package "methods".
the "structure" behaviour of "ts" is not always kept when one uses
"ts" objects and objects of classes which extend the virtual class
"structure".
As a short example:
## this works fine
setClass("foo", representation(header =
2015 Dec 19
0
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Sat, 12 Dec 2015 10:32:51 +0100 writes:
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Fri, 11 Dec 2015 10:11:05 -0800 writes:
>> Somehow, the most obvious fixes are always back-incompatible these days.
>> The example intrigued
2015 Dec 11
3
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 8 Dec 2015 15:25:21 +0100 writes:
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Mon, 7 Dec 2015 16:05:59 -0800 writes:
>> We do need an explicit method here, I think.
>> The issue is that as() uses methods for the generic
2011 Feb 12
2
Linked List in R
Hi,
I am trying to create a linked list in R by defining a class Node which has a instance variable Node.
setClass("Node", representation(rate="numeric", nextNode="ANY"))
The above works. But the following gives me a warning message.
setClass("Node", representation(rate="numeric", nextNode="Node"))
>
>
2015 Dec 26
0
[Bioc-devel] For integer vectors, `as(x, "numeric")` has no effect.
Or maybe the "right" concept is that "numeric" is a virtual class
with 3 subclasses: "complex", "double", and "integer". Anyway it's
probably too late for implementing the "right" concept so it doesn't
really matter.
Thanks Martin for offering to fix the as(1L, "numeric") bug. Very
much appreciated. I guess that means
2006 Dec 18
0
R 2.4.1 is released
I've rolled up R-2.4.1.tar.gz a short while ago. This is a maintenance
release and fixes a number of mostly minor bugs. See the full list
of changes below.
You can get it (in a short while) from
http://cran.r-project.org/src/base/R-2/R-2.4.1.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you. Binaries
for various platforms will appear in due course.
For the R Core
2006 Dec 18
0
R 2.4.1 is released
I've rolled up R-2.4.1.tar.gz a short while ago. This is a maintenance
release and fixes a number of mostly minor bugs. See the full list
of changes below.
You can get it (in a short while) from
http://cran.r-project.org/src/base/R-2/R-2.4.1.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you. Binaries
for various platforms will appear in due course.
For the R Core
2015 Dec 12
2
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Fri, 11 Dec 2015 10:11:05 -0800 writes:
> Somehow, the most obvious fixes are always back-incompatible these days.
> The example intrigued me, so I looked into it a bit (should have been doing something else, but ....)
> You're right that this is the proverbial
2016 Jan 05
0
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> Josh O'Brien <joshmobrien at gmail.com>
>>>>> on Mon, 4 Jan 2016 16:16:51 -0800 writes:
> On Dec 19, 2015, at 3:32 AM, Martin Maechler <maechler at
stat.math.ethz.ch> wrote:
>>>>>>> Martin Maechler <maechler at stat.math.ethz.ch> on
>>>>>>> Sat, 12 Dec 2015 10:32:51 +0100
2011 Jul 23
0
Rendering of Javascript updates with Rails > 2.1
Hey,
i am currently upgrading a Rails 2.1 app to 2.3 to benefit from Rails
engines.
The app requires rendering javascript updates to strings, which does
not work
with 2.3 anymore:
data =
ActionView::Base.new(Rails::Configuration.new.view_path).render(:update)
do |page|
page["div[id=''foo'']"].removeClass("bar")
end
whihc results in an error because the