Displaying 20 results from an estimated 101 matches for "class2".
Did you mean:
class
2006 Jan 12
2
Finding by association
I have two objects that are associated in the following way:
class Class1 < ApplicationController
has_and_belongs_to_many :class2s
has_and_belongs_to_many :otherClasses
end
class Class2 < ApplicationController
has_and_belongs_to_many :class1s
has_and_bleongs_to_many :otherClasses
end
Now, when I run the following query,
@objects = Class1.find(:all, :conditions => ["class2s.id = ?",
para...
2020 Jan 21
2
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...Hadley calls this long class vector the 'implicit class' -- which
> is a good term but somewhat conflicting with R's (i.e. R-core's)
> "definition" used in the ?class help page (for ca. 11 years).
>
> R's internal C code has a nice function class R_data_class2()
> which computes this 'S3-dispatch-class' character (vector) for
> any R object, and R_data_class2() is indeed called from (the
> underlying C function of) R's UseMethod().
>
> Using the above fact of an error message,
> I wrote a nice (quite well tested) function...
2019 Nov 21
0
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...R's class().
Hadley calls this long class vector the 'implicit class' -- which
is a good term but somewhat conflicting with R's (i.e. R-core's)
"definition" used in the ?class help page (for ca. 11 years).
R's internal C code has a nice function class R_data_class2()
which computes this 'S3-dispatch-class' character (vector) for
any R object, and R_data_class2() is indeed called from (the
underlying C function of) R's UseMethod().
Using the above fact of an error message,
I wrote a nice (quite well tested) function my.class2() which
returns th...
2020 Jan 28
0
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...tor the 'implicit class' -- which
>> is a good term but somewhat conflicting with R's (i.e. R-core's)
>> "definition" used in the ?class help page (for ca. 11 years).
>>
>> R's internal C code has a nice function class R_data_class2()
>> which computes this 'S3-dispatch-class' character (vector) for
>> any R object, and R_data_class2() is indeed called from (the
>> underlying C function of) R's UseMethod().
>>
>> Using the above fact of an error message,
>&...
2006 Apr 04
1
Added method to ActiveRecord Class
Hi,
Let''s say:
class Class2 << ActiveRecord
belongs_to: class1
end
class Class1 << ActiveRecord
has_many :class2s
def get_max_class2
?how to get the max of class2 list ?
end
end
I would like to know how I have to write the get_max_class2 method
in order to have the max value of the class2...
2019 Nov 15
5
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
>>>>> Pages, Herve
>>>>> on Thu, 14 Nov 2019 19:13:47 +0000 writes:
> On 11/14/19 05:47, Hadley Wickham wrote:
>> On Sun, Nov 10, 2019 at 2:37 AM Martin Maechler
>> <maechler at stat.math.ethz.ch> wrote:
>>>
>>>>>>>> Gabriel Becker
>>>>>>>> on Sat, 2 Nov 2019
2006 Jan 22
0
Rank Product
...egulated gene
- How can i interpret the results :
$pfp, $RPs, $RPrank,
Orirank,
$Orirank$"class1 > class 2"
$Orirank$"class1 < class 2"
$AveFC
Table1: Genes called significant under class1 < class2
Table2: Genes called significant under class1 > class2
Thanks for your help.
Example:
Formula:
RP.out<-RP(data, pt.cl, g.names, num.perm = 100, logged = TRUE,
na.rm = FALSE, plot = FALSE, rand =123)...
2004 Aug 14
2
Private methods
Hi,
I'm trying to understand R's object oriented abilities.
I have read (in a very recent email to r-help) that R's methods package
does not support private methods. However, I also looked at the source
for the function "is":
> is
function (object, class2)
{
cl <- .class1(object)
if (missing(class2))
return(extends(cl))
if (.identC(cl, class2) || .identC(class2, "ANY"))
return(TRUE)
...
The first line of the function, the assignment to cl, seems to call a
function called ".class1". I was unab...
2001 Feb 26
1
"untable" function
Dear R-users!
I am using R1.2.0 under Windows NT4.0, and have data of the following form:
> #simple example of data structure:
> x <- data.frame(group=LETTERS[1:3], class1=1:3, class2=4:6)
> x
group class1 class2
1 A 1 4
2 B 2 5
3 C 3 6
I would like to convert this to a data.frame y of the following form:
> y
group class counts
1 A class1 1
2 A class2 4
3 B class1 2
4 B class2 5
5 C...
2004 Jun 18
0
Problem with setValidity() or resetClass() or ... ?
...###
setClass("Class1", representation("name" = "character"))
if(!isGeneric("name")) setGeneric("name", function(object)
standardGeneric("name"))
setMethod("name", "Class1", function(object) object@name)
setClass("Class2", representation("Class1"))
setClass("Class3", representation("Class2"))
setClass("Class4", representation("Class3"))
setClass("Class5", representation("Class4"))
getClass("Class3") # as I expected
Class3Def <...
2011 Oct 10
4
Type of Graph to use
Hi,
Please advice on what type of graph can be used to display the following
data set.
I have the following:
Name Class
a Class 1
a Class4
b Class2
b Class1
d Class3
d Class5
e Class4
e Class2
So each entry in name can belong to more than one class. I want to represent
the data as to see where overlaps occur that is which names are in the same
Class Name and also which names are uniq...
2017 Nov 29
2
binary form of is() contradicts its unary form
...the binary form of extends() agrees:
> extends("data.frame", "list")
[1] TRUE
> extends("data.frame", "oldClass")
[1] TRUE
> extends("data.frame", "vector")
[1] TRUE
Who is right?
Shouldn't 'is(object, class2)' be equivalent
to 'class2 %in% is(object)'? Furthermore, is there
any reason why 'is(object, class2)' is not implemented
as 'class2 %in% is(object)'?
Thanks,
H.
--
Herv? Pag?s
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer...
2007 Feb 02
2
Quick Element.getElementsBySelector() question
Hi,
Does this code should works ?
elm.getElementsBySelector(''UL.class1 > LI.class2'');
I have an error caused by "UL.class1 > LI.class2"
- Does CSS Selector ">" works ?
- What is the exact ? may be "UL.class1>LI.class2"
Regards,
--
Jean-Philippe Encausse - R&D Jalios SA
Jp [at] encausse.net - http://www.encausse.com - http://w...
2017 Nov 29
2
binary form of is() contradicts its unary form
...quot;, "list")
> [1] TRUE
> > extends("data.frame", "oldClass")
> [1] TRUE
> > extends("data.frame", "vector")
> [1] TRUE
>
> Who is right?
>
> Shouldn't 'is(object, class2)' be equivalent
> to 'class2 %in% is(object)'? Furthermore, is there
> any reason why 'is(object, class2)' is not implemented
> as 'class2 %in% is(object)'?
>
> Thanks,
> H.
>
> --
> Herv? Pag?s
>
> Program...
2019 Sep 08
6
Error: package or namespace load failed for ‘utils
Hi,
When starting an embedded R I encounter the following issue under certain
conditions:
```
Error: package or namespace load failed for ?utils? in if (.identC(class1,
class2) || .identC(class2, "ANY")) TRUE else {:
missing value where TRUE/FALSE needed
```
(more such errors for grDevices, graphics, and stats)
And in the end:
```
Warning messages:
1: package ?utils? in options("defaultPackages") was not found
2: package ?grDevices? in options(&quo...
2011 Sep 23
1
Newbie question: Converting Table
...w to R, and I have searched helpfiles and this forum on my 2
questions. Hope you guys can help me out! :-)
Many thanks in advance!
Cheers,
Lars
Q1: I imported a csv file with columnames subject and class. There are about
1000 different classes...
It looks like this:
subject1, class1
subject1, class2
subject2, class1
subject2, class3
...
subject999, class1
subject999, class2
Now I want to transform this in R into a table (with columnnames
subject,class1,class2,...) like:
subject1, yes, yes, no, ...
subject2, yes, no, yes, ...
...
Q2: I want to count the matching class patterns in the previous...
2017 Nov 29
2
binary form of is() contradicts its unary form
...data.frame is not an S4 class but is(data.frame())
finds its super-classes anyway and without the need to wrap
it in asS4(). And "list' is one of the super-classes. Then
is(data.frame(), "list") contradicts this.
I'm not asking for a workaround. I already have one with
'class2 %in% is(object)' as reported in my original post.
'is(asS4(object), class2)' is maybe another one but, unlike
the former, it's not obvious that it will behave consistently
with unary is(). There could be some other surprise on the
way.
You're missing the point of my original po...
2006 Apr 20
1
S4 objects with list of objects as slots: how to subset?
...ize my question: please consider the following example
that you can run I think:
#------------------
setClass("my.class1",
representation(
my.list = "list"),
prototype=prototype(
my.list =list()))
#------------------
setClass("my.class2",
representation(
my.slot = "numeric"),
prototype=prototype(
my.slot =as.numeric(1:10)))
#------------------
a.class <- new("my.class1")
a.class at my.list[[1]] <- new("my.class2")
a.class at my.list[[2]] <- new(...
2010 Feb 11
2
SAS and RODBC
...13 14 14 12 12 15 13 12 ...
$ Height: num 69 56.5 65.3 62.8 63.5 57.3 59.8 62.5 62.5 59 ...
$ Weight: num 112 84 98 102 102 ...
However, I am not able to save a dataframe back to a SAS dataset. When I try to use sqlSave I get the following error.
> sqlSave(ch, df, tablename='sasodbc.class2')
Error in sqlSave(ch, df, tablename = "sasodbc.class2") : 00000 0
[RODBC] ERROR: Could not SQLExecDirect 'CREATE TABLE sasodbc.class2 ("rownames" varchar(255), "Name" varchar(255), "Sex" varchar(255), "Age" num, "Height" num, &q...
2004 Oct 14
2
setClassUnion
...ng example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0), methods
Imports: methods
LazyLoad: yes
The NAMESPACE file has entries:
importClassesFrom("methods", "NULL", "numeric")
exportClass("OptionalNumeric", "class1", "class2")
The example R code is:
.onLoad <- function(lib, pkg){
require("methods", character = TRUE, quietly = TRUE)
}
setClassUnion("OptionalNumeric", c("numeric", "NULL"))
setClass("class1",
representation(test1 = "OptionalNumeric&qu...