Re: [R-pkg-devel] CartogRaflow submission

2023-10-18 Thread Jim Lemon
Please delete drjimle...@gmail.com from your mailing list. He passed away a
month ago.
Regards,
Juel
Wife

On Tue, 17 Oct 2023, 18:13 cartograf...@gmail.com  Hi, I've put an update version of the package cartogRaflow 1.0.4 in CRAN
> today.
> There are 2 errors
> Last released version's CRAN status: OK: 11, ERROR: 2
> See: <
> https://cran-archive.r-project.org/web/checks/2023/2023-10-16_check_results_cartograflow.html
> >
>
> The version 1.0.3 was archived today.
> I would like to know if these errors are due to the version 1.0.3 was
> archived. If yes, is it possible to fix these errors? Thanks in
> advance Sylvain
> [[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]]

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


Re: [R-pkg-devel] CMD check: Examples vs DEPENDS pkg

2023-10-18 Thread Jim Lemon
Please delete drjimle...@gmail.com from your mailing list. He passed away a
month ago.
Regards,
Juel
Wife

On Wed, 18 Oct 2023, 06:35 Leonard Mada via R-package-devel <
r-package-devel@r-project.org wrote:

> Dear List members,
>
> Package Rpdf depends on package rgl. Multiple examples will call
> internally the rgl package to visualize the pdb molecule.
>
> When performing the CMD check:
> 1) Is the rgl package loaded each time anew for any of those examples?
>
> 2) If this is the case:
> Is it possible to load it only once per CMD check?
>
> Sincerely,
>
> Leonard
>
> __
> 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


Re: [R-pkg-devel] winbuilder

2023-10-18 Thread Jim Lemon
Please delete drjimle...@gmail.com from your mailing list. He passed away a
month ago.
Regards,
Juel
Wife

On Thu, 19 Oct 2023, 02:17 Roy Mendelssohn - NOAA Federal via
R-package-devel  I am not sure who is the appropriate person to contact,  but thought I
> would try here since WInbuilder is a big help in package testing.
> Winbuilder appears to be down at the moment.
>
> Thanks,
>
> -Roy
>
> **
> "The contents of this message do not reflect any position of the U.S.
> Government or NOAA."
> **
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> ***Note new street address***
> 110 McAllister Way
> Santa Cruz, CA 95060
> Phone: (831)-420-3666
> Fax: (831) 420-3980
> e-mail: roy.mendelss...@noaa.gov www: https://www.pfeg.noaa.gov/
>
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected"
> "the arc of the moral universe is long, but it bends toward justice" -MLK
> Jr.
>
> __
> 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


Re: [R-pkg-devel] [FORGED] obscure syntax error

2019-03-22 Thread Jim Lemon
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


[R-pkg-devel] obscure syntax error

2019-03-22 Thread Jim Lemon
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


Re: [R-pkg-devel] R graphics 'text' package 'adj' parameter order wrong incorrect reversed?

2018-09-18 Thread Jim Lemon
Hi Simon,
I think the conventions of typesetting are to blame. Think of an
invisible box around the text being displayed.
__
|Left justification  |
|-|
meaning that the text _starts_ at the left of the field and is to the
right of the text position specified
__
|Right justification|
|-|

meaning that the text _ends_ at the right of the field and is to the
left of the text position. Can't do the top and bottom justification
this way, but I think you get the idea.

Jim

On Wed, Sep 19, 2018 at 9:13 AM Simon Dedman  wrote:
>
> Original stack overflow post here:
> https://stackoverflow.com/questions/52194719/r-graphic-text-package-adj-parameter-order-wrong-incorrect-reversed
>
> Hopefully this is now the appropriate place to post this as the above post
> got a single comment of agreement.
>
> Content:
>
> I believe R core package graphics text function's adj parameter is
> incorrectly described in the manual
>  and
> would be grateful if someone could confirm this before I submit a bug report
> .
>
> adj text:
>
> adj allows adjustment of the text with respect to (x, y). Values of 0, 0.5,
> and 1 specify left/bottom, middle and right/top alignment, respectively.
>
> Since text controls these labels and not the points which have already been
> plotted, I can't see how "with respect to x,y" can mean anything other than
> "in this direction relative to their points".
>
> However the order is reversed: 0,0 (supposedly left & bottom) is top &
> right; 1,1 (supposedly right & top) is left and bottom.
>
> Reproducible example:
>
> tens = 1:10
> plot(tens, tens, xlab = "adj 0,0 left/bottom")
> text(tens, tens, labels = letters[tens], adj = c(0,0))
> plot(tens, tens, xlab = "adj 0.5,0.5 middle")
> text(tens, tens, labels = letters[tens], adj = c(0.5,0.5))
> plot(tens, tens, xlab = "adj 1,1 right/top")
> text(tens, tens, labels = letters[tens], adj = c(1,1))
>
> Thanks.
>
> [[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] making packages available for 3.4.2

2017-10-22 Thread Jim Lemon
Hi Uwe,
I don't know what the problem was, but I just tried again and
everything went smoothly. I did use a different mirror (Perth instead
of Canberra), but the problem appears to be solved.

Jim


On Mon, Oct 23, 2017 at 8:46 AM, Uwe Ligges
<lig...@statistik.tu-dortmund.de> wrote:
> Not sure what you did, but e.g.
> https://cran.r-project.org/web/packages/plotrix/index.html
> shows that the sources and binaries are available and I just verified that
> the Windows binary is actually on the CRAN master.
>
> So perhaps your internet connection was flaky or you used a broken mirror?
>
> Best,
> Uwe Ligges
>
>
>
>
>
> On 22.10.2017 23:27, Jim Lemon wrote:
>>
>> Hi Uwe,
>> I know that plotrix and prettyR return this message when I tried to
>> install them last night (I'm not on my usual PC). I also maintain
>> clinsig, crank and eventInterval. I'll try to install these to see if
>> the same thing happens.
>>
>> Jim
>>
>> On Mon, Oct 23, 2017 at 8:23 AM, Uwe Ligges
>> <lig...@statistik.tu-dortmund.de> wrote:
>>>
>>> It would be helpful to know which packages you are talking about.
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>>
>>> On 22.10.2017 23:22, Jim Lemon wrote:
>>>>
>>>>
>>>> I noticed yesterday that at least two packages that I maintain were
>>>> "not available for R-3.4.2". Obviously I would not like to drift into
>>>> obsolescence, and I know that the packages function with 3.4.2 as I
>>>> have been using them on a daily basis. Clearly I have missed something
>>>> about package management that marks a package as suitable for the
>>>> current version. Any hints will be greatly appreciated.
>>>>
>>>> Jim
>>>>
>>>> __
>>>> 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] making packages available for 3.4.2

2017-10-22 Thread Jim Lemon
Hi Uwe,
I know that plotrix and prettyR return this message when I tried to
install them last night (I'm not on my usual PC). I also maintain
clinsig, crank and eventInterval. I'll try to install these to see if
the same thing happens.

Jim

On Mon, Oct 23, 2017 at 8:23 AM, Uwe Ligges
<lig...@statistik.tu-dortmund.de> wrote:
> It would be helpful to know which packages you are talking about.
>
> Best,
> Uwe Ligges
>
>
>
> On 22.10.2017 23:22, Jim Lemon wrote:
>>
>> I noticed yesterday that at least two packages that I maintain were
>> "not available for R-3.4.2". Obviously I would not like to drift into
>> obsolescence, and I know that the packages function with 3.4.2 as I
>> have been using them on a daily basis. Clearly I have missed something
>> about package management that marks a package as suitable for the
>> current version. Any hints will be greatly appreciated.
>>
>> Jim
>>
>> __
>> 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


[R-pkg-devel] making packages available for 3.4.2

2017-10-22 Thread Jim Lemon
I noticed yesterday that at least two packages that I maintain were
"not available for R-3.4.2". Obviously I would not like to drift into
obsolescence, and I know that the packages function with 3.4.2 as I
have been using them on a daily basis. Clearly I have missed something
about package management that marks a package as suitable for the
current version. Any hints will be greatly appreciated.

Jim

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


Re: [R-pkg-devel] tibbles are not data frames

2017-09-26 Thread Jim Lemon
I suppose that it is far too late to offer such a suggestion, but it
seems to me that the problem is in some measure the mechanism of
inheritance.

First, the tibble (although the name is incomprehensible, why not
something like "data.blob") is superior to the bog standard R
data.frame.

This may not be a good metaphor, but consider the problem of including
tigers in the mixed martial arts competitions. Tigers are much better
than the average (or perhaps all) MMA fighters at damaging their
opponents. However, they change the whole game. All of the usual
techniques are out the window if one encounters a tiger.

Suppose the tibble (or data.blob) did not inherit from the data.frame,
but had a different path of inheritance. Like the evolutionary
development of Felidae and Hominoidea, it would branch way back around
Mammalia. Then it would not fool the referees into letting it into the
MMA competition. If one wanted to use the improved functionality, it
would not be necessary to consider whether this thing that said it was
a data frame had too much hair and retractable claws. I can't say
whether this is an effective suggestion or even a good one, but I
thought it was worthwhile making.

Jim

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


[R-pkg-devel] Plotrix install bug with Umlauts in path name

2017-08-22 Thread Jim Lemon
Hi,
I received the message below a few days ago. I have no idea why the
plotrix package should not install properly to a directory with
umlauts in the path name. Apparently other packages do install
properly for the OP. If any package gurus know the answer to this, I
would be happy to hear about it as if there is a problem with the
plotrix package I would like to fix it. Thanks.

Jim

Original message

Just wanted to let you know, that installing plotrix on a Windows
machine where my userprofile path has Umlauts fails. Installing into
another directory runs fine.

If you want to look into this, I am happy to provide logs and help where I can.

Cheers, André

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

[R-pkg-devel] Latex got me

2017-05-05 Thread Jim Lemon
Hi,
In adding a contributed function to the plotrix package, I keep
getting a latex error:

* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! File ended while scanning use of \HeaderA.

   \par
<*> \input ./Rd2.tex

! Emergency stop.
<*> \input ./Rd2.tex

*** (job aborted, no legal \end found)

!  ==> Fatal error occurred, no output PDF file produced!
* checking PDF version of manual without hyperrefs or index ... ERROR
* DONE

I thought it might be an errant character in the Rd file, and after
quite a bit of staring at a hex editor, I just retyped the whole
thing. Everything runs okay except for this error. The file ends with
the same line as many other Rd files in plotrix:

\keyword{misc}

and the last character is a line feed (0x0A). If I remove the function
and man page, the error goes away. Thanks to any Sherlock out there.

Jim

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


Re: [R-pkg-devel] UseR! Session: Navigating the jungle of R packages.

2017-02-10 Thread Jim Lemon
This discussion started me thinking about searching for a function or
package, as many questions on the R help list indicate the that poster
couldn't find (or hasn't searched for) what they want. I don't think I
have ever used task views. If I haven't got a clue where to look for
something, I use Google. I can't recall an occasion when I didn't get
an answer, even if it was that what I wanted didn't exist. Perhaps we
should ask why Google is so good at answering uninformed questions, in
particular about R. I'm not the only person on the help list who
advises the clueless to try Google.

Jim


On Sat, Feb 11, 2017 at 3:51 AM, Ben Bolker  wrote:
>   I definitely read the task views and advise others to do so.  I
> don't know how representative my little corner of the world is,
> though.
>
>   I have an embryonic task view on mixed models at
> https://github.com/bbolker/mixedmodels-misc/blob/master/MixedModels.ctv
> but the perfect is the enemy of the good ...
>
>
> On Fri, Feb 10, 2017 at 9:56 AM, J C Nash  wrote:
>> We'd be more than happy to have you contribute directly. The goal is not
>> just an
>> information session, but to get some movement to ways to make the package
>> collection(s)
>> easier to use effectively. Note to selves: "effectively" is important -- we
>> could make
>> things easy by only recommending a few packages.
>>
>> Best, JN
>>
>>
>> On 2017-02-10 09:29 AM, Michael Dewey wrote:
>>>
>>> Dear all
>>>
>>> That seems an interesting session. I am the maintainer of one of the CRAN
>>> Task Views (MetaAnalysis) and will attend
>>> unless I am successful in the draw for Wimbledon tickets.
>>>
>>> Just in case I strike lucky one question I would have raised from the
>>> floor if I were there would have been "Does anyone
>>> read the Task Views?". Since I started mine I have received only a couple
>>> of suggestions for additions including a very
>>> abrupt one about a package which had been included for months but whose
>>> author clearly did not read before writing. So I
>>> would ask whether we need to focus much energy on the Task Views.
>>>
>>> So, maybe see you there, maybe not.
>>>
>>>
>>> On 16/01/2017 14:57, ProfJCNash wrote:

 Navigating the Jungle of R Packages

 The R ecosystem has many packages in various collections,
 especially CRAN, Bioconductor, and GitHub. While this
 richness of choice speaks to the popularity and
 importance of R, the large number of contributed packages
 makes it difficult for users to find appropriate tools for
 their work.

 A session on this subject has been approved for UseR! in
 Brussels. The tentative structure is three short
 introductory presentations, followed by discussion or
 planning work to improve the tools available to help
 users find the best R package and function for their needs.

 The currently proposed topics are

 - wrapper packages that allow diverse tools that perform
   similar functions to be accessed by unified calls

 - collaborative mechanisms to create and update Task Views

 - search and sort tools to find packages.

 At the time of writing we have tentative presenters for
 the topics, but welcome others. We hope these presentations
 at useR! 2017 will be part of a larger discussion that will
 contribute to an increased team effort after the conference
 to improve the the support for R users in these areas.


 John Nash, Julia Silge, Spencer Graves

 __
 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
>
> __
> 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] How to create choices in a function call.

2016-08-22 Thread Jim Lemon
Hi Vineetha,
It sounds like you want the "do.call" function and an argument in your
"one function" to specify the function that you want to call.

Jim


On Tue, Aug 23, 2016 at 6:43 AM, Vineetha Warriyar Kodalore Vijayan
 wrote:
> Dear R package developers,
>
> I'm trying to create a small R package that gives me an epidemic from 
> different epidemic models. I have imported the source codes from fortran for 
> different models, say epidata1(),epidata2() and so on and it works fine. My 
> question here is, how I can do the same by calling one function in R, which 
> gives me options to input different model formulas and corresponding 
> parameters.
> I'm relatively new in R programming and package building. I googled a lot and 
> read about S3 and S4 methods, but really
> couldn't figure out  how/where to start. I would really appreciate any 
> help/guidance.
>
> Thank you,
> Vineetha
>
> [[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] Possible mis-spelled words ...

2016-07-21 Thread Jim Lemon
Hi all,
I had a quick look through the tools package, but was unable to find
the function that checks the DESCRIPTION file. From the look of the
functions I did examine, it looks like there will be a call somewhere
to a spell checker for DESCRIPTION. As I notice a lot of spelling
mistakes in the help files, spell checking is probably not done for
most files (or maintainers ignore the notes). Perhaps an argument to
turn off spell checking (--nospell) might solve the problem as
misspelling of a crucial word would throw an error regardless.

Jim


On Fri, Jul 22, 2016 at 8:39 AM, Rolf Turner  wrote:
> On 22/07/16 10:34, Duncan Murdoch wrote:
>>
>> On 21/07/2016 5:48 PM, Rolf Turner wrote:
>>>
>>>
>>> I just had a revision of a package built by win-builder, as a way of
>>> exposing it to a rigorous check before uploading it to CRAN.
>>>
>>> The 00check.log contained the note:
>>>
>>>  > Possibly mis-spelled words in DESCRIPTION:
>>>  >   Delaunay (4:8, 10:29)
>>>  >   Voronoi (4:46, 11:5)
>>>  >   triangulations (12:28)
>>>
>>> The spellings are, as far as I can tell correct.  Is there a way of
>>> telling the package checker that these spellings are OK?
>>
>>
>> You can put them in single quotes, and the spell checker won't check
>> them.  Of course, that would make your DESCRIPTION look like crap.
>>
>> You'll just have to throw yourself on the mercy of the CRAN judges.
>
>
> Thanks Duncan.  May the judges be merciful! :-)
>
> cheers,
>
> Rolf
>
> --
> Technical Editor ANZJS
> 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

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


Re: [R-pkg-devel] S3 length method behavior

2016-02-01 Thread Jim Lemon
Hi Nathan,
Perhaps if you defined your "length" object as "nbm" (number of binary
messages), it would not interfere with the default "length".

Jim


On Tue, Feb 2, 2016 at 12:46 AM, Georgi Boshnakov <
georgi.boshna...@manchester.ac.uk> wrote:

> Hi,
>
> >I have run into an issue while developing an R package. Specifically, my
> issue relates to what happens when I define an S3 length
> >method for my class. Here is my basic setup:
>
> ># Here is the structure of myClass
> ># uses an externalptr to operate on file using some C functions list(file
> = "my/file/location", handle = )
>
> ># this function gets an S3Method() in NAMESPACE length.myClass <-
> function(x) {
>  > .Call("get_class_length",myPkg)
> >}
>
> >As you can see, myClass is just a list of two pieces of information about
> the particular object. Without a defined length method, length(myClass)
> would be 2. However, I defined a length method to give me the information
> about the amount of binary messages contained in the file the object points
> to. In one of my test files there are 82 messages and length(myObject)
> correctly returns 82. What I ran into is that I was crashing RStudio when
> rebuilding my package with an object of myClass in my environment. Only
> > removing my S3 length method caused the crash to not occur. After
> looking for memory leaks and other errors I finally noticed that > the
> str() on the object of myClass looked odd. It returned something like this:
> > List of 82
> > $ file  : chr "my/file/location"
> > $ handle:
>  >$ NA:
> >Error in object[[i]] : subscript out of bounds
>
>
> You could define methods for indexing ("[" and "[[") for objects from your
> class.
> Since you have not defined special subsetting methods for your class, R
> uses a default one,  but honours your length(), hence the mess.
>
> Regards,
> Georgi Boshnkaov
>
>
> -Original Message-
> From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On
> Behalf Of Nathan Wendt
> Sent: 30 January 2016 19:25
> To: r-package-devel@r-project.org
> Subject: [R-pkg-devel] S3 length method behavior
>
> Hello,
>
> I have run into an issue while developing an R package. Specifically, my
> issue relates to what happens when I define an S3 length method for my
> class. Here is my basic setup:
>
> # Here is the structure of myClass
> # uses an externalptr to operate on file using some C functions list(file
> = "my/file/location", handle = )
>
> # this function gets an S3Method() in NAMESPACE length.myClass <-
> function(x) {
>   .Call("get_class_length",myPkg)
> }
>
> As you can see, myClass is just a list of two pieces of information about
> the particular object. Without a defined length method, length(myClass)
> would be 2. However, I defined a length method to give me the information
> about the amount of binary messages contained in the file the object points
> to. In one of my test files there are 82 messages and length(myObject)
> correctly returns 82. What I ran into is that I was crashing RStudio when
> rebuilding my package with an object of myClass in my environment. Only
> removing my S3 length method caused the crash to not occur. After looking
> for memory leaks and other errors I finally noticed that the str() on the
> object of myClass looked odd. It returned something like this:
>
> List of 82
>  $ file  : chr "my/file/location"
>  $ handle:
>  $ NA:
> Error in object[[i]] : subscript out of bounds
>
> It seems that when I define an S3 method for length that somehow the
> object of myClass then gets restructured to have the length returned by the
> function. There are 82 messages in the file, but myClass objects should
> only have two elements. My best guess here is that the RStudio crash was
> happening because the object was misrepresented internally. Of course, I
> cannot be sure. None of my tests pointed to anything useful.
>
> My questions are, then, whether this behavior makes sense and what to do
> about it. If I define my own str() method, will that fix it? I think I am
> just misunderstanding what is going on with the methods I have defined.
> Hopefully, someone can offer some clarity.
>
> Thanks,
>
> [[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
>

[[alternative HTML version deleted]]

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


[R-pkg-devel] R-devel installation and libcurl

2015-10-16 Thread Jim Lemon
Hi,
I have been attempting to install R-devel to check updated packages for
CRAN. After reading the relevant section in R Installation and
Administration, searching and a lot of unsuccessful fiddling with
"configure", I thought I might as well ask.

Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Fedora 21 (Twenty One)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

configure hits the wall when checking for libcurl. I installed libcurl
v7.37.0 and while it is recognized, I have not succeeded in getting it to
find curl.h (it's in /usr/include/curl/curl.h). R Installation ahd
Administration seems to suggest that the path information should be put in
MkRules.local. However, that file is nowhere to be found. Neither can I
find any variable in "configure" that specifies where to look for curl.h.

I'm sure that this is very simple, but if anyone can provide a method to
stop the:

...
checking curl/curl.h usability... no
checking curl/curl.h presence... no
checking for curl/curl.h... no
configure: error: libcurl >= 7.28.0 library and headers are required with
support for https

error I would be most grateful.

Jim

[[alternative HTML version deleted]]

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


Re: [Rd] [R] Internalization of help pages

2013-08-06 Thread Jim Lemon

On 08/06/2013 12:12 AM, Tomáš Greif wrote:

My original idea was to start translating Rd files directly. It looks
easy to just skip all the tags and translate rest (but maybe I'm wrong
on this). I'm sure we can figure out better ways to do this later.
...
That was essentially the way I did the translation. I was thinking more 
of a distributed solution, with either package maintainers or foreign 
language R groups (or both) creating packages with non-English help 
files that could be downloaded from non-CRAN sites. The Babel problem 
has flung many an open source project into a tar pit of ever-expanding 
dimensions.


I liked the following:


However, getting all the R documentation translated is probably easier
than getting everyone to speak english - we started trying to do that
in the 18th century and look how that turned out...

Barry

but maybe getting most of the people to speak English all of the time 
(pace Abraham Lincoln) remains the optimal solution.


Jim

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


Re: [Rd] [R] read.csv behaviour

2011-09-28 Thread Jim Lemon

On 09/28/2011 09:23 AM, Mehmet Suzen wrote:


This might be obvious but I was wondering if anyone knows quick and easy
way of writing out a CSV file with varying row lengths, ideally an
initial data read from a CSV file which has the same format. See example
below.


I found it quite strange that R cannot write it in one go, so one must
append blocks or post-process the file, is this true? (even Ruby can do
it!!)

Otherwise it puts ,, or similar for missing column values in the
shorter length rows and fill=FALSE option do not work!

I don't want to post-process if possible.

See this post:
http://r.789695.n4.nabble.com/Re-read-csv-trap-td3301924.html

Example that generated Error!

writeLines(c(A,B,C,D,
  1,a,b,c,
  2,f,g,c,
  3,a,i,j,
  4,a,b,c,
  5,d,e,f,
  6,g,h,i,j,k,l,m,n),
con=file(test.csv))

read.csv(test.csv)
try(read.csv(test.csv,fill=FALSE))


Hi Mehmet,
The example doesn't need to call file, writeLines does it for you. It 
worked for me:


 writeLines(c(A,B,C,D,
  1,a,b,c,
  2,f,g,c,
  3,a,i,j,
  4,a,b,c,
  5,d,e,f,
  6,g,h,i,j,k,l,m,n),
con=test.csv)

and to get the original object back, use:

readLines(test.csv)

The reason you can't use read.csv is that it returns a data frame, and 
that object can't have elements of unequal length. If you want an object 
with elements of unequal length, try:


as.list(readLines(test.csv))

Jim

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