是否有办法在R内访问Linux计算机上的帮助文件的Windows版本?
我在我的Linux机器上编写了相当数量的R代码,但我必须确保代码将在Windows机器上运行,供协作者使用。
在我的Linux机器上读取一个帮助文件,编写我的代码,然后花几个小时思考为什么它不能在Windows机器上工作,直到我检查了该机器上的帮助文件,并意识到它与Linux机器上的帮助文件不同,我已经多次被烧死了。
它通常会有一个“注意事项:在Windows上,xxxx的行为不同.”,我希望我在我的Linux机器上编写代码时知道这一点!
我确实意识到许多帮助文件都是特定于系统的(例如?system),但有时我想在我的Linux计算机上阅读Windows版本。今天,我发现自己想读?windows,但不得不启动我的Windows膝上型电脑来读取帮助文件,因为这个功能在Linux上是不可用的,所以没有帮助文件。
干杯。
发布于 2012-03-13 03:36:04
您可以始终查看给您提供明确条件的源--这是来自man/system.Rd的
#ifdef windows
Only double quotes are allowed on Windows: see the examples. (Note: a
Windows path name cannot contain a double quote, so we do not need to
worry about escaping embedded quotes.)
[...]
#endif
#ifdef unix
Unix-alikes pass the command line to a shell (normally \file{/bin/sh},
and POSIX requires that shell), so \code{command} can be anything the
shell regards as executable, including shell scripts, and it can
contain multiple commands separated by \code{;}.
[...]
#endifhttps://stackoverflow.com/questions/9677373
复制相似问题