153
edits
(to install) |
m (→Example: typo correction) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
The {{Forge|dataframe}} package is part of the [[Octave Forge]] project. It is a data manipulation toolbox similar to R data.frame and is maintained by Pascal Dupuis. | |||
== Introduction == | |||
This package permits to handle complex (both in the sense of complex numbers and high complexity) data as if they were ordinary arrays, except that each column MAY possess a different type. It also provides a fairly complete interface to CSV files, permitting to cope with a number of oddities, like e.g., CSV files starting with a header spread over a few lines. The resulting array tries as far as it can to mimic an array in such a way that binary operators and usual functions will work as expected. | |||
Meta-information is also handled. Rows and columns may have a name, and this name is searchable. If for whatever reason the ordering of a CSV file changes, searching by column names will return the expected information. | |||
== Example == | |||
To get a first taste, let's load the test csv file coming with the package: | To get a first taste, let's load the test csv file coming with the package: | ||
Line 38: | Line 32: | ||
10 DataValue -4.2000 300000 1.0610e-11 6.5355e-13 1.4431e-07 B | 10 DataValue -4.2000 300000 1.0610e-11 6.5355e-13 1.4431e-07 B | ||
Those data were produced while performing a voltage sweep on a sensor, measuring with | Those data were produced while performing a voltage sweep on a sensor, measuring with an impedance bridge | ||
the parallel capacitor and conductance at a given frequency. | the parallel capacitor and conductance at a given frequency. | ||
The first lines | The first lines contain few meta-information: name of the source file and a few comments found in the | ||
csv file. The purpose is to annotate the results. | csv file. The purpose is to annotate the results. | ||
Line 74: | Line 68: | ||
When selecting vectors, this transformation in array is automatic. The DC current is contained in elements | When selecting vectors, this transformation in array is automatic. The DC current is contained in elements | ||
31 to 40 (fourth column): | 31 to 40 (fourth column): | ||
>> | >> experiment(31:40) | ||
ans = | ans = | ||
Columns 1 through 9: | Columns 1 through 9: | ||
Line 124: | Line 118: | ||
2 | 2 | ||
When the output is a vector and can be simplified to something simple ... it is. | When the output is a vector and can be simplified to something simple ... it is. | ||
[[Category:Octave Forge]] |
edits