[Rd] Stand alone application using R

2012-12-05 Thread Manoj G
Hello everyone...

I am curious to develop a stand-alone application using R and I am exploring
how to do it. Shiny can be used if it is a web application!

But which programming is more suitable and can be easily bundled with R? 

Java? or python? or something else? What do u prefer?

Thanks in advance for your help... Good day... :)

-Manoj G



-
Manoj G
--
View this message in context: 
http://r.789695.n4.nabble.com/Stand-alone-application-using-R-tp4652158.html
Sent from the R devel mailing list archive at Nabble.com.

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


Re: [Rd] inconsistencies between ?class and ?UseMethod

2012-12-05 Thread cberry
Hervé Pagès  writes:

> Hi,
>
> The 2 man pages give inconsistent description of class():
>
> Found in ?class:
>
>  If the object does not have a class attribute, it has an implicit
>  class, ‘"matrix"’, ‘"array"’ or the result of ‘mode(x)’ (except
>  that integer vectors have implicit class ‘"integer"’).
>
> Found in ?UseMethod:
>
>  Matrices and arrays have class ‘"matrix"’ or‘"array"’ followed
>  by the class of the underlying vector.
>  Most vectors have class the result of ‘mode(x)’, except that
>  integer vectors have class ‘c("integer", "numeric")’ and real
>  vectors have class ‘c("double", "numeric")’.
>
> So according to ?UseMethod, class(matrix(1:4)) should be
> c("matrix", "integer", "numeric"), which is of course not the case:
>
>   > class(matrix(1:4))
>   [1] "matrix"
>
> I wonder if this was ever true, and, if so, when and why it has changed.


It still is in the sense that UseMethod and NextMethod dispatch in that
manner on implicit classes. It is bit confusing to me that class()
doesn't report all the implicit classes (like the first error message
below) and inherits() only admits what class() has told.

Note what the first error message below says and how the succesive calls
for afun() work as methods are added to the generic.

If you set a class attribute then the picture changes. I do not see where
this is documented, but it looks like once a class attribute is set, the
implicit classes go away - per the last error message.

> afun <- function(x) UseMethod("afun",x)
> afun(matrix(1L,nc=1))
Error in UseMethod("afun", x) : 
  no applicable method for 'afun' applied to an object of class
  "c('matrix', 'integer', 'numeric')"
> afun.numeric <- function(x) cat("numeric",x,"\n")
> afun(matrix(1L,nc=1))
numeric 1 
> afun.integer <- function(x) cat("integer",x,"\n")
> afun(matrix(1L,nc=1))
integer 1 
> afun.matrix <- function(x) cat("matrix",x,"\n")
> afun(matrix(1L,nc=1))
matrix 1 
> afun.matrix <- function(x) NextMethod()
> afun(matrix(1L,nc=1))
integer 1 
> afun.fooey <- function(x) NextMethod()
> my.mat <- matrix(1L,nc=1)
> afun(my.mat)
matrix 1 
> class(my.mat) <- "fooey"
> afun(my.mat)
Error in NextMethod() : no method to invoke
> 

> Anyway, an update to ?UseMethod would be welcome. 

I wonder if "except with implicit" would improve over "with some
interpolated" in ?class here:

"...in R UseMethod dispatches on the class as returned by class (with
some interpolated classes: see the link)"

HTH,

Chuck

> Or, documenting
> class() in only 1 place seems even better (more DRY principle).
>
> Thanks,
> H.

-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, CA 92093-0901

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


Re: [Rd] Stand alone application using R

2012-12-05 Thread Simon Urbanek

On Dec 5, 2012, at 1:33 AM, Manoj G wrote:

> Hello everyone...
> 
> I am curious to develop a stand-alone application using R and I am exploring 
> how to do it.

There are many examples - the GUIs bundled with R (R.app for Mac, Rgui, rterm 
for Windows) or packages like Rserve (C), RInside (C++), JGR (Java), ...


> Shiny can be used if it is a web application!
> 
> But which programming is more suitable and can be easily bundled with R? 
> 
> Java? or python? or something else? What do u prefer?
> 

The native language for embedding R is C, but there are embedding interfaces 
for other languages, so it really depends on your taste and the complexity you 
are willing to  tolerate.

Cheers,
S


> Thanks in advance for your help... Good day... :)
> 
> -Manoj G
> 
> 
> 
> -
> Manoj G
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Stand-alone-application-using-R-tp4652158.html
> Sent from the R devel mailing list archive at Nabble.com.
> 
> __
> 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] Stand alone application using R

2012-12-05 Thread Manoj G
Thanks Simon,

I will go ahead with JGR now. 

There are java packages like rJava and RCaller. And i found they are not
useful after a certain extent. How different is JGR from these two?

I am willing to tolerate more complexity but, i am curious to develop a more
sophisticated application where i want to see R outputs in some some other
environment without using R console.

Thank,
Manoj G



-
Manoj G
--
View this message in context: 
http://r.789695.n4.nabble.com/Stand-alone-application-using-R-tp4652158p4652207.html
Sent from the R devel mailing list archive at Nabble.com.

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


Re: [Rd] Stand alone application using R

2012-12-05 Thread William Dunlap
Would you mind elaborating on how rJava and RCaller
"are not useful after a certain extent"?  I.e., are there
bugs, memory leaks, too limited an API, or other problems
with them?

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com


> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On 
> Behalf
> Of Manoj G
> Sent: Wednesday, December 05, 2012 8:10 AM
> To: r-devel@r-project.org
> Subject: Re: [Rd] Stand alone application using R
> 
> Thanks Simon,
> 
> I will go ahead with JGR now.
> 
> There are java packages like rJava and RCaller. And i found they are not
> useful after a certain extent. How different is JGR from these two?
> 
> I am willing to tolerate more complexity but, i am curious to develop a more
> sophisticated application where i want to see R outputs in some some other
> environment without using R console.
> 
> Thank,
> Manoj G
> 
> 
> 
> -
> Manoj G
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Stand-alone-application-
> using-R-tp4652158p4652207.html
> Sent from the R devel mailing list archive at Nabble.com.
> 
> __
> 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] Stand alone application using R

2012-12-05 Thread Brian G. Peterson

On 12/05/2012 10:09 AM, Manoj G wrote:

I am willing to tolerate more complexity but, i am curious to develop a more
sophisticated application where i want to see R outputs in some some other
environment without using R console.


Doesn't this conversation belong on R-SIG-GUI?

--
Brian

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


Re: [Rd] Stand alone application using R

2012-12-05 Thread Simon Urbanek

On Dec 5, 2012, at 11:09 AM, Manoj G  wrote:

> Thanks Simon,
> 
> I will go ahead with JGR now. 
> 
> There are java packages like rJava and RCaller. And i found they are not
> useful after a certain extent. How different is JGR from these two?
> 

JGR is using JRI from rJava for the R/Java interface.

Cheers,
Simon


> I am willing to tolerate more complexity but, i am curious to develop a more
> sophisticated application where i want to see R outputs in some some other
> environment without using R console.
> 
> Thank,
> Manoj G
> 
> 
> 
> -
> Manoj G
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Stand-alone-application-using-R-tp4652158p4652207.html
> Sent from the R devel mailing list archive at Nabble.com.
> 
> __
> 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] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Duncan Murdoch

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


I'm having problems creating a real NAMESPACE to replace the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package called
'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


Suggestions?
Thanks,
Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc)
   :
there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries to 
load a package (not sure if it's yours or zoo) that is not in the 
.libPaths.  There might be more details in the check log.


What does it say there?

Duncan Murdoch





  > sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods base

other attached packages:
[1] zoo_1.7-9

loaded via a namespace (and not attached):
[1] grid_2.15.2 lattice_0.20-10

__
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] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Spencer Graves

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


I'm having problems creating a real NAMESPACE to replace the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package called
'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


Suggestions?
Thanks,
Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc)
   :
there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries 
to load a package (not sure if it's yours or zoo) that is not in the 
.libPaths.  There might be more details in the check log.


What does it say there?



  I didn't see any more than the portion copied here.  Below please 
find the entire 00check.log.  Thanks, Spencer



* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies 
... OK

* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = 
lib.loc) :

  there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link(s) in documentation object 
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/basisfd.Rd':

  'use.proper.basis' 'is.eqbasis'

Missing link(s) in documentation object 
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/cca.fd.Rd':

  'plot.cca.fd'

Missing link(s) in documentation object 
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomial.Rd':

  'polynom'

Missing link(s) in documentation object 
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomialpen.Rd':

  'polynompen'

Missing link(s) in documentation object 
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/readHMD.Rd':

  'getURL'

See the information in section 'Cross-references' of the 'Writing R
Extensions' manual.

* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from 'inst/doc' ... OK
* checking examples ... ERROR
Running examples in 'fda-Ex.R' failed
The error most likely occurred in:


Re: [Rd] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Duncan Murdoch

On 12-12-05 2:19 PM, Spencer Graves wrote:

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


 I'm having problems creating a real NAMESPACE to replace the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package called
'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


 Suggestions?
 Thanks,
 Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc)
:
 there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries
to load a package (not sure if it's yours or zoo) that is not in the
.libPaths.  There might be more details in the check log.

What does it say there?



I didn't see any more than the portion copied here.  Below please
find the entire 00check.log.  Thanks, Spencer



Do you have more than one library, or do you use the default 
.libPaths()?  I'm on a slightly old install of R on this Mac, and I see 
this (starting R from the same place I ran the check):


> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

What do you see?

Duncan Murdoch




* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies
... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc) :
there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/basisfd.Rd':
'use.proper.basis' 'is.eqbasis'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/cca.fd.Rd':
'plot.cca.fd'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomial.Rd':
'polynom'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomialpen.Rd':
'polynompen'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/readHMD.Rd':
'getURL'

See the information in section 'Cross-references' of the 'Writing R
Extensions' manual.

* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
*

Re: [Rd] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Spencer Graves

On 12/5/2012 11:27 AM, Duncan Murdoch wrote:

On 12-12-05 2:19 PM, Spencer Graves wrote:

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


 I'm having problems creating a real NAMESPACE to replace 
the pro

forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package 
called

'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


 Suggestions?
 Thanks,
 Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ... 
WARNING

Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, 
lib.loc =

lib.loc)
:
 there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on 
.libPaths:

see the messages for details.


This message is printed by tools when there's an error when it tries
to load a package (not sure if it's yours or zoo) that is not in the
.libPaths.  There might be more details in the check log.

What does it say there?



I didn't see any more than the portion copied here. Below please
find the entire 00check.log.  Thanks, Spencer



Do you have more than one library, or do you use the default 
.libPaths()?  I'm on a slightly old install of R on this Mac, and I 
see this (starting R from the same place I ran the check):


> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

What do you see?



> .libPaths()
[1] "C:/Users/sgraves/pgms/R/R-2.15.2/library"
[2] "C:/Users/sgraves/R/win-library/2.15"
>

  Thanks.  Spencer



Duncan Murdoch




* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies 
... OK

* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies
... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc) :
there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/basisfd.Rd': 


'use.proper.basis' 'is.eqbasis'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/cca.fd.Rd': 


'plot.cca.fd'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomial.Rd': 


'polynom'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomialpen.Rd': 


'polynompen'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/readHMD.Rd': 


'getURL'

See the information in section 'Cross-references' of th

Re: [Rd] Compilation failure on Solaris: any advice?

2012-12-05 Thread elijah wright
Is that a build with "good old" Studio or a build with a recent GCC?

I don't have any direct comments that would be helpful to you - but let me
know if you need a place to do some test builds and try to figure it out.
 I can certainly help you with that.

[Are more Solaris-esque build slaves needed?  Someone give a shout if so...
we can sponsor some infrastructure there.]

--elijah
(@Joyent)



On Mon, Dec 3, 2012 at 11:28 AM, Jon Clayden  wrote:

> Dear all,
>
> The current version of my RNiftyReg package is failing to compile on CRAN's
> Solaris testbed, but I don't have access to a Solaris system to debug on,
> and Googling the error hasn't been very helpful. The error is
>
> CC -library=stlport4 -I/home/ripley/R/cc/include -DNDEBUG -DNDEBUG
> -DRNIFTYREG -I/usr/local/include-KPIC  -O -xlibmil -xtarget=native
> -nofstore  -c niftyreg.cpp -o niftyreg.o
> "_reg_f3d_sym.cpp", line 25: Error: reg_f3d may not have a type qualifier.
> "niftyreg.cpp", line 527: Where: While instantiating
> "reg_f3d_sym::reg_f3d_sym(int, int)".
> "niftyreg.cpp", line 527: Where: Instantiated from non-template code.
> "_reg_f3d_sym.cpp", line 26: Error: reg_f3d cannot be initialized
> in a constructor.
> "niftyreg.cpp", line 527: Where: While instantiating
> "reg_f3d_sym::reg_f3d_sym(int, int)".
> "niftyreg.cpp", line 527: Where: Instantiated from non-template code.
> "_reg_f3d_sym.cpp", line 26: Error: Could not find
> reg_f3d::reg_f3d() to initialize base class.
> "niftyreg.cpp", line 527: Where: While instantiating
> "reg_f3d_sym::reg_f3d_sym(int, int)".
> "niftyreg.cpp", line 527: Where: Instantiated from non-template code.
> 3 Error(s) detected.
> *** Error code 2
> make: Fatal error: Command failed for target `niftyreg.o'
>
>
> (Full log at [1].) The relevant part of the source is a C++ class
> constructor, part of the library that my package interfaces to:
>
> template 
> reg_f3d_sym::reg_f3d_sym(int refTimePoint,int floTimePoint)
> :reg_f3d::reg_f3d(refTimePoint,floTimePoint)
> {
> this->executableName=(char *)"NiftyReg F3D SYM";
>
> this->backwardControlPointGrid=NULL;
> this->backwardWarped=NULL;
> this->backwardWarpedGradientImage=NULL;
> this->backwardDeformationFieldImage=NULL;
> this->backwardVoxelBasedMeasureGradientImage=NULL;
> this->backwardNodeBasedGradientImage=NULL;
>
> this->backwardBestControlPointPosition=NULL;
> this->backwardConjugateG=NULL;
> this->backwardConjugateH=NULL;
>
> this->backwardProbaJointHistogram=NULL;
> this->backwardLogJointHistogram=NULL;
>
> this->floatingMaskImage=NULL;
> this->currentFloatingMask=NULL;
> this->floatingMaskPyramid=NULL;
> this->backwardActiveVoxelNumber=NULL;
>
> this->inverseConsistencyWeight=0.1;
>
> #ifndef NDEBUG
> printf("[NiftyReg DEBUG] reg_f3d_sym constructor called\n");
> #endif
> }
>
> The error does not occur on any Windows, Linux or OS X system which I have
> access to, so this would seem to be an issue relating to the Solaris
> compiler toolchain in particular. Can anyone shed any light on it, please?
>
> Thanks in advance,
> Jon
>
> --
> [1]
>
> http://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/RNiftyReg-00install.html
>
> [[alternative HTML version deleted]]
>
> __
> 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] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Spencer Graves

On 12/5/2012 11:27 AM, Duncan Murdoch wrote:

On 12-12-05 2:19 PM, Spencer Graves wrote:

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


 I'm having problems creating a real NAMESPACE to replace
the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package
called
'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


 Suggestions?
 Thanks,
 Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ...
WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE,
lib.loc =
lib.loc)
:
 there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on
.libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries
to load a package (not sure if it's yours or zoo) that is not in the
.libPaths.  There might be more details in the check log.

What does it say there?



I didn't see any more than the portion copied here. Below please
find the entire 00check.log.  Thanks, Spencer



Do you have more than one library, or do you use the default
.libPaths()?  I'm on a slightly old install of R on this Mac, and I
see this (starting R from the same place I ran the check):

> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

What do you see?




.libPaths()

[1] "C:/Users/sgraves/pgms/R/R-2.15.2/library"
[2] "C:/Users/sgraves/R/win-library/2.15"




*** FIXED:


	  I deleted the directory "C:/Users/sgraves/R/win-library/2.15", 
reinstalled zoo, and now I don't get that error any more.  (I still have 
others ;-)



	  I don't know where .libPaths() got 
"C:/Users/sgraves/R/win-library/2.15":  It's not in R_HOME or R_LIBS. 
Fortunately, I don't have to solve that problem.



  Thanks.  Spencer



Duncan Murdoch




* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies
... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies
... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc) :
there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/basisfd.Rd':

'use.proper.basis' 'is.eqbasis'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/cca.fd.Rd':

'plot.cca.fd'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/monomial.Rd':

'polynom'

Missing link(s) in do

Re: [Rd] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Duncan Murdoch

On 12-12-05 3:26 PM, Spencer Graves wrote:

On 12/5/2012 11:27 AM, Duncan Murdoch wrote:

On 12-12-05 2:19 PM, Spencer Graves wrote:

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


  I'm having problems creating a real NAMESPACE to replace
the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package
called
'zoo'";  see below.  I get this both with and without "import(zoo)" in
NAMESPACE.


  Suggestions?
  Thanks,
  Spencer


p.s.  The current code including this problem can be obtained through
anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ...
WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE,
lib.loc =
lib.loc)
 :
  there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on
.libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries
to load a package (not sure if it's yours or zoo) that is not in the
.libPaths.  There might be more details in the check log.

What does it say there?



 I didn't see any more than the portion copied here. Below please
find the entire 00check.log.  Thanks, Spencer



Do you have more than one library, or do you use the default
.libPaths()?  I'm on a slightly old install of R on this Mac, and I
see this (starting R from the same place I ran the check):


.libPaths()

[1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

What do you see?



  > .libPaths()
[1] "C:/Users/sgraves/pgms/R/R-2.15.2/library"
[2] "C:/Users/sgraves/R/win-library/2.15"


I would guess the problem is that it is using a different .libPaths 
setting for that test, and zoo is in the wrong place.  I don't know 
whether this is something you did or a bug in the check code.


In any case, that's a funny ordering you're using:  normally I'd expect 
the user-specific library to come first (because it would be searched 
first), and that would be followed by the system library installed with 
R.  How are you setting it?


Duncan Murdoch


  >

Thanks.  Spencer



Duncan Murdoch




* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies
... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies
... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
lib.loc) :
 there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src/fda/man/basisfd.Rd':

 'use.proper.basis' 'is.eqbasis'

Missing link(s) in documentation object
'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck/00_pkg_src

Re: [Rd] NAMESPACE problem: import(zoo) but 'zoo' could not be loaded

2012-12-05 Thread Spencer Graves

On 12/5/2012 1:12 PM, Duncan Murdoch wrote:

On 12-12-05 3:26 PM, Spencer Graves wrote:

On 12/5/2012 11:27 AM, Duncan Murdoch wrote:

On 12-12-05 2:19 PM, Spencer Graves wrote:

On 12/5/2012 11:10 AM, Duncan Murdoch wrote:

On 12-12-05 1:24 AM, Spencer Graves wrote:

Hello:


  I'm having problems creating a real NAMESPACE to replace
the pro
forma one in the fda package on R-Forge.  "R CMD check" complains,
"Error: package 'zoo' could not be loaded ... there is no package
called
'zoo'";  see below.  I get this both with and without 
"import(zoo)" in

NAMESPACE.


  Suggestions?
  Thanks,
  Spencer


p.s.  The current code including this problem can be obtained 
through

anonymous access via "svn checkout
svn://svn.r-forge.r-project.org/svnroot/fda/".


C:\Users\sgraves\2012\R_pkgs\fda>R CMD check fda_2.3.3.tar.gz
* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)



* checking loading without being on the library search path ...
WARNING
Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE,
lib.loc =
lib.loc)
 :
  there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on
.libPaths:
see the messages for details.


This message is printed by tools when there's an error when it tries
to load a package (not sure if it's yours or zoo) that is not in the
.libPaths.  There might be more details in the check log.

What does it say there?



 I didn't see any more than the portion copied here. Below 
please

find the entire 00check.log.  Thanks, Spencer



Do you have more than one library, or do you use the default
.libPaths()?  I'm on a slightly old install of R on this Mac, and I
see this (starting R from the same place I ran the check):


.libPaths()

[1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

What do you see?



  > .libPaths()
[1] "C:/Users/sgraves/pgms/R/R-2.15.2/library"
[2] "C:/Users/sgraves/R/win-library/2.15"


I would guess the problem is that it is using a different .libPaths 
setting for that test, and zoo is in the wrong place.  I don't know 
whether this is something you did or a bug in the check code.


In any case, that's a funny ordering you're using:  normally I'd 
expect the user-specific library to come first (because it would be 
searched first), and that would be followed by the system library 
installed with R.  How are you setting it?



  I don't know how it was being set.  I couldn't find the second 
path in environment variables or Rprofile.site.  However, when I 
physically deleted it, restarted R, Emacs, and the Windows Command 
Prompt, it went away.  Now .libPaths() contains only the first path.  
After I installed zoo in that, this error went away.



  Thanks again for your help.
  Spencer



Duncan Murdoch


  >

Thanks.  Spencer



Duncan Murdoch




* using log directory 'C:/Users/sgraves/2012/R_pkgs/fda/fda.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'fda/DESCRIPTION' ... OK
* this is package 'fda' version '2.3.3'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'fda' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies
... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated 
dependencies

... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... 
WARNING

Loading required package: splines
Loading required package: zoo
Error: package 'zoo' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, 
lib.loc =

lib.loc) :
 there is no package called 'zoo'
Execution halted

It looks like this package has a loading problem when not on 
.libPaths:

see the messages for details.
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... 

[Rd] factor(x, exclude=y) if x is a factor

2012-12-05 Thread Suharto Anggono Suharto Anggono
I found this part in the documentation of 'factor'.

 'factor(x, exclude=NULL)' applied to a factor is a no-operation
 unless there are unused levels: in that case, a factor with the
 reduced level set is returned.  If 'exclude' is used it should
 also be a factor with the same level set as 'x' or a set of codes
 for the levels to be excluded.


Regarding the last sentence, this is the actual behavior.

> x <- factor(c("a","b"), levels=c("a","b"))
> x
[1] a b
Levels: a b
> factor(x, exclude=factor("a", levels=c("a","b")))
[1] a b
Levels: a b
> factor(x, exclude=1L)
[1] a b
Levels: a b

I expect "a" to be removed from levels.


> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.15.2


The results are the same in R 2.5.1.


In R 2.5.1, if function 'match' did not apply 'as.character' to factor (and 
used internal code of factor instead), it would work to set 'exclude' as in the 
above quotation of the documentation. In the example above, "a" would be 
removed from levels.


One cause of the trouble is this code in the definition of function 'factor', 
in R 2.15.2 or in R 2.5.1.

exclude <- as.vector(exclude, typeof(x))

What is the intent actually?

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