Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
stats[importdata] - Read Statistical Data from a File
Calling Sequence
stats[importdata](filename, n)
importdata(filename, n)
Parameters
filename
-
name of the file to be read
n
(optional, default=1) number of streams into which to split the file data
Description
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The function importdata of the stats package reads statistical data from a file.
The data in the file are just a sequence of numbers, separated by spaces or the end of line. They will be processed by a sscanf(..., `%f`).
The character # introduces a comment that ends at the end of that line.
Missing data are represented in the data file by the * character. It will be converted to the keyword missing.
If the number of streams, which is indicated by the parameter n, is one, the data in the file given by filename are returned as an expression sequence. If the number of streams is greater than one then the data in the file are returned as an expression sequence of n lists. The first item in the file goes into the first list, the second item goes into the second list, and so on, until there is an item in each list. The next item in the file then goes at the end of the first list, and so on until the whole file is imported.
More sophisticated data files can be read using readline and sscanf. The function {readdata} is very similar to stats[importdata].
The command with(stats,importdata) allows the use of the abbreviated form of this command.
Examples
where the datafile could contain the following ------------------------
| # this is a comment
| 2 3
| 4 5
| 6 * # one missing data
| # another comment
------------------------
At the end T will be
See Also
readdata, readline, sscanf, Statistics, stats(deprecated)[data], transform(deprecated)[split]
Download Help Document