Package usethis: Is proper to add a license in a data analysis project?

I have already updated this package in the latest version. For one of my data analysis project, I use the license function in the usethis message, I get this error.

Error: `use_ccby_license()` is designed to work with packages.
Project 'top-line-predictor' is not an R package.

Thus, I check the related issues on the Github. I find, most of the issues related to licenses are about package development instead of something project related.

Thus, Is there any consideration not to use the license function for a data analysis project?
I don't know too much about the license field. Just feel usethis is easy to use and friendly for beginners of R users.

1 Like

Obvious disclaimer. I am very much not a lawyer. I can't comment on the pros/cons/consequences of putting a license on your project. If you have more questions on the topic, there are likely better places to ask. This link might be a good place to answer a couple of questions. Computer software is listed as a copyrightable work, but "methods" are not copyrightable. More to the spirit of open-source, I think making clear your expectations of what you wish to become of your work is a good idea.

More to the point of the error, I think you might lack a DESCRIPTION or a NAMESPACE file in the package folder. The three components of packages are:

  1. An R/ directory in your project folder.
  2. A DESCRIPTION file in your project folder.
  3. A NAMESPACE file in your project folder.

Try adding those and seeing if the error persists.

For usethis to recognize your project as a package (and for you to be able to use functions such as use_ccby_license()) you only need a DESCRIPTION file, see

So if you run usethis::use_description() you should then be fine.

Like @EliMiller I can't comment on the legal aspect though, only this practical aspect.

1 Like

It is perfectly normal to have a GitHub repo that

  1. is not a package
  2. is meant to be re-used under a license

Teaching materials and meetup presentations come to my mind...

When I was facing the same issue I ended up by creating the license.md file myself, with the text of CC-BY-4.0 license. GitHub recognized the text immediately.

Feel free to have a look at https://github.com/jlacko/ml-meetup-text and copy the license.md from there (it is boilerplate).

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.