Displaying 18 results from an estimated 18 matches for "removeclass".
2006 Feb 27
0
method dispatch and in-place modification? - unclass, RemoveClass, getDataPart, method dispatch
...the class to value, and return the modified object. This is
> NOT a primitive assignment operator , because there is no code in R
> that changes type in place. See the definition of "class<-" in
> the methods package for the use of this code. */
I came upon "RemoveClass()" in R/src/main/object.c which says it is
__unused__ but seems to do what I would like it to do.
So I tried a S4 method dispatch mechanism, but it is 3 times *slower*
than unclass, and it seems to be due to the switch() statement inside
getDataPart() (in R/src/library/methods/R/RClassUtil...
2011 May 26
0
Reference Classes: strange behavior when trying to change class def in the same R session
...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
def, sometimes the changes are reflected and sometimes not.
I also tried to explicitly remove the class via 'removeClass()', and
that too works at times and then again it doesn't. If it doesn't work it
means that I have to shut down the session and start a new one, which is
quite bothersome. I thought that it maybe had something to do with
whether an explicit 'initialize' method has been defin...
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 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC...
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'?
2005 Feb 03
3
Reading Dates in a csv File
Hi all. I'm reading in a flat, comma-delimited flat file using read.csv.
It works marvelously for the most part. I am using the colClasses argument
to, basically, create numeric, factor and character classes for the columns
I'm reading in. However, a couple of the fields in the file are date
fields. I'm fully aware that POSIXct can be used as a class, however the
field must obey,
2011 Feb 12
2
Linked List in R
...t;))
The above works. But the following gives me a warning message.
setClass("Node", representation(rate="numeric", nextNode="Node"))
>
> setClass("Node", representation(rate="numeric", nextNode="ANY"))
[1] "Node"
> removeClass("Node")
[1] TRUE
>
> setClass("Node", representation(rate="numeric", nextNode="Node"))
[1] "Node"
Warning message:
undefined slot classes in definition of "Node": nextNode(class "Node")
>
In the case when nextNode is t...
2009 Oct 05
6
Date-Time-Stamp input method for user-specific formats
...ot;R Reference Card")
# read the file (TSV)
file <- read.delim(file, header=TRUE, comment.char = "", nrows=nrows,
as.is=FALSE, col.names=c("DATETIME", "FREQ"), colClasses=c("t_class2_",
"numeric") )
# remove it now that we are done with it
removeClass("t_class2_")
return(file)
}
>>>
This appears to work apart as regards processing each row of data correctly,
but the values returned look like numeric equivalents of POSIXct, as opposed
to the expected character-based (string) equivalents:
Example Data:
<<<
DATETIME F...
2006 Dec 18
0
R 2.4.1 is released
...signature of the group and all
members. Also a fix to keep the 'groupMembers' slot up to date.
o S4 group generic "Logic" (with '&', '|', but not '!') has been
created, following the green book (apart from '!').
o removeClass() now takes care to remove any subclass references
to the deleted class.
o mle() (in stats4) might not have worked as intended when the
order of parameters in 'start' differed from that in the
log-likelihood. (PR#9313)
o dotchart() now properly restore...
2006 Dec 18
0
R 2.4.1 is released
...signature of the group and all
members. Also a fix to keep the 'groupMembers' slot up to date.
o S4 group generic "Logic" (with '&', '|', but not '!') has been
created, following the green book (apart from '!').
o removeClass() now takes care to remove any subclass references
to the deleted class.
o mle() (in stats4) might not have worked as intended when the
order of parameters in 'start' differed from that in the
log-likelihood. (PR#9313)
o dotchart() now properly restore...
2011 Jul 23
0
Rendering of Javascript updates with Rails > 2.1
...ing 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 @template variable is nil.
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/
whiny_nil.rb:52:in `method_missing'': undefined method
`with_output_buffer'' for nil:NilClass (NoMethodError)
from /usr/lib/r...
2003 Jan 10
6
R-1.6.2 is released
....6.2.tgz-split.af
8706e736541bf60b717e0b56e8a405a0 R-1.6.2.tgz-split.ag
For the R Core Team,
Peter D.
Here's the relevant part of the NEWS file:
CHANGES IN R VERSION 1.6.2
BUG FIXES
o plot.stepfun() now obeys a `ylim=.' specification.
o removeClass() does a better job of removing inheritance
information.
o setIs() will not allow mismatched representations between two
classes (without an explicit coerce method).
o The code underlying polygon drawing contained a memory leak.
This showed up in persp, but did...
2003 Jan 10
6
R-1.6.2 is released
....6.2.tgz-split.af
8706e736541bf60b717e0b56e8a405a0 R-1.6.2.tgz-split.ag
For the R Core Team,
Peter D.
Here's the relevant part of the NEWS file:
CHANGES IN R VERSION 1.6.2
BUG FIXES
o plot.stepfun() now obeys a `ylim=.' specification.
o removeClass() does a better job of removing inheritance
information.
o setIs() will not allow mismatched representations between two
classes (without an explicit coerce method).
o The code underlying polygon drawing contained a memory leak.
This showed up in persp, but did...
2011 Feb 12
0
Fw: Re: Linked List in R
...ion(rate="numeric",?
> > nextNode="Node"))
> > >
> > >
> > >>
> > >> setClass("Node",
> > representation(rate="numeric",? nextNode="ANY"))
> > > [1] "Node"
> > >> removeClass("Node")
> > > [1] TRUE
> > >>
> > >> setClass("Node",
> > representation(rate="numeric",? nextNode="Node"))
> > > [1] "Node"
> > > Warning message:
> > > undefined slot classes in def...
2004 Mar 16
1
SV: Documentation on how to put classes and methods in packageswith namespace?
...> b <- DynamicGraph(1:10)
Error in getClass(superClass) : "NodeProto" is not a defined class
I also (again) read pages 13 and 16-17 (and 73) of
"Writing R Extensions" of 2004-03-15,
and the manual pages of "setClass":
where: For 'setClass' and 'removeClass', the environment in which to
store or remove the definition. Defaults to the top-level
environment of the calling function (the global environment
for ordinary computations, but the environment or namespace
of a package when loading that package)....
2009 Feb 26
7
javascript using jQuery.js and prototype.js doesnt work 2get
Hi........
M hving javascript "scripts.js" which uses jQuery.js in rails
application. bt when it is used along with prototype.js, one of the
javascripts which hs been included first in my application.rhtml
fails...
Do some1 hv any solution how to make both the scripts work 2gether...
I tried using
<script>
jQuery.noConflict();
</script>
bt of no use. problem
2011 Oct 21
20
How to transform my html form into a rails 3 form
...= "tr.show1" %>
<% @filter3 = "tr.show2" %>
<form>
<p>
<input type="checkbox" value=<%=@filter1%> onclick="$
(this).is('':checked'') && $(this.value).addClass(''hidden'') || $
(this.value).removeClass(''hidden'');">Filter1<br/>
<input type="checkbox" value=<%=@filter2%> onclick="$
(this).is('':checked'') && $(this.value).addClass(''hidden'') || $
(this.value).removeClass(''hidden'');&q...
2013 Apr 03
0
R 3.0.0 is released
...eger size. (Reported by Hiroyuki
Kawakatsu.)
o ftable(x, row.vars, col.vars) now also works when the *.vars
arguments are (integer or character vectors) of length zero.
o Calling cat() on a malformed UTF-8 string could cause the Windows
GUI to lock up. (PR#15227)
o removeClass(cc) gave "node stack overflow" for some class
definitions containing "array" or "matrix".
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk...
2013 Apr 03
0
R 3.0.0 is released
...eger size. (Reported by Hiroyuki
Kawakatsu.)
o ftable(x, row.vars, col.vars) now also works when the *.vars
arguments are (integer or character vectors) of length zero.
o Calling cat() on a malformed UTF-8 string could cause the Windows
GUI to lock up. (PR#15227)
o removeClass(cc) gave "node stack overflow" for some class
definitions containing "array" or "matrix".
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk...