Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Statistics[Count] - compute number/total weight of observations
Statistics[CountMissing] - compute number/total weight of observations
Calling Sequence
Count(X, options)
CountMissing(X, options)
Parameters
X
-
data
options
(optional) equation(s) of the form option=value where option is one of ignore, or weights; specify options for the Count and CountMissing functions
Description
The Count function computes the size of the data sample X. If weights are provided, the Count function computes the cumulative weight of all observations in X. Missing values can be ignored (see option ignore).
The CountMissing function counts missing values in the data sample X. If weights are provided, the CountMissing function computes the cumulative weight of all missing elements in X.
The first parameter X is a data sample which can be given as an Array, Vector, or a list. Alternatively, both Count and CountMissing understand Matrix data sets: if X is a Matrix, a 2-dimensional Array, or a list of lists, then the returned result is a row Vector containing the results of each column. If the weights option is supplied with a Matrix data set, then the weights are interpreted as applying per row of the data.
All data provided must have type/realcons. If the weights option is provided or if X is a Matrix data set, then the result(s) are provided as floating-point, even if the problem is specified with exact values.
Options
The options argument can contain one or more of the options shown be low.
ignore=truefalse -- This option controls how missing data is handled by the Count command. By default (ignore = false) all missing values are accounted for in the final result. If ignore is set to false all missing values will be ignored.
weights=Vector -- Data weights. The number of elements in the weights Vector must be equal to the number of elements in the original data sample. By default all elements in X are assigned weight .
Compatibility
The X parameter was updated in Maple 16.
Examples
Consider the following Matrix data set.
We compute the number of non-missing entries of each column, and the weighted number of missing entries.
See Also
Statistics, Statistics[DataManipulation]
Download Help Document