The R Project SVN R-packages

Rev

Rev 3808 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3808 Rev 4160
Line 50... Line 50...
50
/****************************************************************************
50
/****************************************************************************
51
 * SMAT FUNCTIONS
51
 * SMAT FUNCTIONS
52
 ****************************************************************************/
52
 ****************************************************************************/
53
SEXP sdf_as_matrix(SEXP sdf, SEXP name) {
53
SEXP sdf_as_matrix(SEXP sdf, SEXP name) {
54
    char *iname, *mat_iname, *type;
54
    char *iname, *mat_iname, *type;
55
    const char *dectype, *colname, *vectype;
55
    const char *dectype, *colname, *vectype = NULL;
56
    sqlite3_stmt *stmt, *stmt2;
56
    sqlite3_stmt *stmt, *stmt2;
57
    int ncols, nrows, i;
57
    int ncols, nrows, i;
58
    SEXP ret, tmp, names;
58
    SEXP ret, names;
59
 
59
 
60
    iname = SDF_INAME(sdf);
60
    iname = SDF_INAME(sdf);
61
 
61
 
62
    if (!USE_SDF1(iname, TRUE, TRUE)) return R_NilValue;
62
    if (!USE_SDF1(iname, TRUE, TRUE)) return R_NilValue;
63
 
63
 
Line 222... Line 222...
222
}
222
}
223
 
223
 
224
SEXP sdf_get_matrix_columns(SEXP smat, SEXP cols) {
224
SEXP sdf_get_matrix_columns(SEXP smat, SEXP cols) {
225
    SEXP colnames, ret;
225
    SEXP colnames, ret;
226
    sqlite3_stmt *stmt1, *stmt2;
226
    sqlite3_stmt *stmt1, *stmt2;
227
    char *mat_iname, *mat2_iname, *type;
227
    char *mat_iname, *mat2_iname;
228
    const char *coltype, *vectype;
228
    const char *coltype, *vectype;
229
    int i, nrows, ncols, index, idxlen, ci_len, ci_actual_len;
229
    int i, nrows, ncols, index, idxlen, ci_len, ci_actual_len;
230
    int *col_indices;
230
    int *col_indices;
231
 
231
 
232
    mat_iname = SDF_INAME(smat);
232
    mat_iname = SDF_INAME(smat);