provides a set of converter function between DM and the open source statistic package R More...
Typedefs | |
| typedef ConstIterator< IPoint > | const_iterator_point |
| Point iterator. | |
Functions | |
| DM_API void | initEmbeddedR (int argc=0, char *argv[]=0) |
| Initializes the embedded R instance Must be called only once for the overall process. If the DM library is used in connection with rpy, the function MUST NOT be called, since the initialization is done by rpy. | |
| DM_API void * | asDataFrame (const_iterator_point it, const_iterator_point end, const AddInfoLayoutHandle &layout, bool withCoordinates=true, FilterHandle filter=FilterHandle()) |
| convert a set points including there attributes into an R data frame object More... | |
| DM_API void * | asDataFrame (const_iterator_point it, const_iterator_point end, const AddInfoLayoutHandle &layout, const DM::AddInfoLayoutHandle &mapCol, const DM::IIndexMapSet &map, DM::IIndexHelperSet &helper, bool invertIndexMap, bool withCoordinates=true, FilterHandle filter=FilterHandle()) |
| DM_API int64_t | setFrom (const_iterator_point it, const_iterator_point end, const AddInfoLayoutHandle &layout, void *sexpObj, FilterHandle filter=FilterHandle()) |
| set point attributes from an R data frame object More... | |
| DM_API void * | createDataFrame (int64_t rowCount, const AddInfoLayoutHandle &layout, bool withCoordinates=true) |
| Creates a empty data frame object of a given size based. More... | |
| DM_API int64_t | fillDataFrame (void *sexpObj, int64_t rowIdx, const_iterator_point it, const_iterator_point end, FilterHandle filter=FilterHandle()) |
| fill an existing data frame object with a set of points at the specified row index More... | |
| DM_API int64_t | fillDataFrame (void *sexpObj, int64_t rowIdx, const AddInfoLayoutHandle &mapColumn, const IIndexMapSet &map, IIndexHelperSet &helper, bool invertIndexMap, const_iterator_point it, const_iterator_point end, FilterHandle filter=FilterHandle()) |
| fill an existing data frame object with a subset of points at the specified row index More... | |
| DM_API void | compareWith (void *sexpObj, DM::IClassificationMatrix &classMatrix, const_iterator_point it, const_iterator_point end, const DM::AddInfoLayoutHandle &mapCol, const DM::IIndexMapSet &map, DM::IIndexHelperSet &helper, bool invertIndexMap, DM::FilterHandle filter=FilterHandle()) |
provides a set of converter function between DM and the open source statistic package R
| DM_API void* DM::RConverter::asDataFrame | ( | const_iterator_point | it, |
| const_iterator_point | end, | ||
| const AddInfoLayoutHandle & | layout, | ||
| bool | withCoordinates = true, |
||
| FilterHandle | filter = FilterHandle() |
||
| ) |
convert a set points including there attributes into an R data frame object
A data frame object can be seen as database table supporting labeled columns of different data types. Since R cannot handle column name starting with an underscore '_', user-defined attributes are prefixed with an 'X'.
| [in] | it | begin iterator of points |
| [in] | end | end iterator of points |
| [in] | layout | defines the attributes that should be transferred |
| [in] | withCoordinates | flag if the coordinates should be copied as well |
| [in] | filter | optional filter to subselect the points |
| DM_API void* DM::RConverter::createDataFrame | ( | int64_t | rowCount, |
| const AddInfoLayoutHandle & | layout, | ||
| bool | withCoordinates = true |
||
| ) |
Creates a empty data frame object of a given size based.
| [in] | rowCount | number of rows to reserve |
| [in] | layout | defines the attributes (columns of the data frame object) to that should be generated |
| [in] | withCoordinates | flag if columns for the coordinates should generated as well |
| DM_API int64_t DM::RConverter::fillDataFrame | ( | void * | sexpObj, |
| int64_t | rowIdx, | ||
| const AddInfoLayoutHandle & | mapColumn, | ||
| const IIndexMapSet & | map, | ||
| IIndexHelperSet & | helper, | ||
| bool | invertIndexMap, | ||
| const_iterator_point | it, | ||
| const_iterator_point | end, | ||
| FilterHandle | filter = FilterHandle() |
||
| ) |
fill an existing data frame object with a subset of points at the specified row index
Compared to the standard fillDataFrame function, this implementation allows converting a subset of the points into the dataframe object. The subset is defined by the IndexMapSet object, containing each point index that should be inserted to the dataframe. Moreover the selection is not restricted to a single index but to multiple indices which are selected based on an integer attribute as defined in the layout mapColumn. The index based selection can be inverted by the invertIndexMap flag. Currently only data frame objects that are created by the createDataFrame function can be filled
| [in] | sexpObj | data frame object to be filled |
| [in] | rowIdx | at which row index the data should be filled |
| [in] | mapColumn | attribute (single column layout) for accessing the relevant map index |
| [in] | map | index map object describing the object indices for selection |
| [in] | helper | index helper object for keeping track of traversed map index (can be empty. the object is extended automatically) |
| [in] | invertIndexMap | if false all objects listed by the index map are inserted to the dataframe. Otherwise all objects that are NOT listed are inserted. |
| [in] | it | start iterator |
| [in] | end | end iterator |
| [in] | filter | optional filter to subselect the points |
| DM_API int64_t DM::RConverter::fillDataFrame | ( | void * | sexpObj, |
| int64_t | rowIdx, | ||
| const_iterator_point | it, | ||
| const_iterator_point | end, | ||
| FilterHandle | filter = FilterHandle() |
||
| ) |
fill an existing data frame object with a set of points at the specified row index
Currently only data frame objects that are created by the createDataFrame function can be filled
| [in] | sexpObj | data frame object to be filled |
| [in] | rowIdx | at which row index the data should be filled |
| [in] | it | start iterator |
| [in] | end | end iterator |
| [in] | filter | optional filter to subselect the points |
| DM_API int64_t DM::RConverter::setFrom | ( | const_iterator_point | it, |
| const_iterator_point | end, | ||
| const AddInfoLayoutHandle & | layout, | ||
| void * | sexpObj, | ||
| FilterHandle | filter = FilterHandle() |
||
| ) |
set point attributes from an R data frame object
The attribute number of the layout and the column of the R object have to match. However, it is not necessary that the number of points, implicitly given by the iterator object, and the number of rows of the R data frame object matches. The number of changed points will be returned
| [in] | it | begin iterator of points |
| [in] | end | end iterator of points |
| [in] | layout | attributes set from the the data frame object |
| [in] | sexpObj | SEXP object containing all the attribute values (to avoid header file dependencies a simple raw pointer is used) |
| [in] | filter | optional filter to subselect the points |