[Rcpp-devel] Fwd: CRAN package ConConPiWiFun
Dirk Eddelbuettel
edd at debian.org
Tue Jan 15 17:53:52 CET 2013
On 15 January 2013 at 17:47, Robin Girard wrote:
| I have a new problem with my package
| It seems that my example fails on windows devel version and some others.
You will have to debug that, I am afraid.
If you have a reproducible example, you can try a reduced package on
win-builder til it passes.
| According to email below from Prof Brian Ripley
| "running under valgrind does not report a problem" and it crashes while using my "plot method"
|
| > plot(CCPWLfunc1$Swap(y)); #now f = CCPWLfunc1 is replaced by x -> f(y-x)
| Error in plot(CCPWLfunc1$Swap(y)) :
| error in evaluating the argument 'x' in selecting a method for
| function 'plot': Error in .External(list(name =
| "CppMethod__invoke_notvoid", address = <pointer: 0x1c1ff90>, :
| first argument must be a string (of length 1) or native symbol reference
And for a small reproducible example, you could, say, if you suspected Rcpp
modules, try to rewrite the package not using modules. [ I am suspecting
modules, many other packages uses it happily. ]
| but there are several preceding example where the "plot methods" work successfully. In addition I tried everything with the R devel version on my computer with windows and got no crash...
| any idea where this comes from ? note that I'm using "RCPP_EXPOSED_CLASS(cplfunction)"
| and I declare the plot method with something starting by:
| "setMethod( "plot", signature(x="Rcpp_cplfunction",y="ANY") , function(x,y,...) { ..."
|
| maybe I should send a version of my package with no example to pass checks ?
I do not think that is the right appeoach, but hey, it is your package...
Dirk
| Robin
|
| ----- Mail transféré -----
| De: "Prof Brian Ripley" <ripley at stats.ox.ac.uk>
| À: CRAN at r-project.org
| Cc: "Uwe Ligges" <Uwe.Ligges at r-project.org>, "Robin Girard" <robin.girard at mines-paristech.fr>
| Envoyé: Mardi 15 Janvier 2013 17:05:26
| Objet: Re: CRAN package ConConPiWiFun
|
| On 15/01/2013 14:38, Uwe Ligges wrote:
| > Dear package maintainer of ConConPiWiFun,
| >
| > please see
| >
| > http://cran.r-project.org/web/checks/check_results_ConConPiWiFun.html
| >
| > and find that this crashed both under R-oldrelease and R-devel for
| > Windows (and I guess it just passed by chance under R-release). Since
| > this also fails under Solaris and Mac for other reasons, you may want to
| > fix the Windows problems at least.
|
| I also see failures on Linux boxes. For example on the Fedora check
| system under R-patched (the same machine for which the results are up
| under R-devel). OTOH, running under valgrind does not report a problem.
|
|
| > ### Name: ConConPiWiFun-package
| > ### Title: This package contains an implementation of continuous convex
| > ### piecewise (linear) functions (quadratic coming soon)
| > ### Aliases: ConConPiWiFun-package ConConPiWiFun Sum cplfunction
| > ### Rcpp_cplfunction-class plot-methods plot,ANY-method
| > ### plot,Rcpp_cplfunction-method show-methods show,ANY-method
| > ### show,Rcpp_cplfunction-method
| > ### Keywords: Optimisation, Dynamic programming
| >
| > ### ** Examples
| >
| > library(ConConPiWiFun)
| > ##
| > #Construction of a piecewise linear function
| > ##
| > Slopes=c(-1,2) # increasing ! convexity is required
| > Breakpoints=c(-Inf,2,4) # increasing. length is number of slopes +1
| > FirstNonInfBreakpointVal=3
| > CCPWLfunc1=new(cplfunction,Slopes,Breakpoints,FirstNonInfBreakpointVal)
| > plot(CCPWLfunc1) #visualisation method
| > CCPWLfunc1$get_BreakPoints_() ## return Breaks AND Slopes
| $Breakpoints
| [1] -Inf 2 4
|
| $Slopes
| [1] -1 2
|
| >
| > ###Etoile transformation (legendre transform of f)
| > # Changes f + returns the results !
| > plot(CCPWLfunc1$Etoile()) #if f = CCPWLfunc1 CCPWLfunc1 becomes is
| f^*(y) =inf_x {xy-f(x)}
| > plot(CCPWLfunc1$Etoile()) ## (f^*)^* is f !
| >
| > ###Squeeze function
| > # Changes f, no return!
| > left=-1; right=4
| > CCPWLfunc1$Squeeze(left,right) # CCPWLfunc1 is now infinite (or not
| definite) out of [left,right]
| > # i.e. all breakpoints out of [left,right] removed
| >
| >
| > ###Swap function
| > # Changes f + returns the results !
| > y=2
| > plot(CCPWLfunc1$Swap(y)); #now f = CCPWLfunc1 is replaced by x -> f(y-x)
| Error in plot(CCPWLfunc1$Swap(y)) :
| error in evaluating the argument 'x' in selecting a method for
| function 'plot': Error in .External(list(name =
| "CppMethod__invoke_notvoid", address = <pointer: 0x1c1ff90>, :
| first argument must be a string (of length 1) or native symbol reference
|
|
|
| >
| > Please upload a fixed versions of the package with increased version
| > number to CRAN in the usual way and report to cran at R-project.org.
| >
| > Best,
| > Uwe Ligges
| >
|
|
| --
| Brian D. Ripley, ripley at stats.ox.ac.uk
| Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
| University of Oxford, Tel: +44 1865 272861 (self)
| 1 South Parks Road, +44 1865 272866 (PA)
| Oxford OX1 3TG, UK Fax: +44 1865 272595
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list