[GenABEL-dev] Float to double conversion in filevector/DatABEL files
Yurii Aulchenko
yurii.aulchenko at gmail.com
Wed Feb 13 08:50:02 CET 2013
> I tried to dig into the fvlib a bit and it seems that readVariableAs()
> performs a cast based on the data type stored in the fv file. From the
> DatABEL manual I gathered that you can specify a data type for fv files.
> Does someone know how I can read the header of an fv file to check the
> data type used in a give fv file?
>
>
Hope this info may be useful:
index file contains information about dimensions of the data file, data type
used, and columns/rows names
The beginning is (frutil.h)
unsigned short int type;
// should change that to long!!!
unsigned int nelements;
unsigned int numObservations;
unsigned int numVariables;
unsigned int bytesPerRecord;
unsigned int bitsPerRecord;
unsigned int namelength;
unsigned int reserved[RESERVEDSPACE];
then names...
where (const.h)
#define RESERVEDSPACE 5
// internal format data types
#define UNSIGNED_SHORT_INT 1
#define SHORT_INT 2
#define UNSIGNED_INT 3
#define INT 4
#define FLOAT 5
#define DOUBLE 6
#define SIGNED_CHAR 7
#define UNSIGNED_CHAR 8
// number of chars used to keep var/obs names
#define NAMELENGTH 32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20130213/06e441f3/attachment-0001.html>
More information about the genabel-devel
mailing list