在你自己的 R 包的源代码中包含一个外部函数
Including a foreign function in you own R package's source code
我目前面临以下情况:在我正在开发的 R
包中,我正在使用 tidytext
包中的两个函数。因此,目前 tidytext
是我的 DESCRIPTION
文件中 Imports
的一部分。 'problem' 是 tidytext
有很多依赖性,而我想保持我的包的依赖性低。事实上,我使用的 tidytext
中的两个函数完全依赖于 base
包。
因此,我想知道是否可以简单地将这些函数包含在我自己的包的源代码中?我不会导出它们,因为它们仅 'helpers' 用于某些面向用户的功能。这种方法有什么问题吗(例如考虑许可证)?
tidytext
是 published with a MIT licence,它授予您以下权利 [重点是我的]:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
但是你必须遵循这个:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
只要你这样做就没问题
编辑:
我目前面临以下情况:在我正在开发的 R
包中,我正在使用 tidytext
包中的两个函数。因此,目前 tidytext
是我的 DESCRIPTION
文件中 Imports
的一部分。 'problem' 是 tidytext
有很多依赖性,而我想保持我的包的依赖性低。事实上,我使用的 tidytext
中的两个函数完全依赖于 base
包。
因此,我想知道是否可以简单地将这些函数包含在我自己的包的源代码中?我不会导出它们,因为它们仅 'helpers' 用于某些面向用户的功能。这种方法有什么问题吗(例如考虑许可证)?
tidytext
是 published with a MIT licence,它授予您以下权利 [重点是我的]:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
但是你必须遵循这个:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
只要你这样做就没问题