Re: [R-pkg-devel] tinyfiledialogs - The bindings are ready, but I need help to make of package of it

2023-09-21 Thread tinyfiledialogs
Hi, There are no dependencies and everything is considered/treated as UTF-8. On windows, I internally do all the conversions between UTF-8 and UTF-16. I also offer functions to convert between UTF-8 , UTF-16 and MBCS. I don't know what UCRT is, but tinyfiledialogs is compatible with all versions

Re: [R-pkg-devel] A simple question regarding examples

2023-09-21 Thread Hanyu Song
Hello Duncan and Ivan, Thank you for your prompt response! Perhaps I should add that: I don't think the Python module "ctef" exists on CRAN. Therefore, I am very surprised that the example below runs overtime, since all it has to do is to run reticulate::py_module_available('ctef'). If even

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Duncan Murdoch
I just found a couple of packages with add-ins that do something like this: sinew (on CRAN) and docthis on Github at https://github.com/mdlincoln/docthis I think neither of them is quite as smooth as the `Code | Insert Roxygen Skeleton` menu item in RStudio, but both do handle dataframes,

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Jeff Newmiller via R-package-devel
I thought roxygen supported documenting NULL constants for data. I do think roxygen ought to be able to co-exist with Rd files... but the claim that documenting data requires Rd files smells fishy to me. On September 21, 2023 1:30:11 PM PDT, Michael L Friendly wrote: >I am an RStudio user,

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Michael L Friendly
I am an RStudio user, and I could see this as a plugin somewhere, but I don't want to create a package just for this. I'd rather that my code could be adopted somewhere in the framework of devtools/usethis/ ... It's so obvious that this tool should be there somewhere, particularly since

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread John Fox
Hi Michael, I'm no license expert either, but I too believe that while a GPL-licensed package can incorporate MIT-licensed code, an MIT-licensed package can't incorporate GPL-licensed code. One solution, I think, would be to put your use_data_doc() in a separate GPL-licensed package, which

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Duncan Murdoch
Hi Michael. I don't know if you're an RStudio user, but this seems ideal as the basis for an RStudio plug-in. Just install it, then when you want to generate docs for some dataset defined in R code, move to the start of the definition and hit some hot key to insert the documentation skeleton

Re: [R-pkg-devel] [Tagged] Re: roxygen style documentation for data sets

2023-09-21 Thread Jeff Newmiller via R-package-devel
None of us here are lawyers, but a simple google search should take you to discussions such as [1]. There is a long history of debates about the upsides and downsides of restricting how people can use your source code. My short take is that a GPL license prevents anyone from stuffing your code

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Michael L Friendly
Yes, if usethis is the most useful place for this to be, I suppose I should first flag this as an issue, and then issue a PR for my code. I don't understand the fine distinctions between GPL-2 and MIT licensed code. Perhaps some other developers can chime in here. -Michael -Original

Re: [R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Ivan Krylov
В Thu, 21 Sep 2023 16:33:35 + Michael L Friendly пишет: > I called this function `use_data_doc()`, because I thought it would > be a welcome addition to the usethis package. > > I hope that someone on this list can advise how to make such a > function available to all R package developers.

[R-pkg-devel] roxygen style documentation for data sets

2023-09-21 Thread Michael L Friendly
I have many datasets in a some of my packages, and always used `utils::promptData()` to generate the skeleton of a man/data.Rd file. Now that I've switched to roxygen style, I have found no simple equivalent. In fact, with RStudio tools for generating documentation for functions, it is

Re: [R-pkg-devel] safely allocate SEXP and handle failure

2023-09-21 Thread Ivan Krylov
В Thu, 21 Sep 2023 15:10:56 +0200 Jan Gorecki пишет: > Do you by any chance know any examples of using > R_withCallingErrorHandler? Or could you modify your example to use > this instead? Calling handlers are different from exiting handlers established by tryCatch. Instead of replacing the

Re: [R-pkg-devel] tinyfiledialogs - The bindings are ready, but I need help to make of package of it

2023-09-21 Thread Ivan Krylov
В Thu, 21 Sep 2023 15:02:12 +0200 Guillaume Vareille пишет: > There are no dependencies I see now, you're using dialog-style programs on Unix-like operating systems. That's clever. Note that CRAN packages are not allowed to take over the standard input and standard output, so you might have to

Re: [R-pkg-devel] A simple question regarding examples

2023-09-21 Thread Duncan Murdoch
On 20/09/2023 8:03 p.m., Hanyu Song wrote: Hello, I have a simple question about including examples. My code depends on a rarely used Python module, so I am using the @examplesIf tag per Hadley Wickham's advice as follows: #' @examplesIf reticulate::py_module_available('ctef') #' res <-

Re: [R-pkg-devel] tinyfiledialogs - The bindings are ready, but I need help to make of package of it

2023-09-21 Thread Ivan Krylov
Dear Guillaume Vareille, В Wed, 20 Sep 2023 12:30:53 +0200 tinyfiledial...@ysengrin.com пишет: > I've been pointed to the documentation link on how to write a package, > but it would really help if someone who knows what to do could direct > me. There's potentially a lot to tell. Converting the

[R-pkg-devel] tinyfiledialogs - The bindings are ready, but I need help to make of package of it

2023-09-21 Thread tinyfiledialogs
https://tinyfiledialogs.sourceforge.net Hi, I am the author of tinyfiledialogs a cross-platform C C++ library (windows, Mac, Unix) which offers many modal dialogs and popup notifications (both for graphic and console modes). It aims to be extremely easy to use. There is no init, no main

Re: [R-pkg-devel] safely allocate SEXP and handle failure

2023-09-21 Thread Ivan Krylov
On Thu, 21 Sep 2023 09:46:26 +0200 Jan Gorecki wrote: > I would like to safely allocate R object from C. By safely I mean > that, I can test if allocation succeeded or failed, and then raise > exception myself. > R_alloc and allocVector both raises exception straightaway, so I am > not able to

[R-pkg-devel] safely allocate SEXP and handle failure

2023-09-21 Thread Jan Gorecki
Dear pkg developers I would like to safely allocate R object from C. By safely I mean that, I can test if allocation succeeded or failed, and then raise exception myself. R_alloc and allocVector both raises exception straightaway, so I am not able to handle failed allocation myself. In plain C it

Re: [R-pkg-devel] A simple question regarding examples

2023-09-21 Thread Ivan Krylov
On Thu, 21 Sep 2023 00:03:11 + Hanyu Song wrote: > Unfortunately, my_func runs overtime during the CRAN check. To > resolve this, do I simply use the less elegant approach as follows? > > #' \dontrun{ > #' if (reticulate::py_module_available('ctef')) { > #' res <- my_func(input1, input2) >