Description Usage Arguments Value Examples
Several R base overwritten functions to manipulate a MIGSAres object as a data.frame way. NOTE: When subsetting a MIGSAres object, if it does not have the id, GS_Name and (at least) one experiment columns, then it wont be a MIGSAres object, i.e., migsaRes[,c("id","igsaInput1")] is no longer a MIGSAres object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## S4 method for signature 'MIGSAres'
dim(x)
## S4 method for signature 'MIGSAres'
x$name
## S4 method for signature 'MIGSAres'
colnames(x)
## S4 method for signature 'MIGSAres'
head(x, n = 6L)
## S4 method for signature 'MIGSAres'
tail(x, n = 6L)
## S4 method for signature 'MIGSAres,ANY,ANY,ANY'
x[i, j, drop = FALSE]
## S4 method for signature 'MIGSAres'
show(object)
## S4 method for signature 'MIGSAres'
as.data.frame(x)
## S4 method for signature 'MIGSAres,MIGSAres'
merge(x, y)
|
x |
MIGSAres object. |
name |
as used in |
n |
as used in |
i |
as used in |
j |
as used in |
drop |
as used in |
object |
MIGSAres object. |
y |
MIGSAres object. |
Desired object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | data(migsaRes)
## As we ran MIGSA for two experiments and 200 gene sets, it must have 200
## rows, and five columns (id, Name, GS_Name, and the experiments names).
dim(migsaRes)
## migsaRes shown as data.frame has these column names: id, Name, GS_Name,
## and the experiments names. As we ran two experiments, names igsaInput1
## and igsaInput2, we can use $ in these ways:
head(migsaRes$id)
table(migsaRes$Name)
table(migsaRes$GS_Name)
head(migsaRes$igsaInput1)
head(migsaRes$igsaInput2)
colnames(migsaRes)
head(migsaRes)
## Or see the first 10
head(migsaRes, n = 10)
tail(migsaRes)
## Or see the last 10
tail(migsaRes, n = 10)
## migsaRes shown as data.frame has these column names: id, Name, GS_Name,
## and the experiments names. As we ran two experiments, names igsaInput1
## and igsaInput2, we can use [ in these ways:
## Lets get the first 5 rows and 4 columns (the result is a MIGSAres object).
migsaRes[1:5, 1:4]
class(migsaRes[1:5, 1:4])
## Lets get the experiments results. Note that this is not any more a
## MIGSAres object.
migsaRes[, c("igsaInput1", "igsaInput2")]
class(migsaRes[, c("igsaInput1", "igsaInput2")])
migsaRes
migsaResDFrame <- as.data.frame(migsaRes)
head(migsaResDFrame)
migsaRes1 <- migsaRes[, 1:4]
migsaRes2 <- migsaRes[, c(1:3, 5)]
migsaResMerged <- merge(migsaRes1, migsaRes2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.