Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/rqubic_to_c_funcs.R
This function is implemented to automatically validate and choose feature (sample) names from the user input. This function is exported for the purpose of easing other Bioconductor developers performing the similar job, and is not tended to be called by end-user directly.
1 | eSetDimName(eset, input, type = c("feature", "sample"))
|
eset |
An object of |
input |
The user input, see details below |
type |
Either ‘feature’ or ‘sample’, indicating which dimension should be determined |
The input can be one of the following three possibilities:
Missing. Depending on the type, the results of calling
featureNames
(“feature”) or
sampleNames
(“sample”) on the eset
object
will be returned.
A character string of length 1. Depending on the type, it is
first to be machted to the column names of either
fData
or pData
results of the
eset
object. If found, the values in that column are returned
(coerced to characters if necessary). If not found, the function
stops by raising an error.
A character vector of the length equal to one of the two dimensions of the eset. In this scenario, the function only validates the equality of the length, coerces the input into characters, and return them.
If none of the scenarios above was met, the function stops by raising an error.
A vector of characters, the length of which determined by the dimension of the input object.
A special case arises if one of the dimensions of the eset
object is 1: In this case, the input value is interpreted as the
new name and returned. No column name match will take place in this case.
Jitao David Zhang <jitao_david.zhang@roche.com>
sampleNames
, featureNames
,
fData
, pData
writeQubicInputFile
calls the function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(sample.ExpressionSet, package="Biobase")
sub.eset <- sample.ExpressionSet[1:3, 1:3]
## usage one:
eSetDimName(sub.eset, type="feature")
eSetDimName(sub.eset, type="sample")
## usage two
## "sex" is one column in the pData(sub.eset)
eSetDimName(sub.eset, input="sex", type="sample")
## Not run: eSetDimName(sub.eset, input="foo", type="sample")
## usage three
eSetDimName(sub.eset, input=paste("Sample", 1:3), type="sample")
## Not run: eSetDimName(sub.eset, input=paste("Sample", 1:4),
type="sample")
## End(Not run)
## special case: dim equals to one
eSetDimName(sub.eset[,1], input="foo", type="sample")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.