PPCKO: Principal Predictive Components for Estimating an Autoregressive Operator
 
Loading...
Searching...
No Matches
data_reader.hpp File Reference

Contains the method to read data. More...

#include <RcppEigen.h>
#include <algorithm>
#include <iterator>
#include <numeric>
#include <cmath>
#include <utility>
#include <vector>
#include <iostream>
#include "traits_ko.hpp"
#include "removing_nan.hpp"
#include "parameters_wrapper.hpp"

Go to the source code of this file.

Functions

template<typename T>
std::pair< KO_Traits::StoringMatrix, std::vector< int > > reader_data (Rcpp::NumericMatrix X, REM_NAN MA_t)
 Function that reads data from R containers, substitute actual NaNs, handle dummy NaNs, removing them but saving their position, and wraps it into C++ objects.
 

Detailed Description

Contains the method to read data.

Author
Andrea Enrico Franzoni

Function Documentation

◆ reader_data()

template<typename T>
std::pair< KO_Traits::StoringMatrix, std::vector< int > > reader_data ( Rcpp::NumericMatrix X,
REM_NAN MA_t )

Function that reads data from R containers, substitute actual NaNs, handle dummy NaNs, removing them but saving their position, and wraps it into C++ objects.

Parameters
XRcpp::NumericMatrix as passed in input to the R-interfaced function
MA_thow to handle not-dummy NaNs (if substituting with pointwise fts mean or 0)
Returns
a pair containing the mapped matrix and a vector with the positions of the dummy NaNs (rows of the original matrix)
Note
Depends on RcppEigen for interfacing with R containers