我已经成功实现了一个带有一些Fortran函数的R包。其中一些函数需要写入文件,因此我自然会使用Fortran语句write(unit, fmt) var
。
在编译的软件包上运行R CMD检查时,会发出以下注意事项:
checking compiled code ... NOTE
File 'Siccuracy/libs/i386/Siccuracy.dll':
Found '_gfortran_st_write', possibly from 'write' (Fortran), 'print'
(Fortran)
Objects: 'dip.o', 'chips.o', 'link.o'
File 'Siccuracy/libs/x64/Siccuracy.dll':
Found '_gfortran_st_write', possibly from 'write' (Fortran), 'print'
(Fortran)
Objects: 'dip.o', 'chips.o', 'link.o'
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor the system RNG.
通过从dip.f95逐个删除write
个来电,我发现只有在删除所有 write
个来电时,才会消失(为此文件至少)。
请注意,我
我正在使用write
调用两个不同的东西:1)写入平面文本文件,整数和实际值的组合,以及2)使用write
将整数转换为字符通过write(char, *) int
。
我是否有选项可以避免来自R CMD检查的这个注意事项?