Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Iñaki Úcar
El jue., 5 jul. 2018 21:51, David Hugh-Jones escribió: > That will indeed fail everywhere. The puzzle is why it fails (only > sometimes) when the methods are all exported. The GitHub equivalent is tag > v4.0.1-rc1. > Yeap, but the point is that exporting the methods with 'export' should be

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread David Hugh-Jones
That will indeed fail everywhere. The puzzle is why it fails (only sometimes) when the methods are all exported. The GitHub equivalent is tag v4.0.1-rc1. On Thu, 5 Jul 2018 at 20:43, Iñaki Úcar wrote: > > > El jue., 5 jul. 2018 21:35, David Hugh-Jones > escribió: > >> Installed from CRAN or

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread David Hugh-Jones
Installed from CRAN or github? CRAN should be OK - I hope! On Thu, 5 Jul 2018 at 20:33, Iñaki Úcar wrote: > I installed huxtable in two environments, my own Fedora installation with > R 3.5.0 and all my packages and in a fresh Ubuntu system with R 3.4.4 and > an empty library. In both cases,

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Iñaki Úcar
El jue., 5 jul. 2018 21:35, David Hugh-Jones escribió: > Installed from CRAN or github? CRAN should be OK - I hope! > >From GitHub before the patch. > On Thu, 5 Jul 2018 at 20:33, Iñaki Úcar wrote: > >> I installed huxtable in two environments, my own Fedora installation with >> R 3.5.0 and

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Iñaki Úcar
I installed huxtable in two environments, my own Fedora installation with R 3.5.0 and all my packages and in a fresh Ubuntu system with R 3.4.4 and an empty library. In both cases, huxtable is unusable: every example I try fails because it doesn't find the methods. So it has nothing to do with R

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Duncan Murdoch
On 05/07/2018 2:06 PM, Duncan Murdoch wrote: On 05/07/2018 9:11 AM, David Hugh-Jones wrote: Agreed. I fixed the roxygen2 and it works fine. But yet, the original v4.0.1 on CRAN has a namespace file which contains S3method(bold,huxtable) export(bold) export(bold.huxtable) and

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Duncan Murdoch
On 05/07/2018 9:11 AM, David Hugh-Jones wrote: Agreed. I fixed the roxygen2 and it works fine. But yet, the original v4.0.1 on CRAN has a namespace file which contains S3method(bold,huxtable) export(bold) export(bold.huxtable) and S3method("align<-",huxtable) export("align<-")

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Joris Meys
For the record: I've checked this in R 3.5.0 and R 3.4.4, and in both cases this problem exists. Also, I need to correct myself: The correct way to document with roxygen is to use _both_ the @method and @export tag: @method foo bar @export That registers the S3 method correctly (and hence

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Joris Meys
I see that you realized it was Inaki who gave you he patch, not me :-) I've been looking into this further, and the toy example David put up is actually not the right one to look at. In that example the generic is created in the namespace. But in the original huxtable that was not the case. Try

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread David Hugh-Jones
Agreed. I fixed the roxygen2 and it works fine. But yet, the original v4.0.1 on CRAN has a namespace file which contains S3method(bold,huxtable) export(bold) export(bold.huxtable) and S3method("align<-",huxtable) export("align<-") export("align<-.huxtable") yet still fails on linux-patched and

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Duncan Murdoch
On 05/07/2018 5:22 AM, David Hugh-Jones wrote: Wow, this is extremely helpful. I've applied Joris' patch. By the way, the github master has the change that I stopped exporting methods, as per Hadley's suggestion; this caused *all* functions created via make_getter_setters to fail. Version

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread David Hugh-Jones
Wow, this is extremely helpful. I've applied Joris' patch. By the way, the github master has the change that I stopped exporting methods, as per Hadley's suggestion; this caused *all* functions created via make_getter_setters to fail. Version 4.0.1 on CRAN has the methods exported, which was

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-05 Thread Iñaki Úcar
El mié., 4 jul. 2018 a las 22:47, Duncan Murdoch () escribió: > > On 04/07/2018 4:04 PM, Joris Meys wrote: > > > > > > On Wed, Jul 4, 2018 at 9:31 PM, Duncan Murdoch > > wrote: > > > > > > That shouldn't matter. That function was created in a local > >

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Duncan Murdoch
On 04/07/2018 4:04 PM, Joris Meys wrote: On Wed, Jul 4, 2018 at 9:31 PM, Duncan Murdoch > wrote: That shouldn't matter.  That function was created in a local environment whose parent is (probably by the huxtable:::make_setter_getters function,

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Duncan Murdoch
On 04/07/2018 3:44 PM, Iñaki Úcar wrote: It seems Joris is right. The following patch seems to solve the issue for me: diff --git a/R/attributes.R b/R/attributes.R index e7f4ab9..18ebdab 100644 --- a/R/attributes.R +++ b/R/attributes.R @@ -156,6 +156,7 @@ make_getter_setters <-

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Iñaki Úcar
It seems Joris is right. The following patch seems to solve the issue for me: diff --git a/R/attributes.R b/R/attributes.R index e7f4ab9..18ebdab 100644 --- a/R/attributes.R +++ b/R/attributes.R @@ -156,6 +156,7 @@ make_getter_setters <- function(attr_name, attr_type = c('cell', 'row', 'col', '

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Joris Meys
I just took a look at your repo, and two remarks: - you use roxygen, and used both @export and @S3method. The latter one is deprecated, so you should use only @export, or @method (see eg Hadley's answer here : https://github.com/klutometis/roxygen/issues/741 ) - You're using some code in

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread David Hugh-Jones
I figured that. Actually I just tried this. I now get the interesting result that all calls to a generic fail with the UseMethod error...? On Wed, 4 Jul 2018 at 16:12, Joris Meys wrote: > On Wed, Jul 4, 2018 at 4:22 PM, Hadley Wickham > wrote: > >> I don't think it's related to the error, but

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Joris Meys
On Wed, Jul 4, 2018 at 4:22 PM, Hadley Wickham wrote: > I don't think it's related to the error, but you shouldn't be exporting > this: > > export("align<-.huxtable") > > You should generally only export the method. > Hadley means to say that you should generally only export the generic, not

Re: [R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread Hadley Wickham
I don't think it's related to the error, but you shouldn't be exporting this: export("align<-.huxtable") You should generally only export the method. Hadley On Wed, Jul 4, 2018 at 9:00 AM, David Hugh-Jones wrote: > Hi all, > > The following shows an error for my package: >

[R-pkg-devel] Weird error on CRAN linux check

2018-07-04 Thread David Hugh-Jones
Hi all, The following shows an error for my package: https://www.r-project.org/nosvn/R.check/r-release-linux-x86_64/huxtable-00check.html Here's an excerpt: > ### ** Examples > > > ht <- huxtable(a = 1:3, b = 1:3) > align(ht) <- 'right' Error in UseMethod("align<-") : no applicable method for