src/IndivData.cpp
void ChelaHeightData::writeToR(ostream& os, std::string nm, int indent) {
    if (debug) cout<<"ChelaHeightData::writing to R"<<std::endl;
    for (int n=0;n<indent;n++) os<<tb;
        os<<"`"<<name<<"`"<<"=list("<<std::endl;
        indent++; 
            for (int n=0;n<indent;n++) os<<tb;
            os<<"name="<<qt<<name<<qt<<cc;
            os<<"survey="<<qt<<survey<<qt<<cc;
            os<<"llType="<<qt<<tcsam::getLikelihoodType(llType)<<qt<<cc;
            os<<"llWgt="<<llWgt<<cc<<std::endl;
            for (int n=0;n<indent;n++) os<<tb;
            adstring colnames="'y','z','nIndivs','fraction mature'";
            os<<"data="; wts::writeToR(os,inpData_nc,colnames); os<<std::endl;
        indent--;
    for (int n=0;n<indent;n++) os<<tb; os<<")"<<std::endl;
    if (debug) cout<<"ChelaHeightData::done writing to R"<<std::endl;
}
/**
 * Write to an output stream as an R list with name given by name variable. 
 * 
 * @param os - the output stream
 * @param nm - the name of the list (ignored)
 * @param indent - the number of tabs to indent, initially
 */
Write to an output stream as an R list with name given by name variable.

@param os - the output stream
@param nm - the name of the list (ignored)
@param indent - the number of tabs to indent, initially
Write to an output stream as an R list with name given by name variable . @param os - the output stream @param nm - the name of the list ( ignored ) @param indent - the number of tabs to indent initially
void ChelaHeightData::writeToR(ostream& os, std::string nm, int indent) {
    if (debug) cout<<"ChelaHeightData::writing to R"<<std::endl;
    for (int n=0;n<indent;n++) os<<tb;
        os<<"`"<<name<<"`"<<"=list("<<std::endl;
        indent++; 
            for (int n=0;n<indent;n++) os<<tb;
            os<<"name="<<qt<<name<<qt<<cc;
            os<<"survey="<<qt<<survey<<qt<<cc;
            os<<"llType="<<qt<<tcsam::getLikelihoodType(llType)<<qt<<cc;
            os<<"llWgt="<<llWgt<<cc<<std::endl;
            for (int n=0;n<indent;n++) os<<tb;
            adstring colnames="'y','z','nIndivs','fraction mature'";
            os<<"data="; wts::writeToR(os,inpData_nc,colnames); os<<std::endl;
        indent--;
    for (int n=0;n<indent;n++) os<<tb; os<<")"<<std::endl;
    if (debug) cout<<"ChelaHeightData::done writing to R"<<std::endl;
}
void ChelaHeightData :: writeToR ( ostream & os , std :: string nm , int indent ) { if ( debug ) cout << " " << std :: endl ; for ( int n = 0 ; n < indent ; n ++ ) os << tb ; os << " " << name << " " << " " << std :: endl ; indent ++ ; for ( int n = 0 ; n < indent ; n ++ ) os << tb ; os << " " << qt << name << qt << cc ; os << " " << qt << survey << qt << cc ; os << " " << qt << tcsam :: getLikelihoodType ( llType ) << qt << cc ; os << " " << llWgt << cc << std :: endl ; for ( int n = 0 ; n < indent ; n ++ ) os << tb ; adstring colnames = " " ; os << " " ; wts :: writeToR ( os , inpData_nc , colnames ) ; os << std :: endl ; indent -- ; for ( int n = 0 ; n < indent ; n ++ ) os << tb ; os << " " << std :: endl ; if ( debug ) cout << " " << std :: endl ; }
Write to an output stream as an R list with name given by name variable.
Write to an output stream as an R list with name given by name variable .