## Chunk 1
![]() |
|||
library("RBioinf")
|
|||
## Chunk 2
![]() |
|||
setClass("Passenger", representation(name="character",
|
|||
![]() |
![]() |
## Chunk 5
![]() |
|||
setClass("Rectangle",
|
|||
## Chunk 6
![]() |
|||
setClass("Rectangle", representation(h="numeric", w="numeric"))
|
|||
## Chunk 7
![]() |
|||
x = 1:10
|
|||
## Chunk 8
![]() |
|||
x=list(name="Josephine Biologist",
|
|||
## Chunk 9
![]() |
|||
x = 1:10
|
|||
## Chunk 10
![]() |
|||
x = matrix(1:10, nc=2)
|
|||
![]() |
![]() |
## Chunk 13
![]() |
|||
ex1VL = c("Sex, M=MALE, F=FEMALE", "Age in years")
|
|||
## Chunk 14
![]() |
|||
set.seed(123)
|
|||
## Chunk 15
![]() |
|||
new.EXPRS3 = function(Class, eData, pData, cDesc) {
|
|||
## Chunk 16
![]() |
|||
myES3 = new.EXPRS3("EXPRS3", simExprs, simPD, ex1VL)
|
|||
## Chunk 17
![]() |
|||
fun = function(x, ...) UseMethod("fun")
|
|||
## Chunk 18
![]() |
|||
fun.Foo = function(x) {
|
|||
## Chunk 19
![]() |
|||
x = 1
|
|||
![]() |
## Chunk 21
![]() |
|||
methods("mean")
|
|||
## Chunk 22
![]() |
|||
methods(class="glm")
|
|||
## Chunk 23
![]() |
|||
fun.Foo = function(x, ...) print(ls(all=TRUE))
|
|||
## Chunk 24
![]() |
|||
fun.Foo = function(x, ...) {
|
|||
## Chunk 25
![]() |
|||
methods("$<-")
|
|||
![]() |
![]() |
## Chunk 28
![]() |
|||
setClass("A", representation(s1="numeric"),
|
|||
## Chunk 29
![]() |
|||
setClass("B", contains="A", representation(s2="character"),
|
|||
## Chunk 30
![]() |
|||
setClass("Ohno", representation(y="numeric"))
|
|||
## Chunk 31
![]() |
|||
getSlots("A")
|
|||
## Chunk 32
![]() |
|||
extends("B")
|
|||
## Chunk 33
![]() |
|||
## getClass("matrix")
|
|||
## Chunk 34
![]() |
|||
extends("matrix")
|
|||
## Chunk 35
![]() |
|||
myb = new("B")
|
|||
## Chunk 36
![]() |
|||
mya = new("A", s1 = 20)
|
|||
## Chunk 37
![]() |
|||
## setAs(from="graphAM", to="matrix",
|
|||
## Chunk 38
![]() |
|||
setClass("Ex1", representation(s1="numeric"),
|
|||
![]() |
![]() |
## Chunk 41
![]() |
|||
bb = getClass("B")
|
|||
## Chunk 42
![]() |
|||
setClass("W", representation(c1 = "character"))
|
|||
## Chunk 43
![]() |
|||
setClass("XX", representation(a1 = "numeric",
|
|||
## Chunk 44
![]() |
|||
setClass("Capital",
|
|||
## Chunk 45
![]() |
|||
setClass("seq", contains="numeric",
|
|||
## Chunk 46
![]() |
|||
setMethod("initialize", "seq", function(.Object) {
|
|||
## Chunk 47
![]() |
|||
tryCatch(setMethod("[", signature("integer"),
|
|||
## Chunk 48
![]() |
|||
setClass("DBFunc", "function")
|
|||
## Chunk 49
![]() |
|||
mytestFun = function(arg) print(arg)
|
|||
## Chunk 50
![]() |
|||
mya = new("A", s1 = 20)
|
|||
## Chunk 51
![]() |
|||
attr(mya, "s1") <- "L"
|
|||
## Chunk 52
![]() |
|||
setClassUnion("lorN", c("list", "NULL"))
|
|||
## Chunk 53
![]() |
|||
setClass("Foo", representation(a="ANY"))
|
|||
## Chunk 54
![]() |
|||
setOldClass("mymatrix")
|
|||
## Chunk 55
![]() |
|||
setClass("myS4mat", representation(m = "mymatrix"))
|
|||
## Chunk 56
![]() |
|||
head(subClassNames(getClass("oldClass")))
|
|||
## Chunk 57
![]() |
|||
setGeneric("foo",
|
|||
## Chunk 58
![]() |
|||
setGeneric("genSig", signature=c("x"),
|
|||
## Chunk 59
![]() |
|||
setGeneric("foo", function(x,y,...) {
|
|||
## Chunk 60
![]() |
|||
library("Biobase")
|
|||
## Chunk 61
![]() |
|||
allGbb = getGenerics("package:Biobase")
|
|||
## Chunk 62
![]() |
|||
setGeneric("bar", function(x, y, ...) standardGeneric("bar"))
|
|||
## Chunk 63
![]() |
|||
setGeneric("a<-", function(x, value)
|
|||
## Chunk 64
![]() |
|||
## setMethod("$", "eSet", function(x, name) {
|
|||
## Chunk 65
![]() |
|||
cnew = function(x, ...) {
|
|||
## Chunk 66
![]() |
|||
setGeneric("c2", function(x, y) standardGeneric("c2"))
|
|||
## Chunk 67
![]() |
|||
setMethod("c2", signature("numeric", "numeric"), function(x, y) x + y)
|
|||
## Chunk 68
![]() |
|||
x = 1
|
|||
![]() |
## Chunk 70
![]() |
|||
setOldClass(c("C1", "C2"))
|
|||
## Chunk 71
![]() |
|||
x = 1
|
|||
## Chunk 72
![]() |
|||
## setMethod("foo", "myclass", myS3Method)
|
|||
## Chunk 73
![]() |
|||
testG = function(x, ...) UseMethod("testG")
|
|||
## Chunk 74
![]() |
|||
library("graph")
|
|||
## Chunk 75
![]() |
|||
graphClasses = getClasses("package:graph")
|
|||
## Chunk 76
![]() |
|||
graphClassgraph = classList2Graph(graphClasses)
|
|||
## Chunk 77
![]() |
|||
ccomp = connectedComp(graphClassgraph)
|
|||
## Chunk 78
![]() |
|||
unlist(ccomp[complens==1], use.names=FALSE)
|
|||
## Chunk 79
![]() |
|||
subGnodes = ccomp[[which.max(complens)]]
|
|||
![]() |