[Rd] "Spinning ball" in Rgui in Windows but not in OS X

2014-02-20 Thread Fisher Dennis
R 3.0.2
OS X, Windows 7

Colleagues

This is my first submission to this bulletin board so forgive me if I miss some 
etiquette issue.  

I am running some C code in Rgui in both OS X and Windows.  It takes ~ 10 
seconds for the code to execute.
In OS X, the GUI is silent during this period.
In Windows, a spinning wheel appears and the GUi grays out, then recovers.
Is it possible to suppress the spinning wheel and the graying out?  I don’t 
know if these are controlled by the OS or by R.

Any help would be appreciated.  Thanks.  If it would help to have the code, I 
can provide it.

Dennis


Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com

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


[Rd] Where to put package vignettes

2014-02-20 Thread Guillermo.Vinue
Dear R-devel list,

My name is Guillermo Vinué. I have created an R package that includes a
vignette. Earlier on, to test my package, I tried to install it both in
Linux and Windows and it worked. My vignette was in /inst/doc.

Now, I have finished for good and before submitting my package to CRAN
I've tried to install it again first in Linux and then in Windows (I
removed that first installation some time ago).

My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
and the vignette was available. However, when trying to install it in
Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette
is build with knitr. 

In fact, if I first install the package on Windows, the vignette is
accesible, but then in Linux, not.

I have read that as from R 2.14.0 the preferred location for the Sweave
sources is the subdirectory vignettes of the source packages, but for
compatibility with earlier versions of R, vignette sources will be
looked for in inst/doc if vignettes does not exist.

Where do I have to put my vignette so that it could be available with
any installation and which files (.Rnw or .pdf) should be included?. 

I hope you can clarify my doubts. I have seen the collection of prior
postings to the list, but I have not found a specifical answer to my doubts .

Thank you very much in advance.

Best regards,

Guillermo

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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread Søren Højsgaard
My understanding is this:

1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2) Build 
the package foo with R CMD build foo. 3) Install the package with R CMD INSTALL 
foo_xxx.tar.gz

Then the vignettes will be available. However you can also install the package 
with R CMD INSTALL foo, but then the vignettes will *not* be available (because 
it is in the build process that the vignettes go from /vignettes to /inst/doc)

Regards 
Søren


-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On 
Behalf Of guillermo.vi...@uv.es
Sent: 20. februar 2014 12:19
To: r-devel@r-project.org
Subject: [Rd] Where to put package vignettes

Dear R-devel list,

My name is Guillermo Vinué. I have created an R package that includes a 
vignette. Earlier on, to test my package, I tried to install it both in Linux 
and Windows and it worked. My vignette was in /inst/doc.

Now, I have finished for good and before submitting my package to CRAN I've 
tried to install it again first in Linux and then in Windows (I removed that 
first installation some time ago).

My package was succesfully installed in Linux (Fedora 18 and R 2.15.2) and the 
vignette was available. However, when trying to install it in Windows (R 
3.0.2), unfortunately the vignette didn't appear. My vignette is build with 
knitr. 

In fact, if I first install the package on Windows, the vignette is accesible, 
but then in Linux, not.

I have read that as from R 2.14.0 the preferred location for the Sweave sources 
is the subdirectory vignettes of the source packages, but for compatibility 
with earlier versions of R, vignette sources will be looked for in inst/doc if 
vignettes does not exist.

Where do I have to put my vignette so that it could be available with any 
installation and which files (.Rnw or .pdf) should be included?. 

I hope you can clarify my doubts. I have seen the collection of prior postings 
to the list, but I have not found a specifical answer to my doubts .

Thank you very much in advance.

Best regards,

Guillermo

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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread Søren Højsgaard
Guillermino,

Sorry but I've never made it beyond Sweave in connection with R packages; we 
will have to wait for more insight from others.

Søren

-Original Message-
From: guillermo.vi...@uv.es [mailto:guillermo.vi...@uv.es] 
Sent: 20. februar 2014 15:43
To: Søren Højsgaard
Cc: r-devel@r-project.org
Subject: RE: [Rd] Where to put package vignettes

Dear Søren,

Thank you very much for your answer, it solved my problem and now my package 
can be installed both on Linux and Windows and the vignette is available in 
both systems. I put the vignette in /vignettes.

However, unfortunately my problems have not ended here. As mentioned, my 
vignette is built with knitr and with the following commands:

1) R CMD check foo
2) R CMD build foo
3) R CMD INSTALL foo_xxx.tar.gz

the vignette is built with Sweave!

I have read in http://yihui.name/knitr/demo/vignette/ that in that case, a 
Makefile should be incorporated.

I have incorporated in /inst/doc the makefile from 
https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile

however, my vignette is still built with Sweave. I use R 2.15.2.

How can I fix this performance?.

Thank you very much again.

Best regards,

Guillermo

> My understanding is this:
> 
> 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
Build the package foo with R CMD build foo. 3) Install the package with R CMD 
INSTALL foo_xxx.tar.gz
> 
> Then the vignettes will be available. However you can also install the
package with R CMD INSTALL foo, but then the vignettes will *not* be available 
(because it is in the build process that the vignettes go from /vignettes to 
/inst/doc)
> 
> Regards
> Søren
> 
> 
> -Original Message-
> From: r-devel-boun...@r-project.org
[mailto:r-devel-boun...@r-project.org] On Behalf Of guillermo.vi...@uv.es
> Sent: 20. februar 2014 12:19
> To: r-devel@r-project.org
> Subject: [Rd] Where to put package vignettes
> 
> Dear R-devel list,
> 
> My name is Guillermo Vinué. I have created an R package that includes
a vignette. Earlier on, to test my package, I tried to install it both in Linux 
and Windows and it worked. My vignette was in /inst/doc.
> 
> Now, I have finished for good and before submitting my package to CRAN
I've tried to install it again first in Linux and then in Windows (I removed 
that first installation some time ago).
> 
> My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
and the vignette was available. However, when trying to install it in Windows 
(R 3.0.2), unfortunately the vignette didn't appear. My vignette is build with 
knitr. 
> 
> In fact, if I first install the package on Windows, the vignette is
accesible, but then in Linux, not.
> 
> I have read that as from R 2.14.0 the preferred location for the
Sweave sources is the subdirectory vignettes of the source packages, but for 
compatibility with earlier versions of R, vignette sources will be looked for 
in inst/doc if vignettes does not exist.
> 
> Where do I have to put my vignette so that it could be available with
any installation and which files (.Rnw or .pdf) should be included?. 
> 
> I hope you can clarify my doubts. I have seen the collection of prior
postings to the list, but I have not found a specifical answer to my doubts .
> 
> Thank you very much in advance.
> 
> Best regards,
> 
> Guillermo
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 


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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread Guillermo.Vinue
Dear Søren,

Thank you very much for your answer, it solved my problem and now my
package can be installed both on Linux and Windows and the vignette is
available in both systems. I put the vignette in /vignettes.

However, unfortunately my problems have not ended here. As mentioned, my
vignette is built with knitr and with the following commands:

1) R CMD check foo
2) R CMD build foo
3) R CMD INSTALL foo_xxx.tar.gz

the vignette is built with Sweave!

I have read in http://yihui.name/knitr/demo/vignette/ that in that case,
a Makefile should be incorporated.

I have incorporated in /inst/doc the makefile from
https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile

however, my vignette is still built with Sweave. I use R 2.15.2.

How can I fix this performance?.

Thank you very much again.

Best regards,

Guillermo

> My understanding is this:
> 
> 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
Build the package foo with R CMD build foo. 3) Install the package with
R CMD INSTALL foo_xxx.tar.gz
> 
> Then the vignettes will be available. However you can also install the
package with R CMD INSTALL foo, but then the vignettes will *not* be
available (because it is in the build process that the vignettes go from
/vignettes to /inst/doc)
> 
> Regards 
> Søren
> 
> 
> -Original Message-
> From: r-devel-boun...@r-project.org
[mailto:r-devel-boun...@r-project.org] On Behalf Of guillermo.vi...@uv.es
> Sent: 20. februar 2014 12:19
> To: r-devel@r-project.org
> Subject: [Rd] Where to put package vignettes
> 
> Dear R-devel list,
> 
> My name is Guillermo Vinué. I have created an R package that includes
a vignette. Earlier on, to test my package, I tried to install it both
in Linux and Windows and it worked. My vignette was in /inst/doc.
> 
> Now, I have finished for good and before submitting my package to CRAN
I've tried to install it again first in Linux and then in Windows (I
removed that first installation some time ago).
> 
> My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
and the vignette was available. However, when trying to install it in
Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette
is build with knitr. 
> 
> In fact, if I first install the package on Windows, the vignette is
accesible, but then in Linux, not.
> 
> I have read that as from R 2.14.0 the preferred location for the
Sweave sources is the subdirectory vignettes of the source packages, but
for compatibility with earlier versions of R, vignette sources will be
looked for in inst/doc if vignettes does not exist.
> 
> Where do I have to put my vignette so that it could be available with
any installation and which files (.Rnw or .pdf) should be included?. 
> 
> I hope you can clarify my doubts. I have seen the collection of prior
postings to the list, but I have not found a specifical answer to my
doubts .
> 
> Thank you very much in advance.
> 
> Best regards,
> 
> Guillermo
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread baptiste auguie
Hi,

You should  take the following steps: 1) upgrade R, 2) specify
VignetteBuilder: knitr in your DESCRIPTION file, 3) check how other CRAN
packages using knitr do it (e.g. knitr itself). No makefile is needed, that
was a temporary workaround, now irrelevant.

HTH,

baptiste


On 20 February 2014 11:45, Søren Højsgaard  wrote:

> Guillermino,
>
> Sorry but I've never made it beyond Sweave in connection with R packages;
> we will have to wait for more insight from others.
>
> Søren
>
> -Original Message-
> From: guillermo.vi...@uv.es [mailto:guillermo.vi...@uv.es]
> Sent: 20. februar 2014 15:43
> To: Søren Højsgaard
> Cc: r-devel@r-project.org
> Subject: RE: [Rd] Where to put package vignettes
>
> Dear Søren,
>
> Thank you very much for your answer, it solved my problem and now my
> package can be installed both on Linux and Windows and the vignette is
> available in both systems. I put the vignette in /vignettes.
>
> However, unfortunately my problems have not ended here. As mentioned, my
> vignette is built with knitr and with the following commands:
>
> 1) R CMD check foo
> 2) R CMD build foo
> 3) R CMD INSTALL foo_xxx.tar.gz
>
> the vignette is built with Sweave!
>
> I have read in http://yihui.name/knitr/demo/vignette/ that in that case,
> a Makefile should be incorporated.
>
> I have incorporated in /inst/doc the makefile from
> https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile
>
> however, my vignette is still built with Sweave. I use R 2.15.2.
>
> How can I fix this performance?.
>
> Thank you very much again.
>
> Best regards,
>
> Guillermo
>
> > My understanding is this:
> >
> > 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
> Build the package foo with R CMD build foo. 3) Install the package with R
> CMD INSTALL foo_xxx.tar.gz
> >
> > Then the vignettes will be available. However you can also install the
> package with R CMD INSTALL foo, but then the vignettes will *not* be
> available (because it is in the build process that the vignettes go from
> /vignettes to /inst/doc)
> >
> > Regards
> > Søren
> >
> >
> > -Original Message-
> > From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of guillermo.vi...@uv.es
> > Sent: 20. februar 2014 12:19
> > To: r-devel@r-project.org
> > Subject: [Rd] Where to put package vignettes
> >
> > Dear R-devel list,
> >
> > My name is Guillermo Vinué. I have created an R package that includes
> a vignette. Earlier on, to test my package, I tried to install it both in
> Linux and Windows and it worked. My vignette was in /inst/doc.
> >
> > Now, I have finished for good and before submitting my package to CRAN
> I've tried to install it again first in Linux and then in Windows (I
> removed that first installation some time ago).
> >
> > My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
> and the vignette was available. However, when trying to install it in
> Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette is
> build with knitr.
> >
> > In fact, if I first install the package on Windows, the vignette is
> accesible, but then in Linux, not.
> >
> > I have read that as from R 2.14.0 the preferred location for the
> Sweave sources is the subdirectory vignettes of the source packages, but
> for compatibility with earlier versions of R, vignette sources will be
> looked for in inst/doc if vignettes does not exist.
> >
> > Where do I have to put my vignette so that it could be available with
> any installation and which files (.Rnw or .pdf) should be included?.
> >
> > I hope you can clarify my doubts. I have seen the collection of prior
> postings to the list, but I have not found a specifical answer to my
> doubts .
> >
> > Thank you very much in advance.
> >
> > Best regards,
> >
> > Guillermo
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

[[alternative HTML version deleted]]

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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread Hadley Wickham
You also need to make sure that your knitr vignettes include

%\VignetteEngine{knitr::knitr}

See http://yihui.name/knitr/demo/vignette/ for full details.

Hadley

On Thu, Feb 20, 2014 at 8:56 AM, baptiste auguie
 wrote:
> Hi,
>
> You should  take the following steps: 1) upgrade R, 2) specify
> VignetteBuilder: knitr in your DESCRIPTION file, 3) check how other CRAN
> packages using knitr do it (e.g. knitr itself). No makefile is needed, that
> was a temporary workaround, now irrelevant.
>
> HTH,
>
> baptiste
>
>
> On 20 February 2014 11:45, Søren Højsgaard  wrote:
>
>> Guillermino,
>>
>> Sorry but I've never made it beyond Sweave in connection with R packages;
>> we will have to wait for more insight from others.
>>
>> Søren
>>
>> -Original Message-
>> From: guillermo.vi...@uv.es [mailto:guillermo.vi...@uv.es]
>> Sent: 20. februar 2014 15:43
>> To: Søren Højsgaard
>> Cc: r-devel@r-project.org
>> Subject: RE: [Rd] Where to put package vignettes
>>
>> Dear Søren,
>>
>> Thank you very much for your answer, it solved my problem and now my
>> package can be installed both on Linux and Windows and the vignette is
>> available in both systems. I put the vignette in /vignettes.
>>
>> However, unfortunately my problems have not ended here. As mentioned, my
>> vignette is built with knitr and with the following commands:
>>
>> 1) R CMD check foo
>> 2) R CMD build foo
>> 3) R CMD INSTALL foo_xxx.tar.gz
>>
>> the vignette is built with Sweave!
>>
>> I have read in http://yihui.name/knitr/demo/vignette/ that in that case,
>> a Makefile should be incorporated.
>>
>> I have incorporated in /inst/doc the makefile from
>> https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile
>>
>> however, my vignette is still built with Sweave. I use R 2.15.2.
>>
>> How can I fix this performance?.
>>
>> Thank you very much again.
>>
>> Best regards,
>>
>> Guillermo
>>
>> > My understanding is this:
>> >
>> > 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
>> Build the package foo with R CMD build foo. 3) Install the package with R
>> CMD INSTALL foo_xxx.tar.gz
>> >
>> > Then the vignettes will be available. However you can also install the
>> package with R CMD INSTALL foo, but then the vignettes will *not* be
>> available (because it is in the build process that the vignettes go from
>> /vignettes to /inst/doc)
>> >
>> > Regards
>> > Søren
>> >
>> >
>> > -Original Message-
>> > From: r-devel-boun...@r-project.org
>> [mailto:r-devel-boun...@r-project.org] On Behalf Of guillermo.vi...@uv.es
>> > Sent: 20. februar 2014 12:19
>> > To: r-devel@r-project.org
>> > Subject: [Rd] Where to put package vignettes
>> >
>> > Dear R-devel list,
>> >
>> > My name is Guillermo Vinué. I have created an R package that includes
>> a vignette. Earlier on, to test my package, I tried to install it both in
>> Linux and Windows and it worked. My vignette was in /inst/doc.
>> >
>> > Now, I have finished for good and before submitting my package to CRAN
>> I've tried to install it again first in Linux and then in Windows (I
>> removed that first installation some time ago).
>> >
>> > My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
>> and the vignette was available. However, when trying to install it in
>> Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette is
>> build with knitr.
>> >
>> > In fact, if I first install the package on Windows, the vignette is
>> accesible, but then in Linux, not.
>> >
>> > I have read that as from R 2.14.0 the preferred location for the
>> Sweave sources is the subdirectory vignettes of the source packages, but
>> for compatibility with earlier versions of R, vignette sources will be
>> looked for in inst/doc if vignettes does not exist.
>> >
>> > Where do I have to put my vignette so that it could be available with
>> any installation and which files (.Rnw or .pdf) should be included?.
>> >
>> > I hope you can clarify my doubts. I have seen the collection of prior
>> postings to the list, but I have not found a specifical answer to my
>> doubts .
>> >
>> > Thank you very much in advance.
>> >
>> > Best regards,
>> >
>> > Guillermo
>> >
>> > __
>> > R-devel@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-devel
>> >
>>
>>
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> [[alternative HTML version deleted]]
>
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



-- 
http://had.co.nz/

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


Re: [Rd] Where to put package vignettes

2014-02-20 Thread Yihui Xie
It is not guaranteed that knitr vignettes will work for R < 3.0.x
(even with the Makefile approach, which was really a hack). Unless you
must stay with R 2.15.x, you are strongly recommended to upgrade to R
3.0.x and forget about the Makefile approach. Then follow the three
steps mentioned in http://yihui.name/knitr/demo/vignette/

If you still cannot work it out, please point us to the source of your package.

Regards,
Yihui
--
Yihui Xie 
Web: http://yihui.name


On Thu, Feb 20, 2014 at 8:43 AM,   wrote:
> Dear Søren,
>
> Thank you very much for your answer, it solved my problem and now my
> package can be installed both on Linux and Windows and the vignette is
> available in both systems. I put the vignette in /vignettes.
>
> However, unfortunately my problems have not ended here. As mentioned, my
> vignette is built with knitr and with the following commands:
>
> 1) R CMD check foo
> 2) R CMD build foo
> 3) R CMD INSTALL foo_xxx.tar.gz
>
> the vignette is built with Sweave!
>
> I have read in http://yihui.name/knitr/demo/vignette/ that in that case,
> a Makefile should be incorporated.
>
> I have incorporated in /inst/doc the makefile from
> https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile
>
> however, my vignette is still built with Sweave. I use R 2.15.2.
>
> How can I fix this performance?.
>
> Thank you very much again.
>
> Best regards,
>
> Guillermo
>
>> My understanding is this:
>>
>> 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
> Build the package foo with R CMD build foo. 3) Install the package with
> R CMD INSTALL foo_xxx.tar.gz
>>
>> Then the vignettes will be available. However you can also install the
> package with R CMD INSTALL foo, but then the vignettes will *not* be
> available (because it is in the build process that the vignettes go from
> /vignettes to /inst/doc)
>>
>> Regards
>> Søren
>>
>>
>> -Original Message-
>> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of guillermo.vi...@uv.es
>> Sent: 20. februar 2014 12:19
>> To: r-devel@r-project.org
>> Subject: [Rd] Where to put package vignettes
>>
>> Dear R-devel list,
>>
>> My name is Guillermo Vinué. I have created an R package that includes
> a vignette. Earlier on, to test my package, I tried to install it both
> in Linux and Windows and it worked. My vignette was in /inst/doc.
>>
>> Now, I have finished for good and before submitting my package to CRAN
> I've tried to install it again first in Linux and then in Windows (I
> removed that first installation some time ago).
>>
>> My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
> and the vignette was available. However, when trying to install it in
> Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette
> is build with knitr.
>>
>> In fact, if I first install the package on Windows, the vignette is
> accesible, but then in Linux, not.
>>
>> I have read that as from R 2.14.0 the preferred location for the
> Sweave sources is the subdirectory vignettes of the source packages, but
> for compatibility with earlier versions of R, vignette sources will be
> looked for in inst/doc if vignettes does not exist.
>>
>> Where do I have to put my vignette so that it could be available with
> any installation and which files (.Rnw or .pdf) should be included?.
>>
>> I hope you can clarify my doubts. I have seen the collection of prior
> postings to the list, but I have not found a specifical answer to my
> doubts .
>>
>> Thank you very much in advance.
>>
>> Best regards,
>>
>> Guillermo

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


[Rd] instantiating a reference class with an initialize() method from .onLoad fails

2014-02-20 Thread Martin Morgan

PkgA has a single R/binding.R file containing

   .A <- setRefClass("A", methods=list(initialize=function(...) {}))
   .onLoad <- function(...) .A()

A NAMESPACE with

import(methods)
exportClasses("A")

and DESCRIPTION

Package: PkgA
Type: Package
Title: Documenting reference classes
Version: 0.0.1
Date: 2012-08-05
Author: Martin Morgan
Maintainer: Martin Morgan 
Description: This package implements a simple 'reference' class
Depends: methods
Imports: methods
License: Apache License 2.0
Collate: binding.R

R CMD INSTALL PkgA results in

p$ R --vanilla CMD INSTALL PkgA
* installing to library ‘/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/3.1’
* installing *source* package ‘PkgA’ ...
** R
** preparing package for lazy loading
** help
No man pages found in package  ‘PkgA’
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'PkgA', details:
  call: initialize(value, ...)
  error: attempt to apply non-function
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/3.1/PkgA’
* restoring previous 
‘/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/3.1/PkgA’

Having read

https://stat.ethz.ch/pipermail/r-devel/2013-October/067636.html

I used

setLoadAction(function(nmspc) .A())

in place of .onLoad, and had success. However, a more complicated scenario,

https://stat.ethz.ch/pipermail/bioc-devel/2014-February/005271.html

where a data file contains an instance of a class defined in a package that 
imports PkgA, fails during R CMD check or in an R session with


env = new.env(); load("data.Rdata", env); get("data", env)

including when .A() is eval() or evalq()'d in envir=nmspc.

Thanks for any hints.

Martin
--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

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