Re: [R-pkg-devel] ω, α, η, ² in .Rd files

2017-02-10 Thread Uwe Ligges



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package documentation,
but am having difficulty getting it to work on windows. it works find on
macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding. I 
do not use roxygen2, hence don't know how it can work at all, I'd simply 
do it in the Rd file directly.


2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega 
symbol. Hence I'd rather write

\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}

Best,
Uwe Ligges








i have `Encoding: UTF-8` specified in my DESCRIPTION

i have read:

https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Encoding-issues
https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Encoding
https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Insertions

any tips on how to get these symbols into documentation on windows? i'd
even by happy with it just saying 'omega' on windows (which is what i
thought \enc{}{} was supposed to do).

apparently i'm missing something.

with thanks

jonathon

__
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] ω, α, η, ² in .Rd files

2017-02-10 Thread Jonathon Love

hi uwe,


On 10/2/17 23:40, Uwe Ligges wrote:



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package documentation,
but am having difficulty getting it to work on windows. it works find on
macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding. 
I do not use roxygen2, hence don't know how it can work at all, I'd 
simply do it in the Rd file directly.


2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega 
symbol. Hence I'd rather write

\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}


thanks for explaining this

unfortunately this doesn't work with the html or plain-text help (i 
assume it does work with the PDF manuals). in the html/plain text help, 
it always puts the plain ascii 'omega', rather than the actual symbol.


so it's seeming like it's not possible to have special chars in the html 
or plain-text help, without upsetting the winbuilder?


if i have to use the plain ascii 'omega', 'eta', 'alpha', it won't be 
the end of the world.


with thanks

jonathon

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

Re: [R-pkg-devel] ω, α, η, ² in .Rd files

2017-02-10 Thread Uwe Ligges



On 10.02.2017 14:52, Jonathon Love wrote:

hi uwe,


On 10/2/17 23:40, Uwe Ligges wrote:



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package documentation,
but am having difficulty getting it to work on windows. it works find on
macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding.
I do not use roxygen2, hence don't know how it can work at all, I'd
simply do it in the Rd file directly.

2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega
symbol. Hence I'd rather write
\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}


thanks for explaining this

unfortunately this doesn't work with the html or plain-text help (i
assume it does work with the PDF manuals). in the html/plain text help,
it always puts the plain ascii 'omega', rather than the actual symbol.


Right, that was intended.



so it's seeming like it's not possible to have special chars in the html
or plain-text help, without upsetting the winbuilder?


You can try to insert \enc{}{} versions, but then in the Rd files, that 
is not related to winbiulder only but R in general.
And you have to exclude LaTeX as the UTF-8 symbol for omega cannot be 
handled by all LaTeX versions, apparently.


Best,
Uwe



if i have to use the plain ascii 'omega', 'eta', 'alpha', it won't be
the end of the world.

with thanks

jonathon

__
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] UseR! Session: Navigating the jungle of R packages.

2017-02-10 Thread Michael Dewey

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



--
Michael
http://www.dewey.myzen.co.uk/home.html

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


Re: [R-pkg-devel] ω, α, η, ² in .Rd files

2017-02-10 Thread Duncan Murdoch

On 10/02/2017 8:52 AM, Jonathon Love wrote:

hi uwe,


On 10/2/17 23:40, Uwe Ligges wrote:



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package documentation,
but am having difficulty getting it to work on windows. it works find on
macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding.
I do not use roxygen2, hence don't know how it can work at all, I'd
simply do it in the Rd file directly.

2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega
symbol. Hence I'd rather write
\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}


thanks for explaining this

unfortunately this doesn't work with the html or plain-text help (i
assume it does work with the PDF manuals). in the html/plain text help,
it always puts the plain ascii 'omega', rather than the actual symbol.

so it's seeming like it's not possible to have special chars in the html
or plain-text help, without upsetting the winbuilder?

if i have to use the plain ascii 'omega', 'eta', 'alpha', it won't be
the end of the world.



I suspect you are making things harder for yourself by using Roxygen2. 
As Uwe and the manual say, .R files need to be plain ASCII to be 
portable.  You can include Unicode escapes in strings.


Perhaps Roxygen2 has some way to process Unicode escapes in comments; 
you'll have to ask its authors.  If you include raw UTF-8 characters in 
the comments, they'll be processed differently in UTF-8 locales versus 
others.  So you might get away with doing this if Roxygen2 always runs 
in a UTF-8 locale, but on Windows you will see problems.


Duncan Murdoch

__
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 J C Nash

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


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

2017-02-10 Thread Ben Bolker
  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


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] ω, α, η, ² in .Rd files

2017-02-10 Thread Jonathon Love

hi duncan,


On 11/2/17 01:44, Duncan Murdoch wrote:

On 10/02/2017 8:52 AM, Jonathon Love wrote:

hi uwe,


On 10/2/17 23:40, Uwe Ligges wrote:



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package 
documentation,
but am having difficulty getting it to work on windows. it works 
find on

macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding.
I do not use roxygen2, hence don't know how it can work at all, I'd
simply do it in the Rd file directly.

2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega
symbol. Hence I'd rather write
\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}


thanks for explaining this

unfortunately this doesn't work with the html or plain-text help (i
assume it does work with the PDF manuals). in the html/plain text help,
it always puts the plain ascii 'omega', rather than the actual symbol.

so it's seeming like it's not possible to have special chars in the html
or plain-text help, without upsetting the winbuilder?

if i have to use the plain ascii 'omega', 'eta', 'alpha', it won't be
the end of the world.



I suspect you are making things harder for yourself by using Roxygen2. 
As Uwe and the manual say, .R files need to be plain ASCII to be 
portable.  You can include Unicode escapes in strings.


yup, although if the encoding of the comments in the .R files are 
completely misunderstood by system, it shouldn't make any difference to 
the resultant package. Or is there a way that it could interfere?


of course, the CRAN checks are unlikely to appreciate this subtlety, so 
i guess i'm on the hook there.


Perhaps Roxygen2 has some way to process Unicode escapes in comments; 
you'll have to ask its authors.  If you include raw UTF-8 characters 
in the comments, they'll be processed differently in UTF-8 locales 
versus others.  So you might get away with doing this if Roxygen2 
always runs in a UTF-8 locale, but on Windows you will see problems.


yup, i'd reached these conclusions - but always helpful to have someone 
else spell things out.


with thanks

jonathon

__
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 Marc Schwartz
Hi All,

A few points:

1. With respect to the CRAN Task Views, they are arguably buried a bit in the 
menus and that may contribute to low traffic. There is no direct link from the 
R Home page, albeit, there is a link on the main CRAN page, which is not 
prominent. I wonder if it might be reasonable for the main R web site 
maintainers to consider putting a link to the Task Views just below the CRAN 
link in the Download section or, perhaps better, in the Documentation section.

2. A group of us, led by Frank Harrell, who met during the DSC meeting out at 
Stanford last summer after the useR! meeting worked on modifying the online 
content for getting "Help with R" on the main R site home page. We added a 
brief section on the Task Views in the "R Help on the Internet" section to at 
least incrementally raise awareness:

  https://www.r-project.org/help.html

3. I see that Spencer's name is listed below and would presume that his 'sos' 
package would be featured in such a presentation? We also mention 'sos' on the 
above help page.

4. I would echo Jim's comments below regarding the use of Google, but I would 
add the use of http://www.rseek.org, which does have a tab for 'packages' on 
the results page when doing keyword searches. rseek.org is my first resource 
when searching for functionality in packages or posts to the lists.


Regards,

Marc Schwartz


> On Feb 10, 2017, at 4:26 PM, Jim Lemon  wrote:
> 
> 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 use

Re: [R-pkg-devel] ω, α, η, ² in .Rd files

2017-02-10 Thread Duncan Murdoch

On 10/02/2017 5:28 PM, Jonathon Love wrote:

hi duncan,


On 11/2/17 01:44, Duncan Murdoch wrote:

On 10/02/2017 8:52 AM, Jonathon Love wrote:

hi uwe,


On 10/2/17 23:40, Uwe Ligges wrote:



On 10.02.2017 03:19, Jonathon Love wrote:

hi,

i'm trying to include some greek characters in my package
documentation,
but am having difficulty getting it to work on windows. it works
find on
macOS, linux, but throws errors on windows:

https://win-builder.r-project.org/guwReC6lhQaU/00check.log

so far i have tried:

ω
\u03C9
\omega
\eqn{\omega}
\symbol{"03C9}
\enc{ω}{omega}




The latter is right in principle, but two issues:

1- you use it in an .R file which should no assume a special encoding.
I do not use roxygen2, hence don't know how it can work at all, I'd
simply do it in the Rd file directly.

2- Thge LaTeX version on winbuilder cannot deal with an UTF-8 omega
symbol. Hence I'd rather write
\eqn{\omega}{omega}
or to square it:
\eqn{\omega^2}{omega^2}


thanks for explaining this

unfortunately this doesn't work with the html or plain-text help (i
assume it does work with the PDF manuals). in the html/plain text help,
it always puts the plain ascii 'omega', rather than the actual symbol.

so it's seeming like it's not possible to have special chars in the html
or plain-text help, without upsetting the winbuilder?

if i have to use the plain ascii 'omega', 'eta', 'alpha', it won't be
the end of the world.



I suspect you are making things harder for yourself by using Roxygen2.
As Uwe and the manual say, .R files need to be plain ASCII to be
portable.  You can include Unicode escapes in strings.


yup, although if the encoding of the comments in the .R files are
completely misunderstood by system, it shouldn't make any difference to
the resultant package. Or is there a way that it could interfere?


Roxygen2 will take the comments and write out .Rd files.  Those files 
need to be written in ASCII, or the declared encoding of the package, 
not of the locale where Roxygen2 was run.  (R and CRAN know nothing 
about Roxygen2, they just look at the Rd files as though they were 
written by you.)


So I think it should be possible for all of this to work:  If you write 
your comments in UTF-8 and declare that as the encoding of the package, 
then Roxygen2 should read the .R files as UTF-8 files, and write out 
UTF-8 Rd files, regardless of the locale.  But encodings of strings go 
through several translations internally in R, so there may be some step 
there that loses the original intent.  And Roxygen2 may be just ignoring 
encodings, which would almost certainly go badly.


Duncan Murdoch



of course, the CRAN checks are unlikely to appreciate this subtlety, so
i guess i'm on the hook there.


Perhaps Roxygen2 has some way to process Unicode escapes in comments;
you'll have to ask its authors.  If you include raw UTF-8 characters
in the comments, they'll be processed differently in UTF-8 locales
versus others.  So you might get away with doing this if Roxygen2
always runs in a UTF-8 locale, but on Windows you will see problems.


yup, i'd reached these conclusions - but always helpful to have someone
else spell things out.

with thanks

jonathon

__
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] ω, α, η, ² in .Rd files

2017-02-10 Thread Jonathon Love

hi duncan,

yup, although if the encoding of the comments in the .R files are
completely misunderstood by system, it shouldn't make any difference to
the resultant package. Or is there a way that it could interfere?


Roxygen2 will take the comments and write out .Rd files.  Those files 
need to be written in ASCII, or the declared encoding of the package, 
not of the locale where Roxygen2 was run.  (R and CRAN know nothing 
about Roxygen2, they just look at the Rd files as though they were 
written by you.)


So I think it should be possible for all of this to work:  If you 
write your comments in UTF-8 and declare that as the encoding of the 
package, then Roxygen2 should read the .R files as UTF-8 files, and 
write out UTF-8 Rd files, regardless of the locale. But encodings of 
strings go through several translations internally in R, so there may 
be some step there that loses the original intent.  And Roxygen2 may 
be just ignoring encodings, which would almost certainly go badly.


yup, this all works as you describe. the only wrinkle is that the CRAN 
checks on windows don't like non-ascii characters appearing in the .R 
files (which they would if one puts special chars in one's roxygen 
annotations).


cheers

jonathon

__
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 Jonathon Love

hi,

first up let me apologise for breaking the thread. i subscribed to this 
list after the initial email went out.


i'm not completely sure if the original post was to prompt a discussion 
here, but now there's a discussion, i'm jumping in!


i'm a psychologist, and one of the challenges is the number of packages 
required to do what is "standard practice", and getting them all to work 
together.


to do an ANOVA (the bread and butter of psych research) with all it's 
assumption checks, contrasts, corrections, etc. requires in the order of 
seven packages.


our solution to this is to create an "uber" package, which makes use of 
all these things behind a single function call (with many arguments), 
which is what our jmv package is:


https://www.jamovi.org/jmv/

we represent an extreme, we even handle plots, but there are other 
examples of more intermediate solutions: afex, psych, etc.


i appreciate this is somewhat at odds with (what i perceive to be) the R 
ethos, which is giving people very fine control over the intermediate 
parts of one's analysis, but it is another approach to making it easier 
for people to find appropriate tools for their field.


for me, the key is being "goal-centred", "what is a person in my field 
trying to achieve?" rather than "analysis-centred"; "this package 
provides analysis X" ... but i appreciate this is likely an unpopular 
position.


i'll definitely be attending this session at use!R, and happy to espouse 
more unpopular views


cheers

jonathon



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