Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在发现错误返回 R 时退出 C 代码的最佳实践是什么?包指南说不要使用exit(),这是有道理的(当你杀死所有东西时),但你如何退出到 R 并指示发生了错误。显然你可以在返回向量中有一个错误标志,但是有更好的方法吗?
exit()
你正在寻找error(). 它在编写 R 扩展的第 6.2 节中有描述……你应该更经常地倾听你的潜意识。;-)
error()
I need to sort an ArrayList and i can't use Collections.sort(), because Google App Engine's Java runtime environment doesn't support it. How can I do? Thank