2 ridmc: iDMC->R interface
4 Copyright (C) 2007 Marji Lines and Alfredo Medio.
6 Written by Antonio, Fabio Di Narzo <antonio.fabio@gmail.com>.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or any
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 Last modified: $Date: 2007-05-24 16:41:18 +0200 (gio, 24 mag 2007) $
21 #include <idmclib/version.h>
23 /*Return idmclib version number as (major, minor, micro) vector*/
24 SEXP
ridmc_version() {
26 PROTECT(ans
= allocVector(INTSXP
, 3));
27 INTEGER(ans
)[0] = idmc_version_major();
28 INTEGER(ans
)[1] = idmc_version_minor();
29 INTEGER(ans
)[2] = idmc_version_micro();
30 PROTECT(dimnames
= allocVector(STRSXP
, 3));
31 SET_VECTOR_ELT(dimnames
, 0, mkChar("major"));
32 SET_VECTOR_ELT(dimnames
, 1, mkChar("minor"));
33 SET_VECTOR_ELT(dimnames
, 2, mkChar("micro"));
34 setAttrib(ans
, R_NamesSymbol
, dimnames
);