Re: [R-pkg-devel] [FORGED] obscure syntax error
Hi Peter and Rolf, In fact there was a missing EOL at the end, but I had already fixed that. It was an error in a previous function (delim.table) and Rolf's little function spotted it. Thanks to both of you for quick and helpful answers. Jim On Fri, Mar 22, 2019 at 9:49 PM Rolf Turner wrote: > > > On 22/03/19 11:18 PM, Jim Lemon wrote: > > > Hi, > > I have been attempting to check a new version of the prettyR package, > > and have struck a difficult problem. The check fails at the > > installation, and when I track the error, it is "Unexpected end of > > input" in the xtab function. I have tried a number of things as I > > thought that it was a non-printing character (I have had that happen > > before). I can paste the entire function into an R session and there > > is no error. Has anyone struck an error like this before? > > > > xtab<-function(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE, > > html=FALSE,bgcol="lightgray") { > > > > if(missing(formula)) > >stop("Usage: > > xtab(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE\n") > > ft<-as.character(attr(terms(formula),"variables")[-1]) > > nft<-length(ft) > > if(nft>2) { > >xt<-list() > >by.factor<-as.factor(data[[ft[nft]]]) > >factor.levels<-levels(by.factor) > >factor.labels<-attr(data[,ft[nft]],"value.labels") > >if(!is.null(names(factor.labels))) factor.labels<-names(factor.levels) > >if(is.null(factor.labels)) factor.labels<-factor.levels > >nlevels<-length(factor.levels) > >for(i in 1:nlevels) { > > currentdata<-subset(data,by.factor==factor.levels[i]) > > for(j in 1:dim(currentdata)[2]) > > attr(currentdata[,j],"value.labels")<-attr(data[,j],"value.labels") > > currentcount<-length(currentdata[[nft]]) > > totalcount<-length(data[[nft]]) > > cat("\nCount for",ft[nft],"=",factor.labels[i],"is",currentcount, > > "(",round(100*currentcount/totalcount,1),"%)\n\n") > > rightside<-ifelse(nft>3,paste(ft[2:(nft-1)],sep="",collapse="+"),ft[2]) > > next.formula<-as.formula(paste(ft[1],rightside,sep="-",collapse="")) > > > > xt[[i]]<-xtab(next.formula,data=currentdata,varnames=varnames,chisq=chisq, > > phi=phi,html=html,bgcol=bgcol) > >} > > } > > else { > >if(missing(data)) > > xt<-calculate.xtab(get(ft[1]),get(ft[2]),varnames=varnames) > >else xt<-calculate.xtab(data[,ft[1]],data[,ft[2]],varnames=varnames) > > } > > attr(xt,"class")<-"xtab" > > return(xt) > > } > > Thanks for any pointers. > > I believe I have encountered phenomena like this where the error was > actually in the *"previous"* function in the sequence of package > functions stored in the *.rdb or *.rdx files in the "R" directory of the > package. > > To track down where the error is actually occurring I cd to the R > directory of the *source* package, start R, and do something like: > > phials <- list.files(pattern=".R$") > for(phial in phials) { > cat(phial,"\n") > source(phial) > } > > That should allow you to spot the loony pretty quickly. > > HTH > > cheers, > > Rolf > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] CRAN review
Not a CRAN maintainer, but from my experience, it sounds like you're hitting some very unusual hiccup here - that's unfortunate. I just had a look around at ftp://cran.r-project.org/incoming/ and your package is not there anymore. Just a wild guess but I wonder if your email reply back to CRAN ends up in their spam folders? BTW, what are the two NOTEs you're getting? Maybe they're avoidable. Since packages with all OKs can go straight through the CRAN incoming checks and be published automatically (at least if the package is already on CRAN), I try to walk an extra mile just avoid NOTEs in my packages even if I know they're false positives. My $.02 /Henrik On Fri, Mar 22, 2019 at 6:28 AM Vissarion Fisikopoulos wrote: > > Hello, > > we have resubmitted the package 'volesti'. I got the email and > confirmed submission. Later I got the confirmation email starting: > "The following package was uploaded to CRAN:..." and then the email on > automated check complaining about the same 2 notes as in the previous > submission. I answered (reply to all) explaining why those notes are > false positives. Then no news for 9 days. Could you please update us > on this. > > Best regards, > Vissarion > > > On Wed, 13 Mar 2019 at 10:15, Τόλης Χαλκής wrote: > > > > Of course we will resubmit. Thank you all for the info. > > > > Chalkis Apostolos > > > > On Wed, 13 Mar 2019 at 10:05, Maëlle SALMON via R-package-devel < > > r-package-devel@r-project.org> wrote: > > > > > > > > > > > > > > -- Forwarded message -- > > > From: "Maëlle SALMON" > > > To: Duncan Murdoch , Henrik Bengtsson < > > > henrik.bengts...@gmail.com> > > > Cc: r-package-devel@r-project.org > > > Bcc: > > > Date: Wed, 13 Mar 2019 07:56:45 + (UTC) > > > Subject: Re: [R-pkg-devel] CRAN review > > > 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 < > > > henrik.bengts...@gmail.com> 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]] > > > > > > > > > > > > > > > -- Forwarded message -- > > > From: "Maëlle SALMON via R-package-devel" > > > To: Duncan Murdoch , Henrik Bengtsson < > > > henrik.bengts...@gmail.com> > > > Cc: r-package-devel@r-project.org > > > Bcc: > > > Date
Re: [R-pkg-devel] CRAN review
Hello, we have resubmitted the package 'volesti'. I got the email and confirmed submission. Later I got the confirmation email starting: "The following package was uploaded to CRAN:..." and then the email on automated check complaining about the same 2 notes as in the previous submission. I answered (reply to all) explaining why those notes are false positives. Then no news for 9 days. Could you please update us on this. Best regards, Vissarion On Wed, 13 Mar 2019 at 10:15, Τόλης Χαλκής wrote: > > Of course we will resubmit. Thank you all for the info. > > Chalkis Apostolos > > On Wed, 13 Mar 2019 at 10:05, Maëlle SALMON via R-package-devel < > r-package-devel@r-project.org> wrote: > > > > > > > > > -- Forwarded message -- > > From: "Maëlle SALMON" > > To: Duncan Murdoch , Henrik Bengtsson < > > henrik.bengts...@gmail.com> > > Cc: r-package-devel@r-project.org > > Bcc: > > Date: Wed, 13 Mar 2019 07:56:45 + (UTC) > > Subject: Re: [R-pkg-devel] CRAN review > > 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 < > > henrik.bengts...@gmail.com> 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]] > > > > > > > > > > -- Forwarded message -- > > From: "Maëlle SALMON via R-package-devel" > > To: Duncan Murdoch , Henrik Bengtsson < > > henrik.bengts...@gmail.com> > > Cc: r-package-devel@r-project.org > > Bcc: > > Date: Wed, 13 Mar 2019 07:56:45 + (UTC) > > Subject: Re: [R-pkg-devel] CRAN review > > __ > > 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] [FORGED] obscure syntax error
On 22/03/19 11:18 PM, Jim Lemon wrote: Hi, I have been attempting to check a new version of the prettyR package, and have struck a difficult problem. The check fails at the installation, and when I track the error, it is "Unexpected end of input" in the xtab function. I have tried a number of things as I thought that it was a non-printing character (I have had that happen before). I can paste the entire function into an R session and there is no error. Has anyone struck an error like this before? xtab<-function(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE, html=FALSE,bgcol="lightgray") { if(missing(formula)) stop("Usage: xtab(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE\n") ft<-as.character(attr(terms(formula),"variables")[-1]) nft<-length(ft) if(nft>2) { xt<-list() by.factor<-as.factor(data[[ft[nft]]]) factor.levels<-levels(by.factor) factor.labels<-attr(data[,ft[nft]],"value.labels") if(!is.null(names(factor.labels))) factor.labels<-names(factor.levels) if(is.null(factor.labels)) factor.labels<-factor.levels nlevels<-length(factor.levels) for(i in 1:nlevels) { currentdata<-subset(data,by.factor==factor.levels[i]) for(j in 1:dim(currentdata)[2]) attr(currentdata[,j],"value.labels")<-attr(data[,j],"value.labels") currentcount<-length(currentdata[[nft]]) totalcount<-length(data[[nft]]) cat("\nCount for",ft[nft],"=",factor.labels[i],"is",currentcount, "(",round(100*currentcount/totalcount,1),"%)\n\n") rightside<-ifelse(nft>3,paste(ft[2:(nft-1)],sep="",collapse="+"),ft[2]) next.formula<-as.formula(paste(ft[1],rightside,sep="-",collapse="")) xt[[i]]<-xtab(next.formula,data=currentdata,varnames=varnames,chisq=chisq, phi=phi,html=html,bgcol=bgcol) } } else { if(missing(data)) xt<-calculate.xtab(get(ft[1]),get(ft[2]),varnames=varnames) else xt<-calculate.xtab(data[,ft[1]],data[,ft[2]],varnames=varnames) } attr(xt,"class")<-"xtab" return(xt) } Thanks for any pointers. I believe I have encountered phenomena like this where the error was actually in the *"previous"* function in the sequence of package functions stored in the *.rdb or *.rdx files in the "R" directory of the package. To track down where the error is actually occurring I cd to the R directory of the *source* package, start R, and do something like: phials <- list.files(pattern=".R$") for(phial in phials) { cat(phial,"\n") source(phial) } That should allow you to spot the loony pretty quickly. HTH cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] obscure syntax error
It could use a little whitespace, but I (and the Rstudio script editor) can't spot anything wrong, like mismatching braces or parens, and all else-at-beginning-of-line is inside the function. Could it be an incomplete last line? -pd > On 22 Mar 2019, at 11:18 , Jim Lemon wrote: > > Hi, > I have been attempting to check a new version of the prettyR package, > and have struck a difficult problem. The check fails at the > installation, and when I track the error, it is "Unexpected end of > input" in the xtab function. I have tried a number of things as I > thought that it was a non-printing character (I have had that happen > before). I can paste the entire function into an R session and there > is no error. Has anyone struck an error like this before? > > xtab<-function(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE, > html=FALSE,bgcol="lightgray") { > > if(missing(formula)) > stop("Usage: > xtab(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE\n") > ft<-as.character(attr(terms(formula),"variables")[-1]) > nft<-length(ft) > if(nft>2) { > xt<-list() > by.factor<-as.factor(data[[ft[nft]]]) > factor.levels<-levels(by.factor) > factor.labels<-attr(data[,ft[nft]],"value.labels") > if(!is.null(names(factor.labels))) factor.labels<-names(factor.levels) > if(is.null(factor.labels)) factor.labels<-factor.levels > nlevels<-length(factor.levels) > for(i in 1:nlevels) { > currentdata<-subset(data,by.factor==factor.levels[i]) > for(j in 1:dim(currentdata)[2]) >attr(currentdata[,j],"value.labels")<-attr(data[,j],"value.labels") > currentcount<-length(currentdata[[nft]]) > totalcount<-length(data[[nft]]) > cat("\nCount for",ft[nft],"=",factor.labels[i],"is",currentcount, >"(",round(100*currentcount/totalcount,1),"%)\n\n") > rightside<-ifelse(nft>3,paste(ft[2:(nft-1)],sep="",collapse="+"),ft[2]) > next.formula<-as.formula(paste(ft[1],rightside,sep="-",collapse="")) > xt[[i]]<-xtab(next.formula,data=currentdata,varnames=varnames,chisq=chisq, >phi=phi,html=html,bgcol=bgcol) > } > } > else { > if(missing(data)) xt<-calculate.xtab(get(ft[1]),get(ft[2]),varnames=varnames) > else xt<-calculate.xtab(data[,ft[1]],data[,ft[2]],varnames=varnames) > } > attr(xt,"class")<-"xtab" > return(xt) > } > Thanks for any pointers. > > Jim > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] obscure syntax error
Hi, I have been attempting to check a new version of the prettyR package, and have struck a difficult problem. The check fails at the installation, and when I track the error, it is "Unexpected end of input" in the xtab function. I have tried a number of things as I thought that it was a non-printing character (I have had that happen before). I can paste the entire function into an R session and there is no error. Has anyone struck an error like this before? xtab<-function(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE, html=FALSE,bgcol="lightgray") { if(missing(formula)) stop("Usage: xtab(formula,data,varnames=NULL,or=TRUE,chisq=FALSE,phi=FALSE\n") ft<-as.character(attr(terms(formula),"variables")[-1]) nft<-length(ft) if(nft>2) { xt<-list() by.factor<-as.factor(data[[ft[nft]]]) factor.levels<-levels(by.factor) factor.labels<-attr(data[,ft[nft]],"value.labels") if(!is.null(names(factor.labels))) factor.labels<-names(factor.levels) if(is.null(factor.labels)) factor.labels<-factor.levels nlevels<-length(factor.levels) for(i in 1:nlevels) { currentdata<-subset(data,by.factor==factor.levels[i]) for(j in 1:dim(currentdata)[2]) attr(currentdata[,j],"value.labels")<-attr(data[,j],"value.labels") currentcount<-length(currentdata[[nft]]) totalcount<-length(data[[nft]]) cat("\nCount for",ft[nft],"=",factor.labels[i],"is",currentcount, "(",round(100*currentcount/totalcount,1),"%)\n\n") rightside<-ifelse(nft>3,paste(ft[2:(nft-1)],sep="",collapse="+"),ft[2]) next.formula<-as.formula(paste(ft[1],rightside,sep="-",collapse="")) xt[[i]]<-xtab(next.formula,data=currentdata,varnames=varnames,chisq=chisq, phi=phi,html=html,bgcol=bgcol) } } else { if(missing(data)) xt<-calculate.xtab(get(ft[1]),get(ft[2]),varnames=varnames) else xt<-calculate.xtab(data[,ft[1]],data[,ft[2]],varnames=varnames) } attr(xt,"class")<-"xtab" return(xt) } Thanks for any pointers. Jim __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel