Re: [R] probleme with R CMD check

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Fri, 18 Jul 2008 11:34:50 +0200

>>>>> "CG" == Christophe Genolini <cgenolin_at_u-paris10.fr> >>>>> on Fri, 18 Jul 2008 11:14:25 +0200 writes:

    CG> Hi the list,
    CG> Back on an old problem. I thaught that was ok, but it is still not 
    CG> working on my computer.
    CG> I write a toy package called packClassic. R CMD build packClassic works 
    CG> fine.
    CG> When I run R CMD CHECK packClassic, I get

    CG> --- 8< ---------------
    CG> * checking for unstated dependencies in R code ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe     CG> --- 8< ---------------
    CG> I gess that my configuration is correct since on an other package (a 
    CG> real one), I get no problem.
    CG> The program is called "progClassic.R". Obviouly, is in a directorie 
    CG> called \packClassic\R\
    CG> The doc are in man, a data base is in data and some test are in tests

    CG> Here are the codes, the DESCRIPTION and NAMESPACE, then the file 
    CG> 00install.out and 00check.log :
    CG> I also put the package (since R CMD build works fine) on

    CG> http:\\christophe.genolini.free.fr/packClassic_1.0.tar.gz

I tried the above, --- after changing "\\" to "//" but no file was found.

(read on !)

    CG> http:\\christophe.genolini.free.fr/packClassic_1.0.zip

    CG> Does someone know what is wrong ?

    CG> Christophe

    CG> ---- 8< --------- packClassic.R ----------------
    CG> ######################################################
    CG> ###                  ProgClassic.R                 ###
    CG> ######################################################

    CG> userA      <- function(x){x+1}
    CG> privateA   <- function(x){x+2}
    CG> .userB     <- function(x){x+10}
    CG> .privateB  <- function(x){x+20}
    CG> userC      <- function(x){userA(privateA(x))}
    CG> privateC <- function(x){.userB(.privateB(x))}
    CG> --- 8< ---------- testsPackClassic.R----------------------------
    CG> ##########################################
    CG> ### Nom du programme : testClassique.R ###
    CG> ##########################################

    CG> load("../data/dn.Rda")
    CG> source("../R/progClassic.R")

    CG> userA(1)
    CG> privsateA(2)
    CG> .userB(3)
    CG> .privateB(4)
    CG> userC(5)
    CG> privateC(6)


    CG> --- 8< ------------ dn.Rda ----------------------
    CG> dn <- data.frame(age=c(1,2,4,8,12))     CG> save(dn,file=dn.Rda")
    CG> ---  8< ----------- DESCRIPTION -------------
    CG> Package:packClassic
    CG> Type: Package
    CG> Title: A (Not So) Short Introduction To S4
    CG> Version: 1.0
    CG> Date: 2008-07-16
    CG> Author: Christophe Genolini
    CG> Maintainer: <genolini_at_u-paris10.fr>
    CG> Description: This package is a toy example used to illustrate the 
    CG> tutorial A (Not So) Short Introduction to S4.
    CG> License: GPL (>=2)
    CG> LazyLoad: ys


    CG> --- 8< --------------- NAMESPACE --------------
    CG> export("userA",
    CG> ".userB",

    CG> "userC"
    CG> )
    CG> --- 8< -------- man ----------------
    CG> dn.Rd
    CG> packClassic-internal.Rd

    CG> packClassic-package.Rd
    CG> userAC.Rd
    CG> --- 8< ------------- 00install.out ----------------------
    CG> installing R.css in
    CG> C:/DOCUME~1/CHRIST~1/MESDOC~1/DOCSAR~1/R/TUTORI~1/PACKCL~1.RCH
    CG> ---------- Making package packClassic ------------
    CG> adding build stamp to DESCRIPTION
    CG> installing NAMESPACE file and metadata
    CG> installing R files
    CG> installing data files
    CG> installing man source files
    CG> installing indices
    CG> not zipping data
    CG> installing help
    >>>> Building/Updating help pages for package 'packClassic'
    CG> Formats: text html latex example chm
    CG> dn                                text    html    latex   example
    CG> packClassic-internal              text    html    latex
    CG> packClassic-package               text    html    latex   example
    CG> userAC                            text    html    latex   example
    CG> adding MD5 sums

    CG> * DONE (packClassic)

    CG> --- 8< ----------------- 00check.log ------------------
    CG> * using log directory 'C:/Documents and Settings/Christophe/Mes     CG> documents/Docs articles polys résumés/R/tutorial S4/packClassic.Rcheck'

I see many directories with spaces (" ") inside. This used to cause all kind of problems in the past, and has been explicitly discouraged from in "R for windows" instructions.

But really I have no idea if that's the cause of your problem. We *could* try your source package *if* it was available from a URL. Bonnes salutations,
Martin

    CG> * using R version 2.7.1 (2008-06-23)
    CG> * using session charset: ISO8859-1
    CG> * checking for file 'packClassic/DESCRIPTION' ... OK
    CG> * checking extension type ... Package
    CG> * this is package 'packClassic' version '1.0'
    CG> * checking package name space information ... OK
    CG> * checking package dependencies ... OK
    CG> * checking if this is a source package ... OK
    CG> * checking whether package 'packClassic' can be installed ... OK
    CG> * checking package directory ... OK
    CG> * checking for portable file names ... OK
    CG> * checking DESCRIPTION meta-information ... OK
    CG> * checking top-level files ... OK
    CG> * checking index information ... OK
    CG> * checking package subdirectories ... WARNING
    CG> Subdirectory 'data' contains no data sets.
    CG> * checking R files for non-ASCII characters ... OK
    CG> * checking R files for syntax errors ... OK
    CG> * checking whether the package can be loaded ... OK
    CG> * checking whether the package can be loaded with stated dependencies ... OK
    CG> * checking whether the name space can be loaded with stated dependencies 
    CG> ... OK
    CG> * checking for unstated dependencies in R code ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> See the information on DESCRIPTION files in the chapter 'Creating R
    CG> packages' of the 'Writing R Extensions' manual.
    CG> * checking S3 generic/method consistency ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> See section 'Generic functions and methods' of the 'Writing R Extensions'
    CG> manual.
    CG> * checking replacement functions ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> In R, the argument of a replacement function which corresponds to the right
    CG> hand side must be named 'value'.
    CG> * checking foreign function calls ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> See the chapter 'System and foreign language interfaces' of the 'Writing R
    CG> Extensions' manual.
    CG> * checking R code for possible problems ... NOTE
    CG> Erreur : aucun package nommé 'packClassic' n'existe
    CG> Séquence d'appel :
    CG> 2: stop(txt, domain = NA)
    CG> 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = 
    CG> FALSE)
    CG> Exécution arrêtée
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> * checking Rd files ... OK
    CG> * checking Rd cross-references ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> Rd_aliases -> .find.package
    CG> Exécution arrêtée
    CG> * checking for missing documentation entries ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> All user-level objects in a package should have documentation entries.
    CG> See the chapter 'Writing R documentation files' in manual 'Writing R
    CG> Extensions'.
    CG> * checking for code/documentation mismatches ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> * checking Rd \usage sections ... WARNING
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> Functions with \usage entries need to have the appropriate \alias entries,
    CG> and all their arguments documented.
    CG> The \usage entries must correspond to syntactically valid R code.
    CG> See the chapter 'Writing R documentation files' in manual 'Writing R
    CG> Extensions'.
    CG> Erreur dans .find.package(package, lib.loc) :
    CG> aucun package nommé 'packClassic' n'existe
    CG> Calls: <Anonymous> -> .find.package
    CG> Exécution arrêtée
    CG> The \usage entries for S3 methods should use the \method markup and not
    CG> their full name.
    CG> See the chapter 'Writing R documentation files' in manual 'Writing R
    CG> Extensions'.
    CG> * checking data for non-ASCII characters ... OK
    CG> * creating packClassic-Ex.R ... OK
    CG> * checking examples ... ERROR
    CG> Running examples in 'packClassic-Ex.R' failed.


    CG> --- 8< -----------------------
    c> I find the problem: the name of my base directory (the
    c> one that contain R, man and test) was not the same than
    c> the name of the package...

>>
>> Aha!
>>
    c> I thaught this was allowed, I guess I was wrong.

>>
>> It has been documented to be allowed; and it has been, but
>> in some circumstances, R CMD check gave wrong warnings, as you
>> found.
>>
>> I had found and fixed this buglet on May 22, both for R-devel
>> and R-patched (which will become R 2.7.1 ...)
>>
>> Could you try 'R-patched' and confirm that the problem is
>> solved?
>>
>> Regards,
>> Martin
>>
>>
    c> Christophe

>>
>> >>>>>>> "c" == cgenolin <cgenolin_at_u-paris10.fr> on Tue, 03
>> >>>>>>> Jun 2008 09:55:15 +0200 writes:
>> >>
>> >> >> provide commented, minimal, self-contained,
>> >> reproducible code. >> Please do -- both --
>> >>
    c> Sorry... Usualy, I do...

>> >>
    c> --- 8< ------------ userA <- function(x)x+1 privateA <-
    c> function(x)x+2 .userB <- function(x)x+10 .privateB <-
    c> function(x)x+20 userC <- function(x)userA(privateA(x))
    c> privateC <- function(x).userB(.privateB(x)) userD <-
    c> function(x)userA(.userB(x)) privateD <-
    c> function(x)privateA(.privateB(x)) --- 8< ------------

>> >>
>> >> If I execute these in an empty R session, and do
>> >> package.skeleton("EXpkg") system("R CMD check EXpkg")
>> >>
>> >> I can NOT see the problem you describe below. Probably
>> >> you'd rather should upload the <pkg>.tar.gz to a public
>> >> place, to make your problem reproducible.
>> >>
>> >> Martin
>> >>
>> >> >>>>>>> "c" == cgenolin <cgenolin_at_u-paris10.fr> >>>>>>>
>> >> on Tue, 03 Jun 2008 00:32:13 +0200 writes:
>> >> >>
    c> Hi the list.  I got a probleme with R CMD check. I run a
    c> package.skeleton on a very simple code (four toy
    c> function, no probleme with the R CMD build). But on the R
    c> CMD check packClassique, I get :

>> >> >>
    c> * checking for unstated dependencies in R code
    c> ... WARNING Erreur dans .find.package(package, lib.loc) :
    c> aucun package nommé 'packClassique' n'est trouvé Calls:
    c> <Anonymous> -> .find.package Excecution hated
    c> [French=Exécution arrêtée]

>> >> >>
    c> See the information on DESCRIPTION files in the chapter
    c> 'Creating R packages' of the 'Writing R Extensions'
    c> manual.  * checking S3 generic/method consistency
    c> ... WARNING Erreur dans .find.package(package, lib.loc) :
    c> aucun package nommé 'packClassique' n'est trouvé Calls:
    c> <Anonymous> -> .find.package Exécution arrêtée

>> >> >>
    c> And so on.

>> >> >>
    c> Any idea on what is wrong ?

>> >> >>
>> >> >> No.
>> >> >>
    c> Christophe

>> >> >>
    c> ______________________________________________
    c> R-help_at_r-project.org mailing list
    c> https://stat.ethz.ch/mailman/listinfo/r-help

>> >> >>
    c> PLEASE do read the posting guide

>> >> >> http://www.R-project.org/posting-guide.html
    c> and provide commented, minimal, self-contained,
    c> reproducible code.

>> >> >>
>> >> >> Please do -- both --
>> >> >>
>> >> >> Martin
>> >> >>
>> >>
>> >>
>> >>
    c> ----------------------------------------------------------------
    c> Ce message a ete envoye par IMP, grace a l'Universite
    c> Paris 10 Nanterre

>> >>
>> >>
>> >>
>>
>> ______________________________________________
    c> R-help_at_r-project.org mailing list
    c> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
    c> read the posting guide
    c> http://www.R-project.org/posting-guide.html and provide
    c> commented, minimal, self-contained, reproducible code.

>>

    >>

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 18 Jul 2008 - 09:40:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Jul 2008 - 12:32:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive