ExpressionSet: any shortcut for number-of-samples and number-of-features?
1
0
Entering edit mode
aush ▴ 40
@aush-9128
Last seen 2.9 years ago
United States

I often need to retrieve number of samples or features of a given ExpressionSet. I use constructs like dim(es)[[2]], and just to make my code easier to read I wrapped it into functions, so that I can call it like nSamples(es). Hence two questions:
1) Maybe there's already a function for that?
2) if not, is it a good practice to use dim() for that purpose, or I should call something else?

expressionSet • 500 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 days ago
United States

nrow() and ncol() return features and samples directly, although these are not as semantically rich as nSamples()

> nrow(ExpressionSet())
Features
       0
> ncol(ExpressionSet())
Samples
      0
ADD COMMENT

Login before adding your answer.

Traffic: 723 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6