Re: [R-pkg-devel] Need help testing for Apple

2020-03-11 Thread David Winsemius



> On Mar 11, 2020, at 11:39 AM, Neal Fultz  wrote:
> 
> Hello,
> 
> I am working on a package that does terminal graphics for hterm, but iterm2
> should work too; if you have an apple computer with iterm2, could you
> please help test it for me?
> 
> Installation:
> 
>remotes::install_github("nfultz/osc1337")
> 
> Then run this demo:
> 
>demo("barplot", "osc1337")
> 
> Try running it from a shell, and also inside screen and tmux, and let me
> know if you see the barplot in each case. Version numbers might be helpful
> too.
> 
> *** it does not work in rstudio ***

I'm not sure what is supposed to happen. On my device running the R.app I see:

> barplot(1:10, col=1:10)
Hit  to see next plot: 

> osc1337()
/var/folders/68/vh2f8kzn09j8954r6q9100yhgn/T//RtmpC2yMm9/fileefa4178b3c1.png
 
 480 480 
9684 
]1337;File=name=ZmlsZWVmYTQxNzhiM2MxLnBuZw==;width=480;height=480;inline=1:iVBORw0KGgoNSUhEUgAAAeHgCAYAAAB91L6VAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrt

#and then a couple of pages of gibberish
#and finally...

detach("package:osc1337")
Warning message:
.onDetach failed in detach() for 'osc1337', details:
  call: dev.off(oldopts$i)
  error: QuartzBitmap_Output - unable to open file '/dev/null' 


In a terminal session I see much the same but with none of the garbage text:

>  demo("barplot", "osc1337")


demo(barplot)
 ~~~

Type to start : 

> library(osc1337)

> barplot(1:10, col=1:10)
Hit  to see next plot: 

> osc1337()
/var/folders/68/vh2f8kzn09j8954r6q9100yhgn/T//Rtmp1oeFuH/file2b9d310dee06.png
 
 480 480 
9684 

> detach("package:osc1337")
Warning message:
.onDetach failed in detach() for 'osc1337', details:
  call: dev.off(oldopts$i)
  error: QuartzBitmap_Output - unable to open file '/dev/null' 


R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)


HTH (but I not sure how it would)
-- 
David.

> 
> Thanks much!
> 
> - Neal Fultz
> 
> PS If anyone from rstudio is on the list, would you mind
> explaining RShadowPngGraphicsHandler.cpp and friends, and how it knows when
> to redraw when R returns to the REPL prompt?
> 
> I'd like to do something similar so that drawing plots in the terminal is
> less manual.
> 
> Haven't found much docs on the graphics engine other than a really old
> omegahat project, been trying to read engine.c but I'm slow.
> 
>   [[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] check --as-cran error on Rd file

2020-03-11 Thread Duncan Murdoch

On 11/03/2020 11:44 a.m., Charles Geyer wrote:

blurfle$ cat sped.Rcheck/00check.log
* using log directory ‘/home/geyer/Software/sped/package/sped.Rcheck’
* using R Under development (unstable) (2020-03-10 r77920)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘sped/DESCRIPTION’ ... OK
* this is package ‘sped’ version ‘0.1’
* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Charles J. Geyer ’

New submission
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking serialization versions ... OK
* checking whether package ‘sped’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ...
OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING
Variables with usage in documentation object 'alberta' but not in code:
   ‘alberta’

* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compilation flags used ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... OK
   Running ‘foo.R’
* checking PDF version of manual ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 WARNING, 1 NOTE
blurfle$

I do not get this warning when --as-cran is omitted.  I have never seen the
warning before.  The Rd file is

blurfle$ cat sped/man/alberta.Rd
\name{alberta}
\docType{data}
\alias{alberta}
\title{Pedigree Data on Equus przewalskii in Alberta}
\description{
   Pedigree of Asian wild horse (also called Mongolian wild horse)
   \emph{Equus przewalskii} individuals living in Alberta, Canada in 1988.
}
\usage{alberta}
\format{
A matrix with 69 rows giving (individual, father, mother) triplets.
The column labels are \code{ind}, \code{pa}, and \code{ma}.
The names (which are numbers) are studbook numbers.
There are 82 individuals in this pedigree in all.
There are \eqn{82 - 69 = 13} founders.
}
\examples{
library(sped)
data(alberta)
}
\keyword{datasets}
blurfle$

And this is AFAICS what Section 2.1.2 of Writing R Extensions (R-devel
version) says it should be.

So what is this warning about?


The manual says "The \usage entry is always bar or (for packages which 
do not use lazy-loading of data) data(bar). (In particular, only 
document a single data object per Rd file.)".  So maybe you aren't using 
lazy loading?


Duncan Murdoch

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


[R-pkg-devel] check --as-cran error on Rd file

2020-03-11 Thread Charles Geyer
blurfle$ cat sped.Rcheck/00check.log
* using log directory ‘/home/geyer/Software/sped/package/sped.Rcheck’
* using R Under development (unstable) (2020-03-10 r77920)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘sped/DESCRIPTION’ ... OK
* this is package ‘sped’ version ‘0.1’
* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Charles J. Geyer ’

New submission
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking serialization versions ... OK
* checking whether package ‘sped’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ...
OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING
Variables with usage in documentation object 'alberta' but not in code:
  ‘alberta’

* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compilation flags used ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... OK
  Running ‘foo.R’
* checking PDF version of manual ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 WARNING, 1 NOTE
blurfle$

I do not get this warning when --as-cran is omitted.  I have never seen the
warning before.  The Rd file is

blurfle$ cat sped/man/alberta.Rd
\name{alberta}
\docType{data}
\alias{alberta}
\title{Pedigree Data on Equus przewalskii in Alberta}
\description{
  Pedigree of Asian wild horse (also called Mongolian wild horse)
  \emph{Equus przewalskii} individuals living in Alberta, Canada in 1988.
}
\usage{alberta}
\format{
A matrix with 69 rows giving (individual, father, mother) triplets.
The column labels are \code{ind}, \code{pa}, and \code{ma}.
The names (which are numbers) are studbook numbers.
There are 82 individuals in this pedigree in all.
There are \eqn{82 - 69 = 13} founders.
}
\examples{
library(sped)
data(alberta)
}
\keyword{datasets}
blurfle$

And this is AFAICS what Section 2.1.2 of Writing R Extensions (R-devel
version) says it should be.

So what is this warning about?

-- 
Charles Geyer
Professor, School of Statistics
Resident Fellow, Minnesota Center for Philosophy of Science
University of Minnesota
char...@stat.umn.edu

[[alternative HTML version deleted]]

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


[R-pkg-devel] Need help testing for Apple

2020-03-11 Thread Neal Fultz
Hello,

I am working on a package that does terminal graphics for hterm, but iterm2
should work too; if you have an apple computer with iterm2, could you
please help test it for me?

Installation:

remotes::install_github("nfultz/osc1337")

Then run this demo:

demo("barplot", "osc1337")

Try running it from a shell, and also inside screen and tmux, and let me
know if you see the barplot in each case. Version numbers might be helpful
too.

*** it does not work in rstudio ***

Thanks much!

- Neal Fultz

PS If anyone from rstudio is on the list, would you mind
explaining RShadowPngGraphicsHandler.cpp and friends, and how it knows when
to redraw when R returns to the REPL prompt?

I'd like to do something similar so that drawing plots in the terminal is
less manual.

Haven't found much docs on the graphics engine other than a really old
omegahat project, been trying to read engine.c but I'm slow.

[[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] Fwd: Re: [CRAN-pretest-archived] CRAN submission SSLR 0.9.0

2020-03-11 Thread Martin Morgan
After running R CMD check SSLR_0.9.0.tar.gz there is a file 
SSLR.Rcheck/SSLR-Ex.R. Try running that

  R -f SSLR.Rcheck/SSLR-Ex.R

my guess is that somewhere else in the examples you load a package that has a 
generic 'fit' that masks SSLR::fit in your package, so R is not able to find 
your method on the tidymoodels::fit generic.

tidymodels would seem to be a good candidate for this, with perhaps some of the 
search path management done by in SSLR-Ex.R meaning that the mask is not 
reported by tidymodels. Also running the SSLR-Ex.R script used during check 
means effectively

  library(SSLR)
  library(tidymodels)

(tidymodels::fit masks SSLR::fit) whereas running just the example gives

  library(tidymodels)
  library(SSLR)

(SSLR::fit masks tidymodels::fit).

Hmm, after taking the time to tidymodels I see

> fit
function (object, ...)
{
UseMethod("fit")
}



so apparently there is a generics package that defines 'fit'... if you're 
playing in the tidyverse then it seems like you should @importFrom generics fit 
and @export fit.

Martin Morgan

On 3/11/20, 1:50 PM, "R-package-devel on behalf of Henrik Bengtsson" 
 
wrote:

'fpalomares', it's not clear if you can reproduce this locally or not,
but make sure you can reproduce it locally.  I could using:

R CMD check --as-cran SSLR_0.9.0.tar.gz

with R 3.6.3 on Ubuntu 18.04.  In other words, this is neither a
problem with the CRAN incoming checks nor win-builder.

Yes, I agree, at a first glance, this looks odd because:

> library(SSLR)
> fit
function (object, ...)
{
UseMethod("fit")
}


> methods("fit")
[1] fit,onlearn-method fit.model_sslr
see '?methods' for accessing help and source code

Neither

$ Rscript -e 'example("COREG", package = "SSLR")'

nor

> example("COREG", package = "SSLR")

in an interactive session produce the error.

For troubleshooting, I'd added a:

print(methods("fit"))

before

m <- COREG(max.iter = 2) %>% fit(class ~ ., data = train)

I'd also try rewriting that without %>%, e.g. something like

a <- COREG(max.iter = 2)
b <- fit(class ~ a, data = train)

to see if that makes a difference.

My $.02

/Henrik

On Wed, Mar 11, 2020 at 8:13 AM Duncan Murdoch  
wrote:
>
> Uwe Ligges answered you yesterday on this question.
>
> Duncan Murdoch
>
> On 11/03/2020 7:39 a.m., fpaloma...@correo.ugr.es wrote:
> > Hi,
> >
> > I dont know how to fix this problem:
> > https://win-builder.r-project.org/VK8P07E1QHFA/
> >
> > The error is:
> >
> > Error in UseMethod("fit") :
> > no applicable method for 'fit' applied to an object of class
> > "model_sslr"
> >
> > I check with my platform Windows 10 Home and I dont have problems
> >
> > The code used is:
> >
> > #' fit
> > #' @title fit object
> > #' @param object object
> > #' @param ... other parameters to be passed
> > #' @export
> > fit <- function(object, ...){
> > UseMethod("fit")
> > }
> >
> > #' @title Fit with formula and data
> > #' @description Funtion to fit through the formula
> > #' @param object is the model
> > #' @param formula is the formula
> > #' @param data is the total data train
> > #' @param ... unused in this case
> > #' @importFrom rlang quos
> > #' @export fit.model_sslr
> > #' @export
> > fit.model_sslr <- function(object, formula = NULL, data = NULL, ...) {
> >
> > dots <- quos(...)
> >
> >
> > if (all(c("x", "y") %in% names(dots)))
> >   rlang::abort("`fit.model_sslr()` is for the formula methods. Use
> > `fit_xy()` instead.")
> >
> > fit_form_interface <- check_form_interface(formula, data)
> >
> > x_and_y <- get_x_y(formula, data)
> >
> > eval_env <- rlang::env()
> > eval_env$x <- x_and_y$x
> > eval_env$y <- x_and_y$y
> >
> > fit_interface <- check_xy_interface(eval_env$x, eval_env$y)
> >
> > elapsed <- system.time(model <- object$fit_function(eval_env$x,
> > eval_env$y))
> >
> >
> > 
new_model_sslr_fitted(model,class(model),object$args,colnames(eval_env$x),elapsed,formula)
> >
> > }
> >
> >
> > In my NAMESPACE we have this:
> >
> > # Generated by roxygen2: do not edit by hand
> >
> > S3method(fit,model_sslr)
> > S3method(fit_x_u,model_sslr)
> > S3method(fit_xy,model_sslr)
> > S3method(predict,OneNN)
> > S3method(predict,model_sslr_fitted)
> > S3method(predict,snnrceG)
> > export(COREG)
> > export(EMLeastSquaresClassifierSSLR)
> > export(EMNearestMeanClassifierSSLR)
> > export(EntropyRegularizedLogisticRegressionSSLR)
> > export(LaplacianSVMSSLR)
> > export(LinearTSVMSSLR)
> > 

Re: [R-pkg-devel] Fwd: Re: [CRAN-pretest-archived] CRAN submission SSLR 0.9.0

2020-03-11 Thread Henrik Bengtsson
'fpalomares', it's not clear if you can reproduce this locally or not,
but make sure you can reproduce it locally.  I could using:

R CMD check --as-cran SSLR_0.9.0.tar.gz

with R 3.6.3 on Ubuntu 18.04.  In other words, this is neither a
problem with the CRAN incoming checks nor win-builder.

Yes, I agree, at a first glance, this looks odd because:

> library(SSLR)
> fit
function (object, ...)
{
UseMethod("fit")
}


> methods("fit")
[1] fit,onlearn-method fit.model_sslr
see '?methods' for accessing help and source code

Neither

$ Rscript -e 'example("COREG", package = "SSLR")'

nor

> example("COREG", package = "SSLR")

in an interactive session produce the error.

For troubleshooting, I'd added a:

print(methods("fit"))

before

m <- COREG(max.iter = 2) %>% fit(class ~ ., data = train)

I'd also try rewriting that without %>%, e.g. something like

a <- COREG(max.iter = 2)
b <- fit(class ~ a, data = train)

to see if that makes a difference.

My $.02

/Henrik

On Wed, Mar 11, 2020 at 8:13 AM Duncan Murdoch  wrote:
>
> Uwe Ligges answered you yesterday on this question.
>
> Duncan Murdoch
>
> On 11/03/2020 7:39 a.m., fpaloma...@correo.ugr.es wrote:
> > Hi,
> >
> > I dont know how to fix this problem:
> > https://win-builder.r-project.org/VK8P07E1QHFA/
> >
> > The error is:
> >
> > Error in UseMethod("fit") :
> > no applicable method for 'fit' applied to an object of class
> > "model_sslr"
> >
> > I check with my platform Windows 10 Home and I dont have problems
> >
> > The code used is:
> >
> > #' fit
> > #' @title fit object
> > #' @param object object
> > #' @param ... other parameters to be passed
> > #' @export
> > fit <- function(object, ...){
> > UseMethod("fit")
> > }
> >
> > #' @title Fit with formula and data
> > #' @description Funtion to fit through the formula
> > #' @param object is the model
> > #' @param formula is the formula
> > #' @param data is the total data train
> > #' @param ... unused in this case
> > #' @importFrom rlang quos
> > #' @export fit.model_sslr
> > #' @export
> > fit.model_sslr <- function(object, formula = NULL, data = NULL, ...) {
> >
> > dots <- quos(...)
> >
> >
> > if (all(c("x", "y") %in% names(dots)))
> >   rlang::abort("`fit.model_sslr()` is for the formula methods. Use
> > `fit_xy()` instead.")
> >
> > fit_form_interface <- check_form_interface(formula, data)
> >
> > x_and_y <- get_x_y(formula, data)
> >
> > eval_env <- rlang::env()
> > eval_env$x <- x_and_y$x
> > eval_env$y <- x_and_y$y
> >
> > fit_interface <- check_xy_interface(eval_env$x, eval_env$y)
> >
> > elapsed <- system.time(model <- object$fit_function(eval_env$x,
> > eval_env$y))
> >
> >
> > new_model_sslr_fitted(model,class(model),object$args,colnames(eval_env$x),elapsed,formula)
> >
> > }
> >
> >
> > In my NAMESPACE we have this:
> >
> > # Generated by roxygen2: do not edit by hand
> >
> > S3method(fit,model_sslr)
> > S3method(fit_x_u,model_sslr)
> > S3method(fit_xy,model_sslr)
> > S3method(predict,OneNN)
> > S3method(predict,model_sslr_fitted)
> > S3method(predict,snnrceG)
> > export(COREG)
> > export(EMLeastSquaresClassifierSSLR)
> > export(EMNearestMeanClassifierSSLR)
> > export(EntropyRegularizedLogisticRegressionSSLR)
> > export(LaplacianSVMSSLR)
> > export(LinearTSVMSSLR)
> > export(MCNearestMeanClassifierSSLR)
> > export(SSLRDecisionTree)
> > export(SSLRRandomForest)
> > export(TSVMSSLR)
> > export(USMLeastSquaresClassifierSSLR)
> > export(WellSVMSSLR)
> > export(coBC)
> > export(coBCCombine)
> > export(coBCG)
> > export(democratic)
> > export(democraticCombine)
> > export(democraticG)
> > export(fit)
> > export(fit.model_sslr)
> > export(fit_x_u)
> > export(fit_x_u.model_sslr)
> > export(fit_xy)
> > export(fit_xy.model_sslr)
> > export(newDecisionTree)
> > export(oneNN)
> > export(selfTraining)
> > export(selfTrainingG)
> > export(setred)
> > export(setredG)
> > export(snnrce)
> > export(train_generic)
> > export(triTraining)
> > export(triTrainingCombine)
> > export(triTrainingG)
> > exportClasses(nullOrNumericOrCharacter)
> > exportMethods(predict)
> > exportMethods(predict_inputs)
> > import(stats)
> > importFrom(RANN,nn2)
> > importFrom(RSSL,EMLeastSquaresClassifier)
> > importFrom(RSSL,EMNearestMeanClassifier)
> > importFrom(RSSL,EntropyRegularizedLogisticRegression)
> > importFrom(RSSL,LaplacianSVM)
> > importFrom(RSSL,LinearTSVM)
> > importFrom(RSSL,MCNearestMeanClassifier)
> > importFrom(RSSL,TSVM)
> > importFrom(RSSL,USMLeastSquaresClassifier)
> > importFrom(RSSL,WellSVM)
> > importFrom(dplyr,as_tibble)
> > importFrom(dplyr,tibble)
> > importFrom(foreach,"%dopar%")
> > importFrom(magrittr,"%>%")
> > importFrom(methods,new)
> > importFrom(parsnip,nearest_neighbor)
> > importFrom(parsnip,set_engine)
> > importFrom(plyr,is.formula)
> > importFrom(purrr,map)
> > importFrom(rlang,quos)
> > importFrom(stats,predict)
> > importFrom(utils,tail)
> > useDynLib(SSLR)
> >
> > We have:
> > S3method(fit,model_sslr)
> > ...
> > export(fit)
> > 

Re: [R-pkg-devel] Package windows binaries not updating?

2020-03-11 Thread Uwe Ligges
Sorry, takes longer as I we use a lot of COU cychecking ...


Uwe


On 11.03.2020 15:23, Joe Thorley wrote:

Hi All

Version 0.4.0 of the chk package was accepted by CRAN over a week ago (on March 
3rd 2020).

However, the windows binaries have not yet updated for r-devel and r-release.

https://cran.r-project.org/web/packages/chk/index.html 


Is there anything I can do to facilitate their updating or do I just need to be 
more patient?

Thanks

Joe

Joe Thorley PhD, RPBio
Computational Biologist
Poisson Consulting Ltd.
4216 Shasheen Road
Nelson, BC
V1L 6X1, Canada
Tel: +1 250 551 2194
Email: j...@poissonconsulting.ca
Web: www.poissonconsulting.ca
Skype: joethorley




[[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] Fwd: Re: [CRAN-pretest-archived] CRAN submission SSLR 0.9.0

2020-03-11 Thread Duncan Murdoch

Uwe Ligges answered you yesterday on this question.

Duncan Murdoch

On 11/03/2020 7:39 a.m., fpaloma...@correo.ugr.es wrote:

Hi,

I dont know how to fix this problem:
https://win-builder.r-project.org/VK8P07E1QHFA/

The error is:

Error in UseMethod("fit") :
no applicable method for 'fit' applied to an object of class
"model_sslr"

I check with my platform Windows 10 Home and I dont have problems

The code used is:

#' fit
#' @title fit object
#' @param object object
#' @param ... other parameters to be passed
#' @export
fit <- function(object, ...){
UseMethod("fit")
}

#' @title Fit with formula and data
#' @description Funtion to fit through the formula
#' @param object is the model
#' @param formula is the formula
#' @param data is the total data train
#' @param ... unused in this case
#' @importFrom rlang quos
#' @export fit.model_sslr
#' @export
fit.model_sslr <- function(object, formula = NULL, data = NULL, ...) {

dots <- quos(...)


if (all(c("x", "y") %in% names(dots)))
  rlang::abort("`fit.model_sslr()` is for the formula methods. Use
`fit_xy()` instead.")

fit_form_interface <- check_form_interface(formula, data)

x_and_y <- get_x_y(formula, data)

eval_env <- rlang::env()
eval_env$x <- x_and_y$x
eval_env$y <- x_and_y$y

fit_interface <- check_xy_interface(eval_env$x, eval_env$y)

elapsed <- system.time(model <- object$fit_function(eval_env$x,
eval_env$y))


new_model_sslr_fitted(model,class(model),object$args,colnames(eval_env$x),elapsed,formula)


}


In my NAMESPACE we have this:

# Generated by roxygen2: do not edit by hand

S3method(fit,model_sslr)
S3method(fit_x_u,model_sslr)
S3method(fit_xy,model_sslr)
S3method(predict,OneNN)
S3method(predict,model_sslr_fitted)
S3method(predict,snnrceG)
export(COREG)
export(EMLeastSquaresClassifierSSLR)
export(EMNearestMeanClassifierSSLR)
export(EntropyRegularizedLogisticRegressionSSLR)
export(LaplacianSVMSSLR)
export(LinearTSVMSSLR)
export(MCNearestMeanClassifierSSLR)
export(SSLRDecisionTree)
export(SSLRRandomForest)
export(TSVMSSLR)
export(USMLeastSquaresClassifierSSLR)
export(WellSVMSSLR)
export(coBC)
export(coBCCombine)
export(coBCG)
export(democratic)
export(democraticCombine)
export(democraticG)
export(fit)
export(fit.model_sslr)
export(fit_x_u)
export(fit_x_u.model_sslr)
export(fit_xy)
export(fit_xy.model_sslr)
export(newDecisionTree)
export(oneNN)
export(selfTraining)
export(selfTrainingG)
export(setred)
export(setredG)
export(snnrce)
export(train_generic)
export(triTraining)
export(triTrainingCombine)
export(triTrainingG)
exportClasses(nullOrNumericOrCharacter)
exportMethods(predict)
exportMethods(predict_inputs)
import(stats)
importFrom(RANN,nn2)
importFrom(RSSL,EMLeastSquaresClassifier)
importFrom(RSSL,EMNearestMeanClassifier)
importFrom(RSSL,EntropyRegularizedLogisticRegression)
importFrom(RSSL,LaplacianSVM)
importFrom(RSSL,LinearTSVM)
importFrom(RSSL,MCNearestMeanClassifier)
importFrom(RSSL,TSVM)
importFrom(RSSL,USMLeastSquaresClassifier)
importFrom(RSSL,WellSVM)
importFrom(dplyr,as_tibble)
importFrom(dplyr,tibble)
importFrom(foreach,"%dopar%")
importFrom(magrittr,"%>%")
importFrom(methods,new)
importFrom(parsnip,nearest_neighbor)
importFrom(parsnip,set_engine)
importFrom(plyr,is.formula)
importFrom(purrr,map)
importFrom(rlang,quos)
importFrom(stats,predict)
importFrom(utils,tail)
useDynLib(SSLR)

We have:
S3method(fit,model_sslr)
...
export(fit)
export(fit.model_sslr)


I don't know why the problem appears when everything is exported.

I attach the built .tar

Thanks.

El 2020-03-10 17:28, fpaloma...@correo.ugr.es escribió:

Hi, I thiks its weird:

The error is:  no applicable method for 'fit' applied to an object of
class "model_sslr"

In the code:

#' fit
#'
#' @title fit object
#' @param object object
#' @param ... other parameters to be passed
#' @rdname fit
#' @export fit
fit <- function(object, ...){
   UseMethod("fit")
}


And:

#' @title Fit with formula and data
#' @description Funtion to fit through the formula
#' @param object is the model
#' @param formula is the formula
#' @param data is the total data train
#' @param ... unused in this case
#' @importFrom rlang quos
#' @rdname fit
#' @export
#' @export fit.model_sslr
fit.model_sslr <- function(object, formula = NULL, data = NULL, ...) {

   dots <- quos(...)


   if (all(c("x", "y") %in% names(dots)))
 rlang::abort("`fit.model_sslr()` is for the formula methods. Use
`fit_xy()` instead.")

   fit_form_interface <- check_form_interface(formula, data)

   x_and_y <- get_x_y(formula, data)

   eval_env <- rlang::env()
   eval_env$x <- x_and_y$x
   eval_env$y <- x_and_y$y

   fit_interface <- check_xy_interface(eval_env$x, eval_env$y)

   elapsed <- system.time(model <- object$fit_function(eval_env$x,
eval_env$y))


new_model_sslr_fitted(model,class(model),object$args,colnames(eval_env$x),elapsed,formula)

}


Thanks

El 2020-03-10 16:19, lig...@statistik.tu-dortmund.de escribió:

Dear maintainer,

package SSLR_0.9.0.tar.gz 

[R-pkg-devel] Package windows binaries not updating?

2020-03-11 Thread Joe Thorley
Hi All

Version 0.4.0 of the chk package was accepted by CRAN over a week ago (on March 
3rd 2020). 

However, the windows binaries have not yet updated for r-devel and r-release.

https://cran.r-project.org/web/packages/chk/index.html 


Is there anything I can do to facilitate their updating or do I just need to be 
more patient?

Thanks

Joe

Joe Thorley PhD, RPBio
Computational Biologist
Poisson Consulting Ltd.
4216 Shasheen Road
Nelson, BC
V1L 6X1, Canada
Tel: +1 250 551 2194
Email: j...@poissonconsulting.ca
Web: www.poissonconsulting.ca
Skype: joethorley




[[alternative HTML version deleted]]

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