Dataframe package: Difference between revisions

Jump to navigation Jump to search
2,082 bytes added ,  1 May 2015
Example based on the 'data_test.csv'
No edit summary
(Example based on the 'data_test.csv')
Line 10: Line 10:


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.
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.
To get a first taste, let's load the test csv file coming with the package:
  >> dataframe('data_test.csv')
  warning: load: '/home/padupuis/matlab/dataframe/inst/data_test.csv' found by searching load path
  warning: fopen: '/home/padupuis/matlab/dataframe/inst/data_test.csv' found by searching load path
  ans = dataframe with 10 rows and 7 columns
  Src: data_test.csv
  Comment: #notice there is a extra separator
  Comment: # a comment line and an empty one
  Comment: # the next lines use \r\n \r and \f as linefeed
  Comment: # one empty input field
  _1  DataName  VBIAS  Freq  x_IBIAS_          C      GOUT  OK_
  Nr      char  double double    double    double    double char
  1 DataValue -6.0000 300000 1.6272e-11 7.0215e-13 1.6044e-07    A
  2 DataValue -5.8000 300000 1.5990e-11 6.9607e-13 1.5728e-07    E
  3 DataValue -5.6000 300000 1.3790e-11 6.9048e-13 1.5489e-07    !
  4 DataValue -5.4000 300000 1.4420e-11 6.8517e-13 1.5478e-07    ?
  5 DataValue -5.2000 300000 1.2930e-11 6.7965e-13 1.5189e-07    C
  6 DataValue -5.0000 300000 1.2610e-11 6.7444e-13 1.4931e-07    B
  7 DataValue -4.8000 300000 1.4390e-11 6.7011e-13 1.4876e-07    A
  8 DataValue -4.6000 300000 1.0890e-11 6.6416e-13 1.4890e-07    3
  9 DataValue -4.4000 300000        NA 6.5859e-13 1.4558e-07    C
  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 a impedance bridge
the parallel capacitor and conductance at a given frequency.
The first lines contains a few meta-information: name of the source file and a few comments found in the
csv file. The purpose is to annotate the results.
Then we have the content. Each column starts with a name, then a type. Next we find the content lines, each
of them with an index. Then we find the content; control values (polarization voltage, applied frequency),
then measured values: DC current, capacitor, conductance. The last column is categorical: the user introduced
some code telling if the result makes senses or not.


A simple example:
A simple example:
Anonymous user

Navigation menu