Hello,

I am new at R and need some help because I am stuck in a project. I have financial data, which is stored in the MetaStock data format and is updated daily. For reading this data, I started to write a R-script. So far, I managed to read the Master file, which contains the information about the various securities in a directory, as well as reading the Fxxx.Dat data files. The data is stored in the Microsoft Binary Format, which was used for Basica under DOS. Thus, it has to be converted into the IEEE format for the floating point numbers. But here my problems start.

I have a DLL-file with functions to convert the 4byte MBF format into IEEE format as well as from IEEE to MBF format. As recommended, this DLL is in the Windows/System32 directory. I use this DLL with Visual Basic and it works fine. In the R script, I included the following line

dyn.load("MBFIEE32", DLLpath="C:/Windows/System32").

However, testing if the DLL had been loaded with is.loaded("MBFIEE32") returns FALSE. I have read the manual, but have not figured out what went wrong. Thus, my question is, what might I have overlooked, which could cause this error?

I also have a file with the functions for the format conversions in C. After making slight modifications to ensure that the functions return void as requested, I wanted to compile the file with the command (using the shell feature of RStudio) R CMD SHLIB [-d] -o MBF2IEEE.DLL MBF2IEEE.c. I called this command from the directory where the C-file is stored. However, the file was not compiled. Does the C-file has to be stored in a particular directory? After reading the online help, I can not figure out, what went wrong. 

Thanks for any help

Peter  
	[[alternative HTML version deleted]]

