Re: [R-pkg-devel] Assignments to the global environment and use of on.exit

2021-06-25 Thread Siddhanta Phuyal
Hello, Thank You. It worked. The package has been submitted to CRAN. Thank You for your helpful feedback. On Tue, Jun 22, 2021 at 10:00 PM Oliver Madsen wrote: > The problem is solved by either > > 1) creating an environment variable within the package namespace (as you > would a function) usin

Re: [R-pkg-devel] Assignments to the global environment and use of on.exit

2021-06-22 Thread Oliver Madsen
The problem is solved by either 1) creating an environment variable within the package namespace (as you would a function) using new.env(). This can then be used instead of the global environment. 2) assigning variables to the namespace of the function running the shiny app. 1) is the second answ

Re: [R-pkg-devel] Assignments to the global environment and use of on.exit

2021-06-22 Thread Jeff Newmiller
Just don't. E.g. https://stackoverflow.com/questions/12598242/global-variables-in-packages-in-r On June 22, 2021 1:47:56 AM PDT, Siddhanta Phuyal wrote: > Hello, > >A few weeks ago, I submitted a package to CRAN. The automated system >rejected the package showing the following note: > >Found th

[R-pkg-devel] Assignments to the global environment and use of on.exit

2021-06-22 Thread Siddhanta Phuyal
Hello, A few weeks ago, I submitted a package to CRAN. The automated system rejected the package showing the following note: Found the following assignments to the global environment: File 'EuclideanSD/R/EuclideanSD.R': assign("nums", x, envir = globalenv()) Context of the problem: The p