Re: [R-pkg-devel] Scrapping R CRAN website from package

2021-07-19 Thread Maëlle SALMON via R-package-devel
Could pkgsearch http://r-hub.github.io/pkgsearch/ help with what you're doing, 
as it can queries all versions of CRAN packages? See 
http://r-hub.github.io/pkgsearch/reference/cran_package_history.html for the 
docs of the function cran_package_history().

It does not scrape CRAN pages, it uses an R-hub API (that gets the data from 
CRAN so similar to your idea of building a separate DB :-) ).

Maëlle.


Den lördag 17 juli 2021 02:21:55 CEST,  skrev: 





Maciej:

There are other packages that query the CRAN site (cranlogs, etc.).  So it
seems the queries/fetches are generally allowed.  I can only find a couple
relevant mentions in the CRAN policies:


"Packages which use Internet resources should fail gracefully with an
informative message if the resource is not available or has changed (and not
give a check warning nor error)."

"Downloads of additional software or data as part of package installation or
startup should only use secure download mechanisms (e.g., 'https' or
'ftps'). For downloads of more than a few MB, ensure that a sufficiently
large timeout is set."


So it seems like what you are trying to do would be OK with the appropriate
cautions in place.  Obviously any test cases are going to have to run fast,
or it will get rejected for being too slow to check.

Just my reading of the policies.  Have never tried it.

David


-Original Message-
From: R-package-devel  On Behalf Of
Maciej Nasinski
Sent: Friday, July 16, 2021 6:14 AM
To: r-package-devel@r-project.org
Subject: [R-pkg-devel] Scrapping R CRAN website from package

Dear Sir or Madam,

I am creating a new package `pacs` https://github.com/Polkas/pacs, which I
want to send to R CRAN shortly. However I am not sure about R CRAN policy
regarding scraping CRAN per package page with its archive.
More precisely I am fetching the data from
https://CRAN.R-project.org/package=%s and
https://cran.r-project.org/src/contrib/Archive/%s/ (downloading an old
tar.gz too).

Why I need this: I could read any DESCRIPTION files for any time point and
get a true dependency tree.  Moreover I could get a life duration of any
released package version, where shorter than 7 days are marked as risky. I
could compare a package min required dependencies difference before we
update it.  And much more.

I made a few notices like "Please as a courtesy to the R CRAN, don't
overload their server by constantly using this function." inside the
package.

Optionally If scrapping R CRAN from my package is a problem I will try to
build a separate DB with such data (updated everyday). Still any old tar.gz
has to be downloaded.

Maciej Nasinski, University of Warsaw

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Good practice for database with utf-8 string in package

2021-09-17 Thread Maëlle SALMON via R-package-devel
You could also try to submit the package to CRAN with a comment about the NOTE. 
There is interesting information in 
https://discuss.ropensci.org/t/note-on-utf-8-strings-by-goodpractice-gp/2165/

Good luck!

Ma\\u00eblle






Den fredag 17 september 2021 13:01:25 CEST, Enrico Schumann 
 skrev: 





On Fri, 17 Sep 2021, Marc Girondot via R-package-devel writes:

> I have posted this question first to r-h...@r-project.org and Bert Gunter 
> informs me that it was better for this discussion list that I didn't know.
>
> Hello everyone,
>
> I am a little bit stucked on the problem to include a database with
> utf-8 string in a package. When I submit it to CRAN, it reports NOTES
> for several Unix system and I try to find a solution (if it exists) to
> not have these NOTES.
>
> The database has references and some names have non ASCII characters.
>
> * First I don't agree at all with the solution proposed here:
>
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Encoding-issues
>
> "First, consider carefully if you really need non-ASCIItext."
>
> If a language has non ASCII characters, it is not just to make the
> writting nicer of more complex, it is because it changes the prononciation.
>
> * Then I try to find solution to not have these NOTES.
>
> For example, here is a reference with utf-8 characters
>
>> DatabaseTSD$Reference[211]
>
> [1] Hernández-Montoya, V., Páez, V.P. & Ceballos, C.P. (2017) Effects of
> temperature on sex determination and embryonic development in the
> red-footed tortoise, Chelonoidis carbonarius. Chelonian Conservation and
> Biology 16, 164-171.
>
> When I convert the characters into unicode, I get indeed only ASCII
> characters. Perfect.
>
>>  iconv(DatabaseTSD$Reference[211], "UTF-8", "ASCII", "Unicode")
>
> [1] "Hernndez-Montoya, V., Pez, V.P. & Ceballos, C.P.
> (2017) Effects of temperature on sex determination and embryonic
> development in the red-footed tortoise, Chelonoidis carbonarius.
> Chelonian Conservation and Biology 16, 164-171."
>
> Then I have no NOTES when I checked the package with database in UNIX...
> but how can I print the reference back with original characters ?
>
> Thanks a lot to point me to best practices to include databases with
> non-ASCII characters and not have NOTES while submitted package to CRAN.
>
> Marc
>

WRE in section 1.1.5 says:

  "Any byte will be allowed in a quoted character string but ‘\u’
    escapes should be used for non-ASCII characters. However, non-ASCII
    character strings may not be usable in some locales and may display
    incorrectly in others."

So you could try to use such escapes, e.g.

    stringi::stri_escape_unicode("Hernández-Montoya")
    ## [1] "Hern\\u00e1ndez-Montoya"


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] ERROR (re)building vignettes

2021-09-22 Thread Maëlle SALMON via R-package-devel
Dear Christine,

Looking at the chunk that causes the error 
https://github.com/cran/SleepCycles/blob/141186934418af387f0af257e3079af588e72844/vignettes/introduction.Rmd#L50-L56
 (via the CRAN mirror maintained by R-hub):

* You should not install packages from a vignette. You can add "eval=FALSE" as 
a chunk option.
* Regarding the other lines in that chunk, they do not provoke an error but are 
not recommended by all. See e.g. 
https://www.tidyverse.org/blog/2017/12/workflow-vs-script/

Good luck with re-submission!

Maëlle.




Den onsdag 22 september 2021 22:20:36 CEST, Blume Christine 
 skrev: 





Dear community,

When building my package 'SleepCycles' using devtools::check, 
devtools::check_win_devel, and devtools::check_rhub, I do not get warnings, 
errors, or notes. Nevertheless, there seems to be an error when building the 
vignettes eventually 
(https://cran-archive.r-project.org/web/checks/2021/2021-09-06_check_results_SleepCycles.html),
 which I did not notice and which led to the removal of the package.

Does anyone know how to solve this? I read something about changing the 
vignette engine, but when I tried this, I ran into other issues.

I cannot replicate the error, but simply resubmitting will most likely result 
in the same issue again.

Best,
Christine


    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Namespace is imported from in YAML header, but attracts Note that is is not imported from

2021-09-23 Thread Maëlle SALMON via R-package-devel
Hello,

It's better to get rid of this NOTE, by listing bookdown in VignetteBuilder and 
Suggests, not Imports see 
https://blog.r-hub.io/2020/06/03/vignettes/#infrastructure--dependencies-for-vignettes
 That's actually what you did in another package 
https://github.com/cran/gamclass/blob/master/DESCRIPTION (it's a coincidence I 
found a package of yours via code search in CRAN GitHub mirror :-) ).

Maëlle.


Den fredag 24 september 2021 03:00:57 CEST, John H Maindonald 
 skrev: 





On the Atlas and Linux builds of my package `qra` that has just been posted 
on CRAN, I am getting the message:

> Namespace in Imports field not imported from: ‘bookdown’
>  All declared Imports should be used.

This, in spite of the fct that the YAML header in two of the Rmd files for the 
vignettes has:

> output:
>  bookdown::html_document2:
>    theme: cayman

Do I need to worry about this?

John Maindonald
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
 

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Re :Re: Internet resources and Errors

2021-09-24 Thread Maëlle SALMON via R-package-devel
We've summarized some advice around graceful packages in this chapter of the 
HTTP testing in R book: https://books.ropensci.org/http-testing/graceful.html I 
hope this can help too! 
 
 
  Le ven., sept. 24, 2021 à 17:03, Ben Bolker a écrit:     I 
think you're not supposed to stop().

  You should just proceed with the other tests (skipping any 
tests/examples that depend on access to the inaccessible internet 
resources, or values derived from the failing call, to work)

  Does that help?

On 9/24/21 10:49 AM, Roy Mendelssohn - NOAA Federal via R-package-devel 
wrote:
> Hi All:
> 
> I am getting dinged again on CRAN  (just Solaris for some reason),  and the 
> problem is how to exit if there is a failure of accessing the resource,  I 
> know it has been discussed here before,  but I just am not understanding what 
> is desired to end properly. As I have been reminded:
> 
> 'Packages which use Internet resources should fail gracefully with an 
> informative message
> if the resource is not available or has changed (and not give a check warning 
> nor error).'
> 
> All internet calls are wrapped in 'try()'.  If that shows an error,  I  write 
> a message to the screen about the error,  and call stop(), perhaps with a 
> further message in that call.  Somehow this does not appear to meet the 
> standard.    Can someone then please tell me what I should do instead.  The 
> point is I have checked that the access to the internet resources has worked, 
>  i have seen that it hasn't,  now what should be the steps to take to exit 
> gracefully.
> 
> I also want to add to what others have said about the frustrations of dealing 
> with Solaris.  I have spent a fair amount of time getting things to  work 
> with Solaris which no one uses.  In this instance the package test is only 
> failing on Solaris.  Not a good use of limited time IMO.
> 
> Thanks for any advice.
> 
> -Roy
> 
> 
> 
> **
> "The contents of this message do not reflect any position of the U.S. 
> Government or NOAA."
> **
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> ***Note new street address***
> 110 McAllister Way
> Santa Cruz, CA 95060
> Phone: (831)-420-3666
> Fax: (831) 420-3980
> e-mail: roy.mendelss...@noaa.gov www: https://www.pfeg.noaa.gov/
> 
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected"
> "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 

-- 
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
Graduate chair, Mathematics & Statistics

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
  

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] CRAN review

2019-03-13 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 We at Locke Data have made an hourly updated dashboard based on the FTP server
CRAN incoming dashboard • cransays

| 
| 
|  | 
CRAN incoming dashboard • cransays


 |

 |

 |



We hope it makes data more accessible whilst reducing load on the FTP server.
Maëlle.

Den tisdag 12 mars 2019 21:37:12 CET, Henrik Bengtsson 
 skrev:  
 
 You can also "follow" your package submission on the CRAN FTP server:

  ftp://cran.r-project.org/incoming/

/Henrik

On Tue, Mar 12, 2019 at 1:26 PM Duncan Murdoch  wrote:
>
> On 12/03/2019 2:57 p.m., Τόλης Χαλκής wrote:
> > Dear all,
> >
> > We have submitted a package to CRAN in 25th of February and we have not got
> > a
> > positive or a negative answer for the submission since then. Is this
> > normal? Is
> > there any way to get informed for the review process?
>
> Did you get the two messages after submission (one to confirm that you
> are the maintainer, the second to let you know the review has started)?
> They'll both have subject lines like
>
> CRAN submission 
>
>
> The first one will start out saying something like
> >
> > Dear Duncan Murdoch
> > Someone has submitted the package rgl to CRAN.
> > You are receiving this email to confirm the submission as the maintainer of
> > this package.
>
> and then ask you to confirm submission.
>
> The second one will start like
>
> > [This was generated from CRAN.R-project.org/submit.html]
> >
> > The following package was uploaded to CRAN:
> > ===
> >
> > Package Information:
> > Package: rgl
>
> A while later you should get a third message about the automatic checks.
>
> Duncan Murdoch
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel  
[[alternative HTML version deleted]]

--- End Message ---
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] CRAN review

2019-03-13 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 Sorry, the link was removed (by my copy-pasting it wrongly): 
https://itsalocke.com/cransays/articles/dashboard

Den onsdag 13 mars 2019 08:54:00 CET, Maëlle SALMON via R-package-devel 
 skrev:  
 
  We at Locke Data have made an hourly updated dashboard based on the FTP server
CRAN incoming dashboard • cransays

| 
| 
|  | 
CRAN incoming dashboard • cransays


 |

 |

 |



We hope it makes data more accessible whilst reducing load on the FTP server.
Maëlle.

    Den tisdag 12 mars 2019 21:37:12 CET, Henrik Bengtsson 
 skrev:  
 
 You can also "follow" your package submission on the CRAN FTP server:

  ftp://cran.r-project.org/incoming/

/Henrik

On Tue, Mar 12, 2019 at 1:26 PM Duncan Murdoch  wrote:
>
> On 12/03/2019 2:57 p.m., Τόλης Χαλκής wrote:
> > Dear all,
> >
> > We have submitted a package to CRAN in 25th of February and we have not got
> > a
> > positive or a negative answer for the submission since then. Is this
> > normal? Is
> > there any way to get informed for the review process?
>
> Did you get the two messages after submission (one to confirm that you
> are the maintainer, the second to let you know the review has started)?
> They'll both have subject lines like
>
> CRAN submission 
>
>
> The first one will start out saying something like
> >
> > Dear Duncan Murdoch
> > Someone has submitted the package rgl to CRAN.
> > You are receiving this email to confirm the submission as the maintainer of
> > this package.
>
> and then ask you to confirm submission.
>
> The second one will start like
>
> > [This was generated from CRAN.R-project.org/submit.html]
> >
> > The following package was uploaded to CRAN:
> > ===
> >
> > Package Information:
> > Package: rgl
>
> A while later you should get a third message about the automatic checks.
>
> Duncan Murdoch
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel  
    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
  
[[alternative HTML version deleted]]

--- End Message ---
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How to debug CRAN errors?

2019-03-14 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 To follow up on the great answers regarding R-hub,- to use R-hub Linux Docker 
images you can use this brand-new rhub function 
https://r-hub.github.io/rhub/reference/local_check_linux.html (untested on 
Windows)- here's WIP R-hub docs entry about choosing a platform to reproduce an 
error https://docs.r-hub.io/#rhub-cran-platforms
Maëlle.




Den torsdag 14 mars 2019 08:48:34 CET, David Hugh-Jones 
 skrev:  
 
 Thank you! Got it. This should be close enough to CRAN, and there’s a
Docker image available too.

On Thu, 14 Mar 2019 at 00:40, Duncan Murdoch 
wrote:

> On 13/03/2019 8:34 p.m., David Hugh-Jones wrote:
> >
> > Hi guys
> >
> > That might be it. But there was no error until the latest release -
> > whereas that test has been there for 9 months. The file is written
> > within testthat... is there a new check for this in CRAN?
> >
> > Meanwhile, I am still figuring out how to debug this problem. I uploaded
> > to r-hub... does anyone know how I can access the artifacts created
> > after the build? The URL build was
> >
> >
> https://builder.r-hub.io/status/huxtable_4.4.0.tar.gz-b91485ad24b7a2f9c73bad2d51ebdb9d
>
> You should have got an email giving the link.  In the ones I've seen,
> you replace the prefix
>
> https://builder.r-hub.io/status/
>
> with
>
> https://artifacts.r-hub.io/
>
> and you'll see them.  It works for yours.
>
> Duncan Murdoch
>
> >
> > David
> >
> >
> >
> >      > By the way, I think your test test should write to a file in [a
> >      > subdirectory of]] tempdir(), not to a file in the current
> directory.
> >
> >    That could be the source of the error:  it's a violation of CRAN
> policy
> >    to write to the current directory.  An obvious way to test this
> >    would be
> >    to make it unwriteable.
> >
> >    Duncan Murdoch
> >
> >      >
> >      > comes from
> >      > Bill Dunlap
> >      > TIBCO Software
> >      > wdunlap tibco.com 
> >      >
> >      >
> >      > On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones
> >    mailto:davidhughjo...@gmail.com>>
> >      > wrote:
> >      >>
> >      >> Hi all,
> >      >>
> >      >> My package has errors on CRAN's Linux and Solaris:
> >      >>
> >      >>
> https://cran.r-project.org/web/checks/check_results_huxtable.html
> >      >>
> >      >> which I can't reproduce on my local OSX Machine, nor on Linux on
> >    Travis.
> >      >>
> >      >> Does anyone have any general hints on how to reproduce and/or
> >    debug such
> >      >> errors?
> >      >>
> >      >> Specifically the error relates to a call to
> openxlsx::saveWorkbook
> >      >> producing a message. openxlsx hasn't changed recently, though.
> >      >>
> >      >> Cheers,
> >      >> David
> >      >>
> >      >>          [[alternative HTML version deleted]]
> >      >>
> >      >> __
> >      >> R-package-devel@r-project.org
> >     mailing list
> >      >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >      >
> >      >      [[alternative HTML version deleted]]
> >      >
> >      > __
> >      > R-package-devel@r-project.org
> >     mailing list
> >      > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >      >
> >
>
> --
Sent from Gmail Mobile

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel  
[[alternative HTML version deleted]]

--- End Message ---
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Re :Re: Re :Re: package cartograflow_0.0.0.9000.tar.gz

2019-03-27 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 Hi,
To be able to run R CMD check on R devel, on top of your local checks, you 
might want to have a a look at the R-hub package builder that allows you to run 
R CMD check on several platforms (R versions, OS) for free. You can use the 
rhub package for that, https://r-hub.github.io/rhub/

In particular,- To get "--as-cran" for R CMD check you can set it as value of 
the check_args argument of rhub check functions. You can e.g. use 
rhub::check_with_rdevel(, check_args = "--as-cran")
- See also the shortcut check_for_cran() that'll send your package to a few 
platforms close to CRAN submission platforms, including one with R devel, with 
the "--as-cran" argument set by default. 
https://r-hub.github.io/rhub/articles/rhub.html#prepare-a-cran-submission
 

Maëlle.
   Den onsdag 27 mars 2019 12:56:53 CET, cartograf...@gmail.com 
 skrev:  
 
 Hi, thanks to your propositions and I will take into account.I make 
dev_tools::check directly in rstudio.
I would like to know if I can do R CMD directly in R interface with the command 
: #bash R-devel CMD check --as-cran cartograflow.tar.gzIt will be better 
Thanks Sylvain 

Envoyé depuis Yahoo Mail pour Android 
 
  Le mar., mars 26, 2019 à 22:42, Henrik Bengtsson 
a écrit :  FWIW, you should be able to reproduce at least the following NOTEs
with your current R 3.5.2 and R CMD check --as-cran:

* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘cartogRaflow ’

New submission

Version contains large components (0.0.0.9000)

Possibly mis-spelled words in DESCRIPTION:
  flowmapping (7:41)

Author field should be Authors@R.  Current value is:
  c(person("Françoise", "Bahoken", email =
"francoise.baho...@ifsttar.fr", role = c("cre","aut")),
            person("Sylvain", "Blondeau", email =
"blondeau.sylv...@yahoo.fr", role = c("aut"))

The Title field should be in title case. Current version is:
‘thematic cartography of flows and movements’
In title case that is:
‘Thematic Cartography of Flows and Movements’

Those are all classical mistakes ("we've all been there").  The
vignette errors may or may not be specific to R devel.

/Henrik

On Tue, Mar 26, 2019 at 2:29 PM cartograf...@gmail.com
 wrote:
>
> Hi,  l've made R CMD check --as-cran on rstudio 3.5.2Why I have to use 
> r-devel?
> I confirm that I didn't received à error message when I've made 
> dev_tool::check.
> How can I solve my problem ?
> Thanks in advance Sylvain
>
>
> nvoyé depuis Yahoo Mail pour Android
>
>  Le lun., mars 25, 2019 à 23:38, Uwe Ligges 
>a écrit :  I cannot beloeve it. But this is certainly not R-devel?
>
> Not sure about devtools which we do not use on CRAN, but simply
>
> R CMD check --as-cran
>
> with a recent R-devel  version on the package tarball should reproduce
> the findings.
>
> Best,
> Uwe Ligges
>
>
> On 25.03.2019 23:12, cartograf...@gmail.com wrote:
> > Hello,
> > I've submitted my package cartograflow and I received an email from your 
> > teeam that it does not pass the incoming checks automatically.Debian: 
> > 
> > Status: 1 ERROR, 2 WARNINGs, 1 NOTE
> >
> > So, I've made the new check on my plateform (linux ubuntu) and the check is 
> > OK.I used : ==> devtools::check(args = c('--no-manual','--as-cran'))Status 
> > is :
> > ── R CMD check results  cartograflow 0.0.0.9000 
> > 
> > Duration: 54.6s
> > 0 errors ✔ | 0 warnings ✔ | 0 notes ✔
> > R CMD check succeeded
> > Can you  help me to fix the problem?
> > Thanks in advance to your replySylvain
> >    [[alternative HTML version deleted]]
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
>
>        [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel  

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel  
[[alternative HTML version deleted]]

--- End Message ---
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Re :Re: Re :Re: package cartograflow_0.0.0.9000.tar.gz

2019-04-04 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 I'd recommend reading https://r-pkgs.org/description.html#dependencies (and 
the rest of the book is very good as well), it'll help you understand why and 
how to declare dependencies.




Den torsdag 4 april 2019 17:05:02 CEST, cartograf...@gmail.com 
 skrev:  
 
 How I can declare the dependencies in DESCRIPTION file?
 depends: library(dplyr,dependencies =TRUE)
Thanks 
Envoyé depuis Yahoo Mail pour Android 
 
  Le jeu., avr. 4, 2019 à 14:42, Uwe Ligges a 
écrit :   or forgot to declare a dependency on that package in the 
DESCRIPTION file...

Best,
Uwe Ligges

On 04.04.2019 13:34, Sebastian Meyer wrote:
> There are probably no clairvoyants around here. So, again, without
> access to the up-to-date source code of your package, nobody will be
> able to help.
> 
> "there is no package called ..." means that the given package is not
> installed in any of the libraries currently in use by R (see .libPaths()
> for the relevant paths). Maybe you have installed "dplyr" in a library
> used by your standard R installation, but not in any library used by
> your R-devel installation (which you seem to use for checking the
> package)? Just a wild guess.
> 
> 
> Am 04.04.19 um 13:14 schrieb cartograf...@gmail.com:
>> I follow up your recommendation and for the moment I didn't used
>> "conflicted".
>>
>> So, I've made the nex R CMD check and I have the problem
>> Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =
>> vI[[i]]) :
>>    there is no package called ‘dplyr’
>>
>> How I can  solve this issue?
>>
>> Thanks in advance
>>
>> Le jeudi 4 avril 2019 à 08:22:26 UTC+2, Sebastian Meyer
>>  a écrit :
>>
>>
>> Note that output concerning masked objects are just messages which do
>> not cause your vignette to fail. So it is not stricly necessary to start
>> working on these conflicts now.
>>
>> However, looking closely at the win-builder check results
>> (https://win-builder.r-project.org/incoming_pretest/cartograflow_0.0.0.9000_20190324_230822/Windows/00check.log),
>> I see the following output below these messages
>>
>>> Warning in eval(expr, envir, enclos) : NAs introduced by coercion
>>> Quitting from lines 529-573 (cartograflow.Rmd)
>>> Error: processing vignette 'cartograflow.Rmd' failed with diagnostics:
>>> argument is of length zero
>>
>> So the problem actually is in lines 529-573 of the cartograflow.Rmd
>> vignette (at least in the version submitted to win-builder a few weeks ago).
>>
>> Running tools::buildVignette("cartograflow.Rmd") locally, I see
>>
>>> Error in if (horiz) { : argument is of length zero
>>
>> and the subsequent traceback() shows that the error originates from
>>
>>> layoutLayer(title = "Professional mobility in Greater Paris",
>>>          coltitle = "black", author = "Cartograflow, 2019", sources =
>> "Sources : data : INSEE, RP, MOBPRO, 2017 ; basemap : IGN, APUR, UMS
>> 2414 RIATE, 2018.",
>>>          scale = 0.2, tabtitle = TRUE, frame = TRUE, north(pos =
>> "topright"),
>>>          col = "grey")
>>
>> So it seems to me that the unnamed argument 'north(pos = "topright")' is
>> wrongly matched to the "horiz" argument of layoutLayer().
>>
>> Cheers,
>>
>>      Sebastian
>>
>>
>> Am 04.04.19 um 07:20 schrieb cartograf...@gmail.com
>> :
>>>
>>> Hi,I don't know if my explanations are clear.I tried several way to
>> solve this problem w/o success. Someone have an idea ?Thanks in advance
>>>
>>> On 2019-04-03 2:11 p.m., cartograf...@gmail.com
>>  wrote:
    Hi,

 I come back to you  because I have always the problem with
>> devtools::check of my package.

 I used the command to check my package with R-devel :
 sylvain@sylvain :~/svn$ bash R-devel.sh CMD
>> check --as-cran
>> /home/sylvain/work/12_R_studio/package/cartograflow_0.0.0.1.tar.gz

 When I start the rmd file there is a warning due to package dplyr :
  Attaching package: 'dplyr'
  The following objects are masked from 'package:stats':
      filter, lag
  The following objects are masked from 'package:base':
      intersect, setdiff, setequal, union

 The solve this issue I added in rmd file, description file and the
>> namespace the package conflicted.
 So, the package conflicted avoid to have this warning.

 But when I run R-devel CMD check I have a new issue that is Error in
>> loadNamespace...no package called ‘conflicted’ (see below)

 Can you help me to solve this issue if tit's possible?
 Thanks in advance to your help !
 Sylvain
 -
 Below extract of 00check.log
 * checking whether package ‘cartograflow’ can be installed ... ERROR
 Installation failed.
 See ‘/home/sylvain/svn/cartograflow.Rcheck/00install.out’ for details.
 * DONE
 Status: 1 ERROR, 1 NOTE

 Below 00install.out
 * installing *source* p

[R-pkg-devel] Blog post about R-package-devel

2019-04-11 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
Dear R-package-devel subscribers,

We've just published a post about how to get help with R package development on 
R-hub blog.

https://blog.r-hub.io/2019/04/11/r-package-devel/

It features this mailing list and its archives quite prominently.

Thanks to the maintainers and contributors of R-package-devel for providing 
such an useful venue!

Best wishes

Maëlle.

[[alternative HTML version deleted]]

--- End Message ---
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package dependency graphs of packages in development (local)

2019-05-09 Thread Maëlle SALMON via R-package-devel
--- Begin Message ---
 Could https://github.com/jimhester/itdepends help?
Maëlle.
   Den torsdag 9 maj 2019 12:10:14 CEST, Rainer M Krug  skrev: 
 
 
 Thanks Gabor. 

This gives me an impressive long list. Is there a way to see this graphically? 
Parsing seems to be a long, tedious process.

I want to identify packages which I should leave out to reduce the number of 
(indirect) dependencies.

Rainer


> On 9 May 2019, at 11:24, Gábor Csárdi  wrote:
> 
> You can do something like this with https://github.com/r-lib/pkgdepends:
> 
> pr <- pkgdepends::remotes()$new("local::.", library = tempfile())
> #> ℹ Creating library directory:
> `/var/folders/59/0gkmw1yj2w7bf2dfc3jznv5wgn/T//Rtmpo5NL9R/filee95427c73f55`
> 
> pr$solve()
> #> ℹ Checking for package metadata updates
> #> ✔ All 10 metadata files are current.
> #> ✔ Using session cached package metadata
> #> ✔ Using cached package metadata
> #> PKG SOLUTION, 1 refs, resolved in 1.2s, solved in 193ms
> ───
> #>  local::.
> #> Dependencies:
> #>  github:
> #>    r-lib/crancache, r-lib/rcmdcheck
> #>  standard:
> #>    askpass, assertthat, backports, base64enc, bit, bit64, blob, callr,
> #>    cli, clisymbols, cranlike, crayon, curl, DBI, debugme, desc,
> #>    digest, evaluate, fansi, glue, gmailr, highr, hms, httr, jsonlite,
> #>    knitr, magrittr, markdown, memoise, mime, openssl, parsedate,
> #>    pillar, pkgbuild, pkgconfig, prettyunits, processx, progress, ps,
> #>    R6, rappdirs, Rcpp, rematch2, remotes, rlang, rprojroot, RSQLite,
> #>    sessioninfo, stringi, stringr, sys, tibble, utf8, whoami, withr,
> #>    xfun, xopen, yaml
> 
> tibble::as_tibble(pr$get_solution()$data)
> #> # A tibble: 61 x 27
> #>    ref  type  direct status package version license
> needscompilation priority
> #>                            
> #>  1 loca… local TRUE  OK    revdep… 1.0.0.… MIT + … NA              NA
> #>  2 askp… stan… FALSE  OK    askpass 1.1    NA      FALSE            NA
> #>  3 asse… stan… FALSE  OK    assert… 0.2.1  NA      FALSE            NA
> #>  4 back… stan… FALSE  OK    backpo… 1.1.4  NA      FALSE            NA
> #>  5 base… stan… FALSE  OK    base64… 0.1-3  NA      FALSE            NA
> #>  6 bit64 stan… FALSE  OK    bit64  0.9-7  NA      FALSE            NA
> #>  7 bit  stan… FALSE  OK    bit    1.1-14  NA      FALSE            NA
> #>  8 blob  stan… FALSE  OK    blob    1.1.1  NA      FALSE            NA
> #>  9 callr stan… FALSE  OK    callr  3.2.0  NA      FALSE            NA
> #> 10 cli  stan… FALSE  OK    cli    1.1.0  NA      FALSE            NA
> #> # … with 51 more rows, and 18 more variables: md5sum , sha256 ,
> #> #  filesize , built , platform , rversion ,
> repodir ,
> #> #  target , deps , mirror , sources , remote ,
> #> #  error , metadata , extra , dep_types ,
> #> #  cache_status , lib_status 
> 
> And the `deps` column there shows the direct dependencies of the dependencies:
> 
> ❯ pr$get_solution()$data$deps[1:2]
> #> [[1]]
> #> # A tibble: 25 x 5
> #>    ref            type    package    op    version
> #>                       
> #>  1 assertthat      Imports assertthat ""    ""
> #>  2 callr          Imports callr      ""    ""
> #>  3 cli            Imports cli        ""    ""
> #>  4 clisymbols      Imports clisymbols ""    ""
> #>  5 r-lib/crancache Imports crancache  >=    0.0.0.9001
> #>  6 crayon          Imports crayon    ""    ""
> #>  7 DBI            Imports DBI        ""    ""
> #>  8 desc            Imports desc      >=    1.1.1.9002
> #>  9 glue            Imports glue      ""    ""
> #> 10 gmailr          Imports gmailr    ""    ""
> #> # … with 15 more rows
> #>
> #> [[2]]
> #> # A tibble: 2 x 5
> #>  ref      type    package  op    version
> #>               
> #> 1 testthat suggests testthat ""    ""
> #> 2 sys      imports  sys      >=    2.1
> 
> Gabor
> 
> On Thu, May 9, 2019 at 8:53 AM Rainer M Krug  wrote:
>> 
>> Hi
>> 
>> I am quite sure, there was a recent discussion about dependency graphs of 
>> packages. I saw the post from Dirk at 
>> http://dirk.eddelbuettel.com/blog/2018/02/28/#017_dependencies but 
>> `tools::package_dependencies()` does only work on packages on CRAN.
>> 
>> But my package is not yet on CRAN (but on GitHub and a drat repo), and I 
>> would like to look at the package dependencies BEFORE submitting to CRAN.
>> 
>> Is there a tool which allows me to plot a dependency graph for my local 
>> package?
>> 
>> Thanks,
>> 
>> Rainer
>> 
>> 
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>> UCT), Dipl. Phys. (Germany)
>> 
>> Orcid ID: -0002-7490-0066
>> 
>> Department of Evolutionary Biology and Environmental Studies
>> University of Zürich
>> Office Y34-J-74
>> Winterthurerstrasse 190
>> 8075 Zürich
>> Switzerland
>> 
>> Office: +41 (0)44 635 47 64
>> Cell:          +41 (0)78 630 66 57
>> email:      rainer.k...@uzh.ch
>>                rai...@krugs.de
>> Skype:    RMkrug
>> 
>> PGP: 0x0F52F982
>> 
>> _

Re: [R-pkg-devel] Error while checking if Pandoc is available

2019-12-10 Thread Maëlle SALMON via R-package-devel
Furthermore, I think you can simply use 
rmarkdown::pandoc_available("1.12.3") to answer both questions (is pandoc 
available, is the particular version or a later version available).

Maëlle.


Den fredag 6 december 2019 17:30:28 CET, Henrik Bengtsson 
 skrev: 





Hugh is correct. To clarify, update

if (!rmarkdown::pandoc_available() || rmarkdown::pandoc_version() < "1.12.3") {
  stop("'brinton' requires Pandoc v < 1.12.3 (https://pandoc.org/)")
}

The reason is that when using 'a || b', expression 'b' will NOT be
evaluated if 'a' is not TRUE.  In contrast, when you use 'a | b',
expression 'b' will be evaluated regardless of outcome of 'a'.

A good rule of thumb is: If you expect your OR or AND statements to
give a single/scalar TRUE of FALSE, use || or &&.  This is commonly
used in if(), and while() conditions.

/Henrik

On Fri, Dec 6, 2019 at 4:18 AM Hugh Parsonage  wrote:
>
> Change | to ||
>
> On Fri, 6 Dec 2019 at 11:08 pm, Pere Millan Martinez 
> wrote:
>
> > Yesterday the publication of the new brinton package war archived
> > (https://cran.r-project.org/web/packages/brinton/index.html) because the
> > following line produces the following error:
> >
> > if(rmarkdown::pandoc_available() == FALSE | rmarkdown::pandoc_version()
> > < "1.12.3") {stop("'brinton' requires Pandoc v < 1.12.3
> > (https://pandoc.org/)")}
> >
> > Error in if (rmarkdown::pandoc_available() == FALSE |
> > rmarkdown::pandoc_version() <:
> > argument is of length zero
> >
> > The checks of the knitr package produce similar errors
> > (https://cran.r-hub.io/web/checks/check_results_knitr.html) but knitr is
> > available in CRAN (furtunatelly).
> > Also, I have been punished by prof. Brian Ripley so I can not resubmit
> > the package until January.
> >
> > Do you have any clue about how to fix this? Does to punish rookies have
> > sense in this case?
> >
> > Thanks in advance,
> > -Pere Millán
> >
> >
> >
> > On 10/11/2019 11:31, Pere Millan Martinez wrote:
> > > Hello,
> > >
> > > I'm trying to submit a first version of the brinton package but the
> > > CRAN-pretest on Debian produces the following NOTE:
> > >
> > > Check: for detritus in the temp directory, Result: NOTE
> > >    Found the following files/directories      :
> > >      ‘calibre_4.2.0_tmp_BPGKxL’ ‘calibre_4.2.0_tmp_D8BXMj’
> > >      ‘calibre_4.2.0_tmp_M8RU75’ ‘calibre_4.2.0_tmp_TipWj0’
> > >      ‘calibre_4.2.0_tmp_f0mVQS’ ‘calibre_4.2.0_tmp_fHEPce’
> > >      ‘runtime-hornik’
> > >
> > > The 'brinton' package stores files in the temporary folder (which I
> > > think is ok) but I can not figure out
> > > the relationship between the files that are stored with
> > > 'calibre_4.2.0'. Is this note a false positive or this
> > > is something that I should fix prior to submit?
> > >
> > > Thank you,
> > > Pere Millán-Martínez
> >
> >        [[alternative HTML version deleted]]
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel

> >
>
>        [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Documentation for non-user-level objects

2020-05-11 Thread Maëlle SALMON via R-package-devel
I see you already got useful answers, but here is a further resource: I wrote a 
blog post about internal functions earlier this year 


Best wishes

Maëlle.


Den söndag 10 maj 2020 23:32:00 CEST, Sapphire Zhou 
 skrev: 





I met a problem when I uploaded the package to CRAN. There is a warning told me 
“All user-level objects in a package should have documentation entries.”

Actually, those functions are not user-level functions. How could I claim 
non-user-level functions in an R package.
Is there any idea to remove this warning.

Thanks!
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] CensSpatial package error.

2020-05-12 Thread Maëlle SALMON via R-package-devel
I just wanted to add that 

 is an interesting read on the topic. :-)



Den lördag 2 maj 2020 18:27:29 CEST, Max Turgeon  
skrev: 





Hi Jos�,

The error message is pretty clear:

Error in if (class(V.inv) == "try-error") return(Inf) :
  the condition has length > 1

Instead of testing for equality of the class, you should use the function 
"inherits". Then, even if "class(V.inv)" has length greater than one, your 
condition in the if clause will be exactly TRUE or FALSE.

Best,

Max Turgeon

On May 2, 2020 10:07 AM, Jos� Alejandro Ordo�ez 
 wrote:

Caution: This message was sent from outside the University of Manitoba.


Good evening,

My name is Jose and I'm the mantainer of the CensSpatial package. This
package was available as public but it was discharged because a problem
with the geoR orphan package.
That situation was solved and now I'm trying to resubmit the package. The
problem is that when I try to submit it, it does not pass the automatic
incoming checks,* even when I tested it using the function check available
in R studio without errors.*
Apparently is a problem with the OS Linux and Debian but I couldn't
identify it yet. I also tested it using the package rhub and ran
CensSpatial with different OS without results.

I'm provinding below the link to the source package and the error messages,
hoping to get some help from you.

https://www.dropbox.com/sh/gp5iwubkgbv9r8s/AADvJg-GGHKzoMU_PHNWdcYea?dl=0



In the link below, I cannot recognize what the error is. SOS!

https://win-builder.r-project.org/incoming_pretest/CensSpatial_2.5_20200428_224633/Debian/00check.log



Thanks for the attention.


Att,
Jos� Alejandro Ordo�ez.
Ph.D Student
UNICAMP.



Libre
de virus. www.avast.com

<#m_2258293037509368237_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

        [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


    [[alternative HTML version deleted]]
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Documenting raw data

2020-05-12 Thread Maëlle SALMON via R-package-devel
Hello,

I don't think you have to (and shouldn't?) document raw data. However, you can 
use it in examples/tests/etc. using the system.file() command you mention.

But maybe you want to export the data? In that case it should be under data/.

This chapter of the R packages book might be useful 
 (as well as 
).

Maëlle.


Den torsdag 23 april 2020 23:06:26 CEST, Cantin, Alan (NRCan/RNCan) 
 skrev: 





Hi Folks,

Looking for some help documenting my raw data (data in inst/extdata).

Is the correct doctype "data"?

The usage of loading this type of data is system.file("extdata", nameoffile, 
package="nameofpackage")

Is this the correct string to put in the \usage section?  I have tried this, 
but get errors such as:

Functions or methods with usage in documentation object 'nameoffile' but not in 
code:
    'system.file'


Has anyone done this recently and have an example to see where I'm going wrong?

This check seems to be new as in the past I simply had lazydata set to true and 
it passed tests.

Thanks for any help.

Cheers,

Alan Cantin



    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Including fonts in an rmarkdown vignette

2020-06-03 Thread Maëlle SALMON via R-package-devel
Hi,

I've recently seen an example of a package that provides its own fonts for a 
vignette. See links in 
https://blog.r-hub.io/2020/06/03/vignettes/#pretty-vignettes 


In that same post I link to a workaround I saw on this list 
https://www.mail-archive.com/r-package-devel@r-project.org/msg02921.html for 
changing the vignette format based on the versions of dependencies. Maybe 
something similar is possible for fonts (I have no idea).

Maëlle.

Den tisdag 2 juni 2020 20:14:24 CEST, David Hugh-Jones 
 skrev: 





Hi,

I'd like to build a rmarkdown vignette with my own choice of fonts – I'm
pernickety about look and feel.

R CMD check will rebuild vignettes in the vignettes/ directory, and if
relevant fonts aren't on the build machine, it'll give a warning.

Here are the options I can think of:
* build vignettes on my machine and put them in inst/doc. Don't mention the
specific fonts in the Rmd file in vignettes/. So the file built by "R CMD
check" won't look quite like the pre-built version.  This might work, but
it seems against open source principle.
* put font files in vignettes/ and refer to them in the rmarkdown file. I'm
not sure how to do this.
* limit myself to the fonts preinstalled on win-builder or CRAN machines.
I'm not sure what these are

Has anyone got any advice or examples?

Cheers,
David

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Proper CRAN way - How to handle dependency of java jar file?

2020-07-12 Thread Maëlle SALMON via R-package-devel
Regarding where to save the jar file, you might be interested in "app dirs" 
(via tools::R_user_dir() in R from 4.0, the rappdirs package, the hoardr 
package) cf 
https://blog.r-hub.io/2020/03/12/user-preferences/#not-so-temporary-files3

Maëlle.

Den tisdag 23 juni 2020 14:56:30 CEST, Rainer M Krug  skrev: 





Thanks Duncan.

> On 23 Jun 2020, at 14:35, Duncan Murdoch  wrote:
> 
> Your assumption that .jar files are not allowed is wrong:  a number of 
> packages contain them:  rscala, J4R, Rbgs, bartMachine, OpenStreetMap, ...  
> There's a specific mention about how to include them in the CRAN policy 
> document:

That’s good to know.

> 
> "For Java .class and .jar files, the sources should be in a top-level java 
> directory in the source package (or that directory should explain how they 
> can be obtained)."

So a tet file in the inst/jar directory giving the link to the GitHub repo 
would be fine in this case?

> 
> If you still decide not to include your .jar file (maybe it is too big, for 
> example),


I guess it would be stretching it a bit, as the jar file is 8.2 MB, and 
plantuml has regular continuous updates, so I would prefer to keep it dynamic.


> then I think your option 1 is unusable for those people who can't write to 
> the library location because of permission problems. (Admin privileges are 
> often necessary to install packages in the main library.)  Generally I think 
> everyone can install packages somewhere, but users do really get confused 
> when they have multiple library locations, possibly each containing a 
> different version of a package.

So the suggested option would be to have a function, which 
1) ask the user to create a directory in the home folder 
2) download the jar file into that directory or, when no permission is granted, 
into the tmpdir()

Thanks, no major changes necessary for that,

Rainer


> 
> Duncan Murdoch
> 
> On 23/06/2020 8:18 a.m., Rainer M Krug wrote:
>> Hi
>> I have a package called `plantuml` (https://github.com/rkrug/plantuml) which 
>> converts plantuml code to UML graphs. It uses for this the java program 
>> https://plantuml.com which is Open Source.
>> As it is not allowed to distribute a binary with an R package, I use the 
>> approach of a function which downloads the jar file into the directory 
>> `system.file("jar/plantuml.jar", package = "plantuml”)`.
>> This works nicely, and at the moment, the function is called automatically 
>> before the plantuml.jar is used.
>> Now I would like to submit the package to CRAN. I can’t find the guidelines 
>> anymore, so I am asking here:
>> What is the appropriate way of handling this?
>> I can think of a at least two ways of making it obvious to the user, that a 
>> binary is downloaded:
>> 1) if the file plantuml.jar is not present, ask the user to run the function 
>> `updatePlantumlJar()` which downloads the jar to the original location in 
>> the package directory
>> 2) tell the user to download the file manually and to put it somewhere, 
>> where the package will find it
>> I would prefer the first version, as the plantuml.jar would be in the 
>> package directory, where usually nobody but the package is doing stuff.
>> Any suggestions on how I could make this “CRAN conform”?
>> Thanks a lot,
>> Rainer
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>> UCT), Dipl. Phys. (Germany)
>> Orcid ID: -0002-7490-0066
>> Department of Evolutionary Biology and Environmental Studies
>> University of Zürich
>> Office Y34-J-74
>> Winterthurerstrasse 190
>> 8075 Zürich
>> Switzerland
>> Office:    +41 (0)44 635 47 64
>> Cell:          +41 (0)78 630 66 57
>> email:      rainer.k...@uzh.ch
>>         rai...@krugs.de
>> Skype:    RMkrug
>> PGP: 0x0F52F982
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>> UCT), Dipl. Phys. (Germany)
>> Orcid ID: -0002-7490-0066
>> Department of Evolutionary Biology and Environmental Studies
>> University of Zürich
>> Office Y34-J-74
>> Winterthurerstrasse 190
>> 8075 Zürich
>> Switzerland
>> Office:    +41 (0)44 635 47 64
>> Cell:          +41 (0)78 630 66 57
>> email:      rainer.k...@uzh.ch
>>         rai...@krugs.de
>> Skype:    RMkrug
>> PGP: 0x0F52F982
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office:    +41 (0)44 635 47 64
Cell:          +41 (0)78 630 66 57
email:      rainer.k...@uzh.ch
        rai...@krugs.de
Skype:    RMkrug

PGP: 0x0F52F982




    [[alternative HTML version deleted]]


__
R-package-devel@r-project.org mailing list
https://

Re: [R-pkg-devel] Interpret feedback: not write testthat-tests in examples

2020-07-17 Thread Maëlle SALMON via R-package-devel
If you do want to communicate around tests a bit more, without cluttering the 
manual, you might find the covrpage package interesting 
https://yonicd.github.io/covrpage/ 
It creates a README in the tests folder, with test results, and it can create a 
vignette with the same content.
 
  On dj., jul. 16, 2020 at 19:40, Henrik Bengtsson 
wrote:   If the point of having, say,

stopifnot(add(1, 2) == sum(c(1, 2))

is to make it explicit to the reader that your add() function gives
the same results as sum(), then I argue that is valid to use in an
example.  I'm pretty sure I've used that in some of my examples.  For
the purpose, there should be no reason why you can't use other
"assert" functions for this purpose, e.g.

testthat::expect_equal(add(1, 2), sum(c(1, 2))

Now, if the point of your "assert" statement is only to validate your
package/code, then I agree it should not be in the example code
because it adds clutter.  Such validation should be in a package test.

So, if the former, I suggest you reply to the CRAN Team and explain this.

/Henrik

On Thu, Jul 16, 2020 at 6:28 AM Richel Bilderbeek
 wrote:
>
> Dear R package developers,
>
> I would enjoy some help regarding some feedback I got on my package from a 
> CRAN volunteer, as I am unsure how to interpret this correctly.
>
> This is the feedback I got (I added '[do]'):
>
> > Please [do] not write testthat-tests in your examples.
>
> I wonder if this is about using `testthat` or using tests in general.
>
> To simplify the context, say I wrote a package with a function called `add`, 
> that adds two numbers. My example code would then be something like this:
>
> ```
> library(testthat)
>
> expect_equal(add(1, 2), 3)
> ```
>
> The first interpretation is about using `testthat`: maybe I should use base R 
> (`stopifnot`) or another testing library (`testit`) or hand-craft it myself?
>
> The second interpretation is about using tests in example code. I like to 
> actively demonstrate that my code works as expected. I checked the policies 
> regarding examples, and I could not find a rule that I should refrain from 
> doing so.
>
> What is the correct response to this feedback?
>
> Thanks for your guidance, Richel Bilderbeek
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
  

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] (no subject)

2020-10-19 Thread Maëlle SALMON via R-package-devel
Hello,

Usually such problems with pkgdown will come from your pkgdown configuration. I 
see (thanks to a search engine :-) and sorry if my search result is wrong ) 
that you actually write to exclude all articles

* your configuration 
https://github.com/maRce10/warbleR/blob/7c313bd4388c908df9055a952badca8605b75468/pkgdown/_pkgdown.yml#L4
 (btw you also have a file called pkgdown.yml there, that is probably useless?)
* documentation of how to configure the articles index 
https://pkgdown.r-lib.org/reference/build_articles.html#index-and-navbar
So you'll need to either remove the "articles" field from your configuration 
(to use the default ordering etc.) or add more information to it, following the 
docs.

As to why this did not happen before, I'd assume it is the articles index was 
added fairly recently 
https://www.tidyverse.org/blog/2020/03/pkgdown-1-5-0/#articles

Best wishes

Maëlle.

PS: For questions directly related to pkgdown I'd tend to rather post on 
https://community.rstudio.com/c/package-development/11


Den måndag 19 oktober 2020 02:06:38 CEST, Marcelo Araya Salas 
 skrev: 





Hi all

Hi all,

I got this warning message when I run pkgdown::build_site()


Warning: Vignettes missing from index:  (all the vignette names here)

And then the vignettes are not included in the package website

This didn't happen before. Does anyone know how to avoid this?

Thanks!


Marcelo

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] URLencode at DESCRIPTION file and citation()

2020-11-03 Thread Maëlle SALMON via R-package-devel
Hello,

1) I found (via GitHub search for DOIs in DESCRIPTION files 
https://github.com/search?q=org%3Acran+%3Cdoi+user%3Acran+filename%3ADESCRIPTION&type=Code&ref=advsearch&l=&l=)
 a package with an URL-encoded DOI see 
https://github.com/cran/clust.bin.pair/blob/e464ac7e5d094bffd25b7c4cbba67820b60f1cc1/DESCRIPTION
 and the resulting CRAN page 
https://cran.r-project.org/web/packages/clust.bin.pair/index.html So I think 
you are right to use URL encoding.

I can reproduce the problem you get with the roxygen2-generated package-level 
manual page. The problem is that when going from Rd to HTML, the parts after 
"%" are ignored indeed. I'm not sure at what level this should be fixed. I 
opened an issue in roxygen2 https://github.com/r-lib/roxygen2/issues/1164 I 
hope others will have more useful answers. :-)

2) For that aspect I looked into a CITATION file I knew 
https://github.com/ropensci/bomrang/blob/master/inst/CITATION

For finding the version it uses meta$Version. So your CITATION could e.g. become

citHeader("To cite raytracing in publications use at least the first, if not 
both:")

year <- sub("-.*", "", meta$Date)
note <- sprintf("R package version %s", meta$Version)

citEntry(entry = "manual",
   title  = "raytracing: An R package for identification and tracking 
the atmospheric Rossby waves",
   author = personList(c(person("Amanda", "Rehbein"),
    person("Tercio", "Ambrizzi"),
    person("Sergio", "Ibarra-Espinosa"),
    person("Livia M. M.", "Dutra"))),
   year   = year,
   url    = "https://github.com/salvatirehbein/raytracing";,
   note  = note,
   textVersion  =
   paste0("Rehbein, A., Ambrizzi, T., Ibarra-Espinosa, S., Dutra, L. M. M.: 
Rossby Wave Ray Tracing v", meta$Version, ". 
https://github.com/salvatirehbein/raytracing, ", year,".")
)

citation(auto = meta)

citFooter("Thanks")

Maëlle.


Den söndag 1 november 2020 21:29:54 CET, Amanda Rehbein  
skrev: 





Dear R-Devs,

I was wondering if someone could please help me to with two errors when
submitting a package to CRAN.

1) At the DESCRIPTION file I added some DOI's with curled brackets "<>"
inside the "<>" (e.g. 2.0.CO;2>).
I tried URLencode() the string in R and copy/paste the output into
the DESCRIPTION file, like this:
. But when I load,
build, check, etc, and ?raytracing the DOI does not appear correctly.
Everything after the first "%" disappeared and obviously, the DOI doesn't
work anymore.


2) I have a CITATION file at the sub-directory ins. Its content is like
this:

citHeader("To cite raytracing in publications use one of below:")

citEntry(entry = "manual",
  title          = "Atmospheric Rossby waves identification and tracking
with a raytracing numerical model",
  author        = personList(c(person("Amanda", "Rehbein"),
                    person("Tercio", "Ambrizzi"),
                    person("Sergio", "Ibarra-Espinosa"),
                    person("Livia M. M.", "Dutra"))),
  year          = "2020",
  url            = "https://github.com/salvatirehbein/raytracing";,

  textVersion  =
  paste0("Rehbein, A., Ambrizzi, T., Ibarra-Espinosa, S., Dutra, L. M. M.:
Atmospheric Rossby waves identification and tracking with a raytracing
numerical model ", packageVersion("raytracing"), ".
https://github.com/salvatirehbein/raytracing, 2020.")
)

It passes all checks and gives a-okay citation when I type
citation("raytracing"). However, it fails in the CRAN tests with the
following error message.

Reading CITATION file fails with
    there is no package called 'raytracing'
  when package is not installed.

I will be very thankful for any help with this! Best,
Amanda

    [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel