|
| dataframe (node varNode) |
|
| dataframe (std::string s, int r, int c) |
|
std::vector< node > | getDataframe () |
|
std::string | getDataFrameName () |
|
void * | getObs (int rowNumber) |
|
std::vector< std::string > | getColTypes () |
|
std::vector< std::string > | getColNames () |
|
void | setColTypes (std::vector< std::string > cTypes) |
|
void | setColNames (std::vector< std::string > cNames) |
|
node | getNode (std::string vName="", int vNumber=0) |
|
std::vector< std::string > | getRangeOfRows (int start, int ending) |
|
void * | getDataRange (int r1, int c1, int r2, int c2) |
|
void | addObsRow (void *obsRow) |
|
void | setDfName (std::string) |
|
void | setNode (node varNode, int vNumber) |
|
void | setDataframe (std::vector< node > dframe) |
|
void | convertDfToVStrings (dataframe df) |
|
std::vector< std::string > | readRowsSDS (std::vector< std::vector< std::string > > strDStruct, int nCSVRows, int colNumber) |
|
void | convertParsedVStrtoDf (std::vector< std::vector< std::string > > parsedVVS) |
|
void | loadFromCSV (std::string csvFName, bool header, std::vector< std::string > strVarTypes) |
|
std::vector< std::vector
< std::string > > | makeDataFrame (std::vector< std::vector< std::string > > intStrDStruct) |
|
void | saveToCSV (std::string csvFName) |
|
void | convertCSVtoDF (std::vector< std::vector< std::string > > strCSVStruct, int nCSVRows, int nCSVCols) |
|
void | displayDataframe () |
|
void | displayNodeData (int position=0, std::string varName="") |
|
std::string | toStringStream () |
|
|
int | nrows |
|
int | ncols |
|
std::string | dfName |
|
node | varsGrp |
|
std::vector< node > | df |
|
std::vector< std::vector
< std::string > > | fetchedStrDataStruct |
|
std::vector< std::string > | colNames |
|
std::vector< std::string > | colTypes |
|
void * | obsDataFrame = nullptr |
|
std::vector< std::string > | obsRowNames |
|
dataframe::dataframe |
( |
node |
varNode | ) |
|
. . . a constructor with the first variable/Node initializes rows and columns to (0,0)
void dataframe::addObsRow |
( |
void * |
obsRow | ) |
|
add a row of observations to the dataframe structure tuples,
- Parameters
-
obsRow | a pointer to the tuple of observations to add |
- Returns
- none (void)
void dataframe::convertCSVtoDF |
( |
std::vector< std::vector< std::string > > |
strCSVStruct, |
|
|
int |
nCSVRows, |
|
|
int |
nCSVCols |
|
) |
| |
build a dataframe / Class of vector of variable columns of types string as vector collection of contents from parsed strings of a specific observation fields.
read each CSV row, into a column vector, put pointer5 to vector in a node, put node in the dataframe
void dataframe::convertParsedVStrtoDf |
( |
std::vector< std::vector< std::string > > |
parsedVVS | ) |
|
convert a parsed vector of strings to a dataframe of nodes
void dataframe::createObsDataframe |
( |
| ) |
|
|
protected |
create a table of observations from the dataframe listing variable observation(s) (values) as tuples,
- Parameters
-
- Returns
- none (void)
boost::any dataframe::createObsTuple |
( |
| ) |
|
|
protected |
create a tuple from a specific row of variables elements, an internal helper function for the dataframe
- Parameters
-
nrow | the row to read accross the table |
- Returns
- obsRow a tuple (pointer to) with the data by type from the line
vector< string > dataframe::createTypesVector |
( |
| ) |
|
|
protected |
Dataframe class methods helper methods (internal/protected) converters public may be used internally and externally getters - public setters - public utility methods public (usually used externally) displayers - publiccreate a vector of variable (column) types as response to query of dataframe
void dataframe::displayDataframe |
( |
| ) |
|
display the dataframe as a table or wxGrid structure,
- Parameters
-
- Returns
- none (void)
void dataframe::displayNodeData |
( |
int |
position = 0 , |
|
|
std::string |
varName = "" |
|
) |
| |
display the node/variable of the dataframe,
- Parameters
-
varName | variable to display by name |
varNumber | variable number to display |
- Returns
- none (void)
vector< string > dataframe::getColNames |
( |
| ) |
|
get listing of variable names (column names) of the dataframe.
- Parameters
-
- Returns
- a vector<string> the variable names as a vector of strings
vector< node > dataframe::getDataframe |
( |
| ) |
|
get the whole dataframe as a vector of nodes
- Parameters
-
- Returns
- dataframe, ie. a vector of nodes which is the dataframe itself
string dataframe::getDataFrameName |
( |
| ) |
|
get the dataframe name,
- Parameters
-
- Returns
- a string with the dataframe's name
void * dataframe::getDataRange |
( |
int |
r1, |
|
|
int |
c1, |
|
|
int |
r2, |
|
|
int |
c2 |
|
) |
| |
get data range or block from one or more variables (columns) of the dataframe structure,
- Parameters
-
r1,c1,r2,c2 | - the rows and columns to fetch * |
- Returns
- a pointer to a block of values for the range selected
node dataframe::getNode |
( |
std::string |
vName = "" , |
|
|
int |
vNumber = 0 |
|
) |
| |
get a variable with meta-data and the dataset stored in it. This is a node.
- Parameters
-
vName | the node or variable name to fetch, default NULL or |
vNumber | the node or variable number to fetch default 0 |
- Returns
- the variable node
void * dataframe::getObs |
( |
int |
rowNumber | ) |
|
get observations from a row of the dataframe structure observation(s) as tuples,
- Parameters
-
- Returns
- pointer to tuple containing variable values in the row
vector< string > dataframe::getRangeOfRows |
( |
int |
start, |
|
|
int |
ending |
|
) |
| |
get a range of rows, ie. observation(s) as tuples,
- Parameters
-
- Returns
- a vector<tuple>, the variable values in the rows (as a pointer to a vector of tuple)
void dataframe::loadFromCSV |
( |
std::string |
csvFName, |
|
|
bool |
header, |
|
|
std::vector< std::string > |
strVarTypes |
|
) |
| |
load data from a CSV into the dataframe,
- Parameters
-
csvFName | name and path of the file to read and import the data from. |
header | a boolean indicating if the first row of CSV contains column names. |
- Returns
- none (void)
vector< string > dataframe::readRowsSDS |
( |
std::vector< std::vector< std::string > > |
strDStruct, |
|
|
int |
nCSVRows, |
|
|
int |
colNumber |
|
) |
| |
readRowsCSV, read a variable element from each row and construct a column vector of a single variable's observation set
- Parameters
-
strDStruct | CSV derived string data structure to read from |
nR | number of row s (ie. elements ) to be read into the column vector |
colNumber | the variable number (column) of analogous observations |
- Returns
- varVector the vector of variable readings (observations)
void dataframe::saveToCSV |
( |
std::string |
csvFName | ) |
|
save the dataframe contents (with or without a header line) to a CSV file,
- Parameters
-
csvFName | to save to (defaults to 'datafile'). |
header | a boolean to say wther to include column names. |
- Returns
- none (void)
void dataframe::setDataframe |
( |
std::vector< node > |
dframe | ) |
|
reset dataframe from external vector<node> an already constructed vector of nodes (variables)
- Parameters
-
dframe | an intact vector of nodes from any source |
void dataframe::setNode |
( |
node |
varNode, |
|
|
int |
vNumber |
|
) |
| |
add a new Node/variable or (re)set the contents of a Node or variable, Consider whether this functionality should be split further between variable data edit, Node content resets and node add.
- Parameters
-
Node | varNode with all the variable meta-data and data, |
vNumber | the position number of the variable. if exists reset, if new add |
- Returns
- none (void)
string dataframe::toStringStream |
( |
| ) |
|
convert the full dataframe contents to a string stream,
- Parameters
-
- Returns
- none (void)
The documentation for this class was generated from the following files: