Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Thomas Lin Pedersen
Currently LinkedIn gives a header with the package name, then bioconductor.org 
as a byline, followed by: "To install this package, start R and enter: ## try 
http:// if https:// URLs are not supported 
source("https://bioconductor.org/biocLite.R;) biocLite("FindMyFriends") In most 
cases, you don't need to download the package archive at all. Bioconductor…”

The header is probably fetched from the h1 element, but why the installation 
instructions are chosen instead of the package description I don’t know…

Just attaching the Bioconductor logo along with package name and description 
would by an improvement… (maybe have support for specific package logos and the 
the bloc logo as fallback?)

best
Thomas

> On 29 Oct 2015, at 14:50, Kasper Daniel Hansen  
> wrote:
> 
> For people like me who might be a bit behind on social media, it might be 
> nice to identify where the blurb is generated from.  Is it the first sentence 
> of the description or ...?
> 
> Best,
> Kasper
> 
> On Thu, Oct 29, 2015 at 9:48 AM, Andrzej Oleś  > wrote:
> Hi Thomas,
> 
> thank you for sharing your idea!
> 
> One possibility would be to include a package icon/logo next to the package
> name if the package provides one. This file could be saved as inst/logo.png
> or vignettes/logo.png, e.g. see
> https://github.com/aoles/EBImage/blob/master/vignettes/logo.png 
> 
> 
> Best,
> Andrzej
> 
> On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen  >
> wrote:
> 
> > I just sat down to write a linkedIn update about my recent package and
> > noticed that a thumbnail styled summary was added once I put in the URL for
> > my package (this is probably old news - I’m not much of a social media
> > guy). The summary was a bit dull though, and I was wondering if it was
> > possible to change something on the package landing pages to spice these
> > thumbnails up a bit, so they would appear more exciting when people share
> > their work on Facebook/linkedIn/Twitter…
> >
> > Don’t know how much work this entail - it is definitely in the
> > nice-to-have rather than need-to-have pile of feature requests
> > ___
> > Bioc-devel@r-project.org  mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel 
> > 
> 
> [[alternative HTML version deleted]]
> 
> ___
> Bioc-devel@r-project.org  mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel 
> 


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Jim Hester
It seems to be pulling it from an invisible `#tooltip` div on the page.
This happens to be the first `` block on the page, which is probably why
it is being used by linkedin.

```html

To install this package, start R and enter:
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R;)
biocLite("biobroom")
 In most cases, you don't need to download the
package archive at all.

```

Probably these results could be improved by moving this tooltip block below
the package description, or annotating it with some metadata to exclude it
from the linkedin summary (I don't know what that would be).

On Thu, Oct 29, 2015 at 9:50 AM, Kasper Daniel Hansen <
kasperdanielhan...@gmail.com> wrote:

> For people like me who might be a bit behind on social media, it might be
> nice to identify where the blurb is generated from.  Is it the first
> sentence of the description or ...?
>
> Best,
> Kasper
>
> On Thu, Oct 29, 2015 at 9:48 AM, Andrzej Oleś 
> wrote:
>
> > Hi Thomas,
> >
> > thank you for sharing your idea!
> >
> > One possibility would be to include a package icon/logo next to the
> package
> > name if the package provides one. This file could be saved as
> inst/logo.png
> > or vignettes/logo.png, e.g. see
> > https://github.com/aoles/EBImage/blob/master/vignettes/logo.png
> >
> > Best,
> > Andrzej
> >
> > On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen <
> thomas...@gmail.com>
> > wrote:
> >
> > > I just sat down to write a linkedIn update about my recent package and
> > > noticed that a thumbnail styled summary was added once I put in the URL
> > for
> > > my package (this is probably old news - I’m not much of a social media
> > > guy). The summary was a bit dull though, and I was wondering if it was
> > > possible to change something on the package landing pages to spice
> these
> > > thumbnails up a bit, so they would appear more exciting when people
> share
> > > their work on Facebook/linkedIn/Twitter…
> > >
> > > Don’t know how much work this entail - it is definitely in the
> > > nice-to-have rather than need-to-have pile of feature requests
> > > ___
> > > Bioc-devel@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >
> > [[alternative HTML version deleted]]
> >
> > ___
> > Bioc-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

[Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Thomas Lin Pedersen
I just sat down to write a linkedIn update about my recent package and noticed 
that a thumbnail styled summary was added once I put in the URL for my package 
(this is probably old news - I’m not much of a social media guy). The summary 
was a bit dull though, and I was wondering if it was possible to change 
something on the package landing pages to spice these thumbnails up a bit, so 
they would appear more exciting when people share their work on 
Facebook/linkedIn/Twitter…

Don’t know how much work this entail - it is definitely in the nice-to-have 
rather than need-to-have pile of feature requests
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Kasper Daniel Hansen
For people like me who might be a bit behind on social media, it might be
nice to identify where the blurb is generated from.  Is it the first
sentence of the description or ...?

Best,
Kasper

On Thu, Oct 29, 2015 at 9:48 AM, Andrzej Oleś 
wrote:

> Hi Thomas,
>
> thank you for sharing your idea!
>
> One possibility would be to include a package icon/logo next to the package
> name if the package provides one. This file could be saved as inst/logo.png
> or vignettes/logo.png, e.g. see
> https://github.com/aoles/EBImage/blob/master/vignettes/logo.png
>
> Best,
> Andrzej
>
> On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen 
> wrote:
>
> > I just sat down to write a linkedIn update about my recent package and
> > noticed that a thumbnail styled summary was added once I put in the URL
> for
> > my package (this is probably old news - I’m not much of a social media
> > guy). The summary was a bit dull though, and I was wondering if it was
> > possible to change something on the package landing pages to spice these
> > thumbnails up a bit, so they would appear more exciting when people share
> > their work on Facebook/linkedIn/Twitter…
> >
> > Don’t know how much work this entail - it is definitely in the
> > nice-to-have rather than need-to-have pile of feature requests
> > ___
> > Bioc-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Thomas Lin Pedersen
And then there might be a whole problem about different social media 
summarising html content in different ways. This might be more trouble than 
it’s worth but more and more scientific news are moving to social media and it 
would definitely help share the Bioconductor brand (geez, I sound like a 
marketing guy now…)


> On 29 Oct 2015, at 14:59, Jim Hester  wrote:
> 
> It seems to be pulling it from an invisible `#tooltip` div on the page. This 
> happens to be the first `` block on the page, which is probably why it is 
> being used by linkedin.
> 
> ```html
> 
> To install this package, start R and enter:
> ## try http:// if https:// URLs are not supported
> source("https://bioconductor.org/biocLite.R 
> ")
> biocLite("biobroom")
>  In most cases, you don't need to download the
> package archive at all.
> 
> ```
> 
> Probably these results could be improved by moving this tooltip block below 
> the package description, or annotating it with some metadata to exclude it 
> from the linkedin summary (I don't know what that would be).
> 
> On Thu, Oct 29, 2015 at 9:50 AM, Kasper Daniel Hansen 
> > wrote:
> For people like me who might be a bit behind on social media, it might be
> nice to identify where the blurb is generated from.  Is it the first
> sentence of the description or ...?
> 
> Best,
> Kasper
> 
> On Thu, Oct 29, 2015 at 9:48 AM, Andrzej Oleś  >
> wrote:
> 
> > Hi Thomas,
> >
> > thank you for sharing your idea!
> >
> > One possibility would be to include a package icon/logo next to the package
> > name if the package provides one. This file could be saved as inst/logo.png
> > or vignettes/logo.png, e.g. see
> > https://github.com/aoles/EBImage/blob/master/vignettes/logo.png 
> > 
> >
> > Best,
> > Andrzej
> >
> > On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen  > >
> > wrote:
> >
> > > I just sat down to write a linkedIn update about my recent package and
> > > noticed that a thumbnail styled summary was added once I put in the URL
> > for
> > > my package (this is probably old news - I’m not much of a social media
> > > guy). The summary was a bit dull though, and I was wondering if it was
> > > possible to change something on the package landing pages to spice these
> > > thumbnails up a bit, so they would appear more exciting when people share
> > > their work on Facebook/linkedIn/Twitter…
> > >
> > > Don’t know how much work this entail - it is definitely in the
> > > nice-to-have rather than need-to-have pile of feature requests
> > > ___
> > > Bioc-devel@r-project.org  mailing list
> > > https://stat.ethz.ch/mailman/listinfo/bioc-devel 
> > > 
> >
> > [[alternative HTML version deleted]]
> >
> > ___
> > Bioc-devel@r-project.org  mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel 
> > 
> >
> 
> [[alternative HTML version deleted]]
> 
> ___
> Bioc-devel@r-project.org  mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel 
> 


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Jiří Hon
The implementation of Open Graph protocol should solve this, at least 
for LinkedIn and Facebook. See 
https://developer.linkedin.com/docs/share-on-linkedin (at the bottom of 
the page).


Jiri Hon

Dne 29.10.2015 v 14:59 Jim Hester napsal(a):

It seems to be pulling it from an invisible `#tooltip` div on the page.
This happens to be the first `` block on the page, which is probably why
it is being used by linkedin.

```html

 To install this package, start R and enter:
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R;)
biocLite("biobroom")
  In most cases, you don't need to download the
 package archive at all.

```

Probably these results could be improved by moving this tooltip block below
the package description, or annotating it with some metadata to exclude it
from the linkedin summary (I don't know what that would be).

On Thu, Oct 29, 2015 at 9:50 AM, Kasper Daniel Hansen <
kasperdanielhan...@gmail.com> wrote:


For people like me who might be a bit behind on social media, it might be
nice to identify where the blurb is generated from.  Is it the first
sentence of the description or ...?

Best,
Kasper

On Thu, Oct 29, 2015 at 9:48 AM, Andrzej Oleś 
wrote:


Hi Thomas,

thank you for sharing your idea!

One possibility would be to include a package icon/logo next to the

package

name if the package provides one. This file could be saved as

inst/logo.png

or vignettes/logo.png, e.g. see
https://github.com/aoles/EBImage/blob/master/vignettes/logo.png

Best,
Andrzej

On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen <

thomas...@gmail.com>

wrote:


I just sat down to write a linkedIn update about my recent package and
noticed that a thumbnail styled summary was added once I put in the URL

for

my package (this is probably old news - I’m not much of a social media
guy). The summary was a bit dull though, and I was wondering if it was
possible to change something on the package landing pages to spice

these

thumbnails up a bit, so they would appear more exciting when people

share

their work on Facebook/linkedIn/Twitter…

Don’t know how much work this entail - it is definitely in the
nice-to-have rather than need-to-have pile of feature requests
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


 [[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



 [[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Builds all pointing to devel

2015-10-29 Thread Dan Tenenbaum
Hi Thomas,

- Original Message -
> From: "Thomas Dybdal Pedersen" 
> To: "bioc-devel" 
> Sent: Thursday, October 29, 2015 1:07:52 AM
> Subject: [Bioc-devel] Builds all pointing to devel

> It seems that both release and level nightly builds points to the devel
> repository (https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks) at 
> the
> moment. Furthermore all the builds in release are on uneven version numbers,
> further pointing to something fishy going on..? Or am I missing a new
> procedure?
> 

I take it you are talking about the build reports? 

I did send an email about this and I posted to the support site. It was an 
error. The error has been rectified but the build reports will still reflect 
the problem until today's build report is available later today.

Dan



> /Thomas
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Idea for improved visibility of Bioconductor packages

2015-10-29 Thread Andrzej Oleś
Hi Thomas,

thank you for sharing your idea!

One possibility would be to include a package icon/logo next to the package
name if the package provides one. This file could be saved as inst/logo.png
or vignettes/logo.png, e.g. see
https://github.com/aoles/EBImage/blob/master/vignettes/logo.png

Best,
Andrzej

On Thu, Oct 29, 2015 at 2:27 PM, Thomas Lin Pedersen 
wrote:

> I just sat down to write a linkedIn update about my recent package and
> noticed that a thumbnail styled summary was added once I put in the URL for
> my package (this is probably old news - I’m not much of a social media
> guy). The summary was a bit dull though, and I was wondering if it was
> possible to change something on the package landing pages to spice these
> thumbnails up a bit, so they would appear more exciting when people share
> their work on Facebook/linkedIn/Twitter…
>
> Don’t know how much work this entail - it is definitely in the
> nice-to-have rather than need-to-have pile of feature requests
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Vignette questions: location of html BiocStyle vignette, fake + real vignettes not necessary?

2015-10-29 Thread Dan Tenenbaum


- Original Message -
> From: "lcollado" 
> To: "bioc-devel" 
> Sent: Thursday, October 29, 2015 2:09:57 PM
> Subject: [Bioc-devel] Vignette questions: location of html BiocStyle 
> vignette, fake + real vignettes not necessary?

> Hi,
> I'm planning on switching some vignettes to BiocStyle (html version).
> Is there any particular reason why the html vignette for BiocStyle is
> outside of the /vignettes directory? I see it at
> /inst/rmarkdown/templates/html_document/skeleton/skeleton.Rmd with
> /vignettes/HtmlStyle.Rmd linking to it. I didn't know that you could
> write such links, thanks! But does it help with speeding up the
> building or testing steps if the vignette is outside of /vignettes?
> BiocCheck has its vignette at /vignettes/BiocCheck.Rmd so I know that
> such a setup is not necessary.

I will let the BiocStyle maintainers answer this one.

> Currently, one of my vignettes takes a few min to render, which is why
> I followed ggbio's setup: fake empty vignettes + real ones and a
> Makefile making sure the correct vignette gets built. I thought that
> this trick saved time in R CMD check.
> I looked at "Writing R Extensions" and I think that such a trick only
> saves time when you run R CMD check on the source directory instead of
> the tarball created by R CMD build. So unless I'm forgetting
> something, this trick doesn't seem necessary at all given that
> Bioconductor runs build and then check (with --no-vignettes) on the
> tarball. Right?
> I guess that it was useful for me before when I would run lots of
> checks directly on the source code directory instead of building and
> checking.

Yes, these tricks don't save any time on the build system because although the 
build system runs
R CMD build on a directory, that directory is newly created every day so no 
cached files persist between builds. And then as you point out, R CMD check is 
run with the --no-vignettes option, and runs on a tarball anyway.

Dan


> Thanks,
> Leo
> 
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Vignette questions: location of html BiocStyle vignette, fake + real vignettes not necessary?

2015-10-29 Thread Leonardo Collado Torres
Hi,
I'm planning on switching some vignettes to BiocStyle (html version).
Is there any particular reason why the html vignette for BiocStyle is
outside of the /vignettes directory? I see it at
/inst/rmarkdown/templates/html_document/skeleton/skeleton.Rmd with
/vignettes/HtmlStyle.Rmd linking to it. I didn't know that you could
write such links, thanks! But does it help with speeding up the
building or testing steps if the vignette is outside of /vignettes?
BiocCheck has its vignette at /vignettes/BiocCheck.Rmd so I know that
such a setup is not necessary.
Currently, one of my vignettes takes a few min to render, which is why
I followed ggbio's setup: fake empty vignettes + real ones and a
Makefile making sure the correct vignette gets built. I thought that
this trick saved time in R CMD check.
I looked at "Writing R Extensions" and I think that such a trick only
saves time when you run R CMD check on the source directory instead of
the tarball created by R CMD build. So unless I'm forgetting
something, this trick doesn't seem necessary at all given that
Bioconductor runs build and then check (with --no-vignettes) on the
tarball. Right?
I guess that it was useful for me before when I would run lots of
checks directly on the source code directory instead of building and
checking.
Thanks,
Leo

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Vignette questions: location of html BiocStyle vignette, fake + real vignettes not necessary?

2015-10-29 Thread Andrzej Oleś
Hi Leonardo,

thank you for considering using BiocStyle for your vignettes! Please read
below.

On Thu, Oct 29, 2015 at 10:17 PM, Dan Tenenbaum 
wrote:

>
>
> - Original Message -
> > From: "lcollado" 
> > To: "bioc-devel" 
> > Sent: Thursday, October 29, 2015 2:09:57 PM
> > Subject: [Bioc-devel] Vignette questions: location of html BiocStyle
> vignette, fake + real vignettes not necessary?
>
> > Hi,
> > I'm planning on switching some vignettes to BiocStyle (html version).
> > Is there any particular reason why the html vignette for BiocStyle is
> > outside of the /vignettes directory? I see it at
> > /inst/rmarkdown/templates/html_document/skeleton/skeleton.Rmd with
> > /vignettes/HtmlStyle.Rmd linking to it. I didn't know that you could
> > write such links, thanks! But does it help with speeding up the
> > building or testing steps if the vignette is outside of /vignettes?
> > BiocCheck has its vignette at /vignettes/BiocCheck.Rmd so I know that
> > such a setup is not necessary.
>
> I will let the BiocStyle maintainers answer this one.
>

There is no specific reason for this other than convenience: at some point
I had the idea of providing a template for BiocStyle::html_document and
figured out that the package vignette itself could serve that purpose. So
to avoid redundancy I put the vignette in the templates directory which is
discovered by RStudio/rmarkdown, and link to it from the  vignettes
directory in order to build it as the package vignette as well. The other
way round wouldn't probably work as the vignette source gets copied to
/inst/doc upon installation. I don't see any obvious reason how this
approach could affect performance in any way, either positively or
negatively.

Cheers,
Andrzej

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Builds all pointing to devel

2015-10-29 Thread Thomas Lin Pedersen
It seems that both release and level nightly builds points to the devel 
repository (https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks) at the 
moment. Furthermore all the builds in release are on uneven version numbers, 
further pointing to something fishy going on..? Or am I missing a new procedure?

/Thomas
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Rd] R CMD BATCH vs R CMD batch

2015-10-29 Thread Rainer M Krug
Dirk Eddelbuettel  writes:

> On 28 October 2015 at 21:39, Marius Hofert wrote:
> | Out of laziness I just used "R CMD batch" instead of "R CMD BATCH". I
> | didn't get an error so didn't think about the consequences... One
> | consequence is (at least on Mac OS X 10.11 but probably in more
> | generality) that R_BATCH_OPTIONS are ignored, which was kind of fatal
> | in my case... I am thus wondering whether it makes sense to either a)
> | have R_BATCH_OPTIONS also be respected for "R CMD batch" or b) simply
> | not allow "R CMD batch" as a valid command (so requiring to use "R CMD
> | BATCH"). Both approaches might be delicate... just wanted to point
> | this issue out...
>
> Same reason we have 'R CMD INSTALL' as there often is /usr/bin/install with
> different options ...
>
> In general 'R CMD foo' will run for any 'foo' in the path:
>
>edd@max:~$ R CMD date
>Wed Oct 28 21:05:01 CDT 2015
>edd@max:~$ 

So what is R CMD exactly doing in this example? The output is the same if
I say only the command (using pwd as otherwise the time has changed...): 

,
| 09:35:03 ~$ R CMD pwd
| /Users/rainerkrug
| 09:35:37 ~$ R CMD pwd
| /Users/rainerkrug
| 09:37:44 ~$ pwd
| /Users/rainerkrug
| 09:37:49 ~$
`

And this happens, except in cases where the foo is defined as a CMD in R 
(build, ...):

,
| Commands:
|   BATCH   Run R in batch mode
|   COMPILE Compile files for use with R
|   SHLIB   Build shared library for dynamic loading
|   INSTALL Install add-on packages
|   REMOVE  Remove add-on packages
|   build   Build add-on packages
|   check   Check add-on packages
|   LINKFront-end for creating executable programs
|   Rprof   Post-process R profiling files
|   Rdconv  Convert Rd format to various other formats
|   Rd2pdf  Convert Rd format to PDF
|   Rd2txt  Convert Rd format to pretty text
|   Stangle Extract S/R code from Sweave documentation
|   Sweave  Process Sweave documentation
|   Rdiff   Diff R output ignoring headers etc
|   config  Obtain configuration information about R
|   javareconf  Update the Java configuration variables
|   rtags Create Emacs-style tag files from C, R, and Rd files
`

Unless I miss something, is this is an inconsistency in R?

Rainer


>
> Dirk

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


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

Re: [Rd] R CMD BATCH vs R CMD batch

2015-10-29 Thread Rainer M Krug
Deepayan Sarkar  writes:

> On Thu, Oct 29, 2015 at 2:09 PM, Rainer M Krug  wrote:
>> Dirk Eddelbuettel  writes:
>>
>>> On 28 October 2015 at 21:39, Marius Hofert wrote:
>>> | Out of laziness I just used "R CMD batch" instead of "R CMD BATCH". I
>>> | didn't get an error so didn't think about the consequences... One
>>> | consequence is (at least on Mac OS X 10.11 but probably in more
>>> | generality) that R_BATCH_OPTIONS are ignored, which was kind of fatal
>>> | in my case... I am thus wondering whether it makes sense to either a)
>>> | have R_BATCH_OPTIONS also be respected for "R CMD batch" or b) simply
>>> | not allow "R CMD batch" as a valid command (so requiring to use "R CMD
>>> | BATCH"). Both approaches might be delicate... just wanted to point
>>> | this issue out...
>>>
>>> Same reason we have 'R CMD INSTALL' as there often is /usr/bin/install with
>>> different options ...
>>>
>>> In general 'R CMD foo' will run for any 'foo' in the path:
>>>
>>>edd@max:~$ R CMD date
>>>Wed Oct 28 21:05:01 CDT 2015
>>>edd@max:~$
>>
>> So what is R CMD exactly doing in this example? The output is the same if
>> I say only the command (using pwd as otherwise the time has changed...):
>>
>> ,
>> | 09:35:03 ~$ R CMD pwd
>> | /Users/rainerkrug
>> | 09:35:37 ~$ R CMD pwd
>> | /Users/rainerkrug
>> | 09:37:44 ~$ pwd
>> | /Users/rainerkrug
>> | 09:37:49 ~$
>> `
>>
>> And this happens, except in cases where the foo is defined as a CMD in R 
>> (build, ...):
>>
>> ,
>> | Commands:
>> |   BATCH   Run R in batch mode
>> |   COMPILE Compile files for use with R
>> |   SHLIB   Build shared library for dynamic loading
>> |   INSTALL Install add-on packages
>> |   REMOVE  Remove add-on packages
>> |   build   Build add-on packages
>> |   check   Check add-on packages
>> |   LINKFront-end for creating executable programs
>> |   Rprof   Post-process R profiling files
>> |   Rdconv  Convert Rd format to various other formats
>> |   Rd2pdf  Convert Rd format to PDF
>> |   Rd2txt  Convert Rd format to pretty text
>> |   Stangle Extract S/R code from Sweave documentation
>> |   Sweave  Process Sweave documentation
>> |   Rdiff   Diff R output ignoring headers etc
>> |   config  Obtain configuration information about R
>> |   javareconf  Update the Java configuration variables
>> |   rtags Create Emacs-style tag files from C, R, and Rd 
>> files
>> `
>>
>> Unless I miss something, is this is an inconsistency in R?
>
> One important difference (not sure if the only one) is that R CMD
> defines more environment variables. Compare
>
> env | grep -i tex
> R CMD env | grep -i tex
>
> So for example
>
> R CMD pdflatex
>
> will behave differently from plain pdflatex.

Reading Dirk's email again, I think I get the picture of what ~R CMD foo~ is
doing: running ~foo~ after doing some initial magic.

Out of interest: What is the magic ~R CMD~ is doing? Is it documented
anywhere?

Rainer

>
> -Deepayan

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


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

Re: [Rd] R CMD BATCH vs R CMD batch

2015-10-29 Thread Deepayan Sarkar
On Thu, Oct 29, 2015 at 2:09 PM, Rainer M Krug  wrote:
> Dirk Eddelbuettel  writes:
>
>> On 28 October 2015 at 21:39, Marius Hofert wrote:
>> | Out of laziness I just used "R CMD batch" instead of "R CMD BATCH". I
>> | didn't get an error so didn't think about the consequences... One
>> | consequence is (at least on Mac OS X 10.11 but probably in more
>> | generality) that R_BATCH_OPTIONS are ignored, which was kind of fatal
>> | in my case... I am thus wondering whether it makes sense to either a)
>> | have R_BATCH_OPTIONS also be respected for "R CMD batch" or b) simply
>> | not allow "R CMD batch" as a valid command (so requiring to use "R CMD
>> | BATCH"). Both approaches might be delicate... just wanted to point
>> | this issue out...
>>
>> Same reason we have 'R CMD INSTALL' as there often is /usr/bin/install with
>> different options ...
>>
>> In general 'R CMD foo' will run for any 'foo' in the path:
>>
>>edd@max:~$ R CMD date
>>Wed Oct 28 21:05:01 CDT 2015
>>edd@max:~$
>
> So what is R CMD exactly doing in this example? The output is the same if
> I say only the command (using pwd as otherwise the time has changed...):
>
> ,
> | 09:35:03 ~$ R CMD pwd
> | /Users/rainerkrug
> | 09:35:37 ~$ R CMD pwd
> | /Users/rainerkrug
> | 09:37:44 ~$ pwd
> | /Users/rainerkrug
> | 09:37:49 ~$
> `
>
> And this happens, except in cases where the foo is defined as a CMD in R 
> (build, ...):
>
> ,
> | Commands:
> |   BATCH   Run R in batch mode
> |   COMPILE Compile files for use with R
> |   SHLIB   Build shared library for dynamic loading
> |   INSTALL Install add-on packages
> |   REMOVE  Remove add-on packages
> |   build   Build add-on packages
> |   check   Check add-on packages
> |   LINKFront-end for creating executable programs
> |   Rprof   Post-process R profiling files
> |   Rdconv  Convert Rd format to various other formats
> |   Rd2pdf  Convert Rd format to PDF
> |   Rd2txt  Convert Rd format to pretty text
> |   Stangle Extract S/R code from Sweave documentation
> |   Sweave  Process Sweave documentation
> |   Rdiff   Diff R output ignoring headers etc
> |   config  Obtain configuration information about R
> |   javareconf  Update the Java configuration variables
> |   rtags Create Emacs-style tag files from C, R, and Rd files
> `
>
> Unless I miss something, is this is an inconsistency in R?

One important difference (not sure if the only one) is that R CMD
defines more environment variables. Compare

env | grep -i tex
R CMD env | grep -i tex

So for example

R CMD pdflatex

will behave differently from plain pdflatex.

-Deepayan

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


Re: [Rd] R CMD BATCH vs R CMD batch

2015-10-29 Thread peter dalgaard

On 29 Oct 2015, at 10:44 , Rainer M Krug  wrote:

> Out of interest: What is the magic ~R CMD~ is doing? Is it documented
> anywhere?


R is open source (and shell scripts are considered self-documenting by some)

On Unix-alikes, R is a shell script which, if called with 1st argument CMD, 
calls ${R_HOME}/bin/Rcmd, which is another shell script that ends with 

case "${1}" in
## this was a separate command prior to 2.10.0
  Rd2txt)
cmd="${R_HOME}/bin/Rdconv"
extra="-t txt"
;;
## removed in 2.15.0
  Rd2dvi)
echo "R CMD Rd2dvi is defunct: use Rd2pdf instead"
exit 1
;;
  *)
if test -x "${R_HOME}/bin/${1}"; then
  cmd="${R_HOME}/bin/${1}"
else
  cmd="${1}"
fi
;;
esac
shift

exec "${cmd}" ${extra} "${@}"

I.e., except for setting up variables and such, R CMD ${foo} essentially looks 
for ${R_HOME}/bin/${foo} and executes it if it exists and is executable, 
otherwise it just executes ${foo}.

Notice that, somewhat contrary to what Dirk said, this logic works at the mercy 
of the file system when it comes to case sensitivity. On OSX with the default 
case-insensitive setup we get

Peters-iMac:IBP pd$ R CMD install
Error: ERROR: no packages specified

which comes from R's package installer, whereas a case-sensitive FS would pick 
up /usr/bin/install instead. That is just how the "test" shell built-in works: 

Peters-iMac:~ pd$ test -x `R RHOME`/bin/INSTALL ; echo $?
0
Peters-iMac:~ pd$ test -x `R RHOME`/bin/UNSTALL ; echo $?
1
Peters-iMac:~ pd$ test -x `R RHOME`/bin/install ; echo $?
0


-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R CMD BATCH vs R CMD batch

2015-10-29 Thread Rainer M Krug
peter dalgaard  writes:

> On 29 Oct 2015, at 10:44 , Rainer M Krug  wrote:
>
>> Out of interest: What is the magic ~R CMD~ is doing? Is it documented
>> anywhere?
>
>
> R is open source (and shell scripts are considered self-documenting by 
> some)

True - should have looked in the sources...

>
> On Unix-alikes, R is a shell script which, if called with 1st argument
> CMD, calls ${R_HOME}/bin/Rcmd, which is another shell script that ends
> with
>
> case "${1}" in
> ## this was a separate command prior to 2.10.0
>   Rd2txt)
> cmd="${R_HOME}/bin/Rdconv"
> extra="-t txt"
> ;;
> ## removed in 2.15.0
>   Rd2dvi)
> echo "R CMD Rd2dvi is defunct: use Rd2pdf instead"
> exit 1
> ;;
>   *)
> if test -x "${R_HOME}/bin/${1}"; then
>   cmd="${R_HOME}/bin/${1}"
> else
>   cmd="${1}"
> fi
> ;;
> esac
> shift
>
> exec "${cmd}" ${extra} "${@}"
>
> I.e., except for setting up variables and such, R CMD ${foo}
> essentially looks for ${R_HOME}/bin/${foo} and executes it if it
> exists and is executable, otherwise it just executes ${foo}.

Thanks for that detailed explanation of the mechanism - it is much
clearer now. And as usual, if one knows how something is happening, it's
not "magical" anymore. 

>
> Notice that, somewhat contrary to what Dirk said, this logic works at
> the mercy of the file system when it comes to case sensitivity. On OSX
> with the default case-insensitive setup we get
>
> Peters-iMac:IBP pd$ R CMD install
> Error: ERROR: no packages specified
>
> which comes from R's package installer, whereas a case-sensitive FS
> would pick up /usr/bin/install instead. That is just how the "test"
> shell built-in works:
>
> Peters-iMac:~ pd$ test -x `R RHOME`/bin/INSTALL ; echo $?
> 0
> Peters-iMac:~ pd$ test -x `R RHOME`/bin/UNSTALL ; echo $?
> 1
> Peters-iMac:~ pd$ test -x `R RHOME`/bin/install ; echo $?
> 0

Yeah - true. I was already starting to wonder as I always was using ~R
CMD install~ and it always worked on my Mac.

Thanks again,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


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