[R-pkg-devel] Changing R Package Maintainer

2023-04-07 Thread Andrew Simmons
Hi, I'm changing my name and my email address. I've got an update I'd like to submit to CRAN, I've changed my name and email in my DESCRIPTION. I couldn't find any details about changing maintainers in the R manuals unfortunately. Someone online said to just submit the update, CRAN will send

Re: [R-pkg-devel] Package internal function / Undocumented code objects warning

2023-02-24 Thread Andrew Simmons
I'm not very familiar with Roxygen, so I might be making incorrect assumptions here. Why are you exporting a function if it's meant to be internal? And the @noRd would indicate that a documentation file is not created. I would remove @noRd or @export On Fri, Feb 24, 2023, 16:11 EcoC2S - Irucka

Re: [R-pkg-devel] Rcmd check skip example

2023-01-18 Thread Andrew Simmons
Rd documentation is latex like, so comments can be included with a percent symbol. You should write \% if you intend to write a literal percent symbol. On Wed, Jan 18, 2023, 23:00 mai zhou wrote: > Hi, > > In the process of adding examples to the .RD file, I noticed > Rcmd check seems to skip

Re: [R-pkg-devel] NOTE about use of `:::`

2022-12-14 Thread Andrew Simmons
Here's another suggestion, not sure if it's any good, but you could structure your functions like parse_args <- function (envir = parent.frame()) { evalq(list(a = a, b = b, ..., y = y, z = z), envir) <...> } exported_fun <- function (a, b, ..., y, z) { parse_args() <...> } It's

Re: [R-pkg-devel] no visible binding for global variable ‘degree_C’ - CRAN check note

2022-12-10 Thread Andrew Simmons
You can declare degree_C as a variable before using set_units(): degree_C <- NULL set_units(T, degree_C) you could use globalVariables() somewhere at the top-level in your package: utils::globalVariables("degree_C") or you could supply degree_C as a literal character string: set_units(T,

Re: [R-pkg-devel] cross-ref possible ext.pkg's --not mentioned in DESCRIPTION file-- in non-code sections in .Rd files

2022-11-07 Thread Andrew Simmons
Packages in Suggests and Enhances do not create a circular dependency, only the packages in the Depends and Imports need to be installed at INSTALL and loaded at load time. Packages in Suggests and Enhances are only needed at check time, and even then it's more of a desire to be loaded than

[R-pkg-devel] Compiled code should not call non-API entry points in R

2022-11-03 Thread Andrew Simmons
Hi everyone, I had some R code for dealing with connections, and I was using summary.connection(). I rewrote it in C, so I was doing something more like: #include Rconnection Rcon = R_GetConnection(file); Rcon->description or Rcon->class but now, when checking my package, I get the following

Re: [R-pkg-devel] R Package AQLSchemes

2022-10-25 Thread Andrew Simmons
The capital does not matter for CRAN, packages may not be published if an existing package exists by the same name, regardless of case. Plus, the package at https://CRAN.R-project.org/package=AQLSchemes says the maintainer is John Lawson On Tue, Oct 25, 2022, 17:53 Rolf Turner wrote: > On

Re: [R-pkg-devel] R package build- C compilation issue related to math.h

2022-10-19 Thread Andrew Simmons
You could install VirtualBox if you wanted to test it yourself, or if you have the tarball available online somewhere, I can try building it. On Wed., Oct. 19, 2022, 19:57 Vincent Plagnol, wrote: > Dear all at R-package-devel, > > I am struggling with a R package build. > It builds fine on my

Re: [R-pkg-devel] Inquiry

2022-09-26 Thread Andrew Simmons
This issue isn't related to RStudio. The issue is that you're exporting an object without providing any documentation for it. It sounds like you don't want to export it, so you need to go to your NAMESPACE file and remove the part was export(r2). If you do want to export it, then you need to

Re: [R-pkg-devel] Using function with same name as argument as default argument

2022-08-08 Thread Andrew Simmons
Hello, This isn't something that can be fixed in the parser. If an argument isn't provided, its default value is evaluated inside the function, so it gives you a loop where schema = schema(x), but then what's schema, it's schema(x), thus the recursion error. you could do something like this:

Re: [R-pkg-devel] match.arg With S4 Methods and Missing Inputs

2021-11-07 Thread Andrew Simmons
>From the line `function(A, B) standardGeneric("SetOfParams")`, A and B will always have default values of R_MissingArg Providing default values within the methods does nothing since A and B have already been initialized before arriving at the method. You could do something like: if (missing(A))

Re: [R-pkg-devel] Is there a better way ...?

2021-10-21 Thread Andrew Simmons
appearance, they have nearly equivalent functionality and performance. On Thu, Oct 21, 2021 at 2:45 AM Rolf Turner wrote: > > On Thu, 21 Oct 2021 02:03:41 -0400 > Duncan Murdoch wrote: > > > On 21/10/2021 12:40 a.m., Andrew Simmons wrote: > > > I think the simplest answer i

Re: [R-pkg-devel] Is there a better way ...?

2021-10-20 Thread Andrew Simmons
I think the simplest answer is to store the variable in the functions frame. I'm assuming here that the only plot.foo needs access to .fooInfo, if not this can be changed. plot.foo <- function (...) { .fooInfo } environment(plot.foo) <- new.env() evalq({ .fooInfo <- NULL },

Re: [R-pkg-devel] if statements in NAMESPACE file

2021-09-30 Thread Andrew Simmons
command prompt, or via > cygwin, or in the console window of RStudio? > >> > >> This seems unstable to me. > > > >Sorry, too much context missing. What's unstable? > > > >Duncan Murdoch > > > >> > >> On September 30, 2021 11:52:16

Re: [R-pkg-devel] if statements in NAMESPACE file

2021-09-30 Thread Andrew Simmons
Hello, I'm updating my package 'this.path' which is supposed to retrieve the absolute path of the executing script when called. It's similar to 'here', except that 'here' constructs paths relative to a project directory, whereas 'this.path' constructs paths relative to script directories. I was

[R-pkg-devel] if statements in NAMESPACE file

2021-09-29 Thread Andrew Simmons
I noticed in the Writing R Extensions manual, it says that within a NAMESPACE file, "Only very simple conditional processing of if statements is implemented.". I tried it out myself by importing a Windows exclusive function: if (.Platform$OS.type == "windows") importFrom(utils,

Re: [R-pkg-devel] Workaround for code/documentation mismatch

2021-08-11 Thread Andrew Simmons
Hello, @Martin Maechler: %until% and %while% use R's builtin repeat function. Something like do(expr) %until% (cond) repeat { expr if (cond) break } are identical. After %until% and %while% check the arguments look correct, it makes a call to repeat like above and evaluates it

Re: [R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Andrew Simmons
usage documentation to have it look like do(expr) %while% (cond) If it helps at all with context, I'll provide the R and C scripts I'm using. On Tue, Aug 10, 2021 at 11:47 PM Hugh Parsonage wrote: > What is the behaviour of %while% if not preceded by an expression wrapped > in do() ? &

[R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Andrew Simmons
Hello, I've written two functions to emulate do while/until loops seen in other languages, but I'm having trouble documenting its usage. The function is typically used like: do ({ expr1 expr2 ... }) %while% (cond) so I want to document it something like: do(expr) %while% (cond)

[R-pkg-devel] Rcmd check and sourcing URL issues

2021-03-16 Thread Andrew Simmons
incompatible when sourcing URLs * return the URL from that source call Any help is greatly appreciated, thank you! Regards, Andrew Simmons [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.c

[R-pkg-devel] Complex Math Functions in C

2021-02-26 Thread Andrew Simmons
Hello, I've been trying to translate some of my slow R code into C code, and I need the complex math functions to be able to do this. I assumed I could access them with #include but it seems as though that file only contains the definition of structure Rcomplex. Any help accessing these