Re: [Rd] Internet error on Mac OS X 10.9 with 3.1.0 RC

2014-04-06 Thread Gregory R. Warnes
Hi Simon,

> sessionInfo()
R version 3.1.0 RC (2014-04-04 r65373)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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


I just reinstalled, and can’t duplicate the error now.  The only difference, 
AFAIC, is that this time I left R 3.0.3 installed by running "sudo pkgutil 
--forget org.r-project.R.x86_64.fw.pkg” first.

-Greg



On Apr 5, 2014, at 7:00 PM, Simon Urbanek  wrote:

> Greg,
> 
> since we have more than one build now, could you, please, include 
> sessionInfo()?
> 
> Thanks
> Simon
> 
> 
> 
> On Apr 5, 2014, at 1:39 PM, Gregory R. Warnes  wrote:
> 
>> 
>> OS X 10.9.2
>> 
>> R 3.1.0 RC (2014-04-04 r65373) installer from http://r.research.att.com
>> 
>> Attempting to install packages yields the following:
>> 
>>> install.packages( c('gregmisc','RUnit') )
>> --- Please select a CRAN mirror for use in this session ---
>> Error in url("http://cran.r-project.org/CRAN_mirrors.csv";) : 
>> internet routines cannot be accessed in module
>> 
>> -Greg
>>  [[alternative HTML version deleted]]
>> 
>> __
>> 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] Internet error on Mac OS X 10.9 with 3.1.0 RC

2014-04-06 Thread Gregory R. Warnes
Hi Simon,

> sessionInfo()
R version 3.1.0 RC (2014-04-04 r65373)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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


I just reinstalled, and can’t duplicate the error now.  The only difference, 
AFAIC, is that this time I left R 3.0.3 installed by running "sudo pkgutil 
--forget org.r-project.R.x86_64.fw.pkg” first.

-Greg



On Apr 5, 2014, at 7:00 PM, Simon Urbanek  wrote:

> Greg,
> 
> since we have more than one build now, could you, please, include 
> sessionInfo()?
> 
> Thanks
> Simon
> 
> 
> 
> On Apr 5, 2014, at 1:39 PM, Gregory R. Warnes  wrote:
> 
>> 
>> OS X 10.9.2
>> 
>> R 3.1.0 RC (2014-04-04 r65373) installer from http://r.research.att.com
>> 
>> Attempting to install packages yields the following:
>> 
>>> install.packages( c('gregmisc','RUnit') )
>> --- Please select a CRAN mirror for use in this session ---
>> Error in url("http://cran.r-project.org/CRAN_mirrors.csv";) : 
>> internet routines cannot be accessed in module
>> 
>> -Greg
>>  [[alternative HTML version deleted]]
>> 
>> __
>> 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


[Rd] minor issue with R CMD INSTALL --build

2014-04-06 Thread Dan Tenenbaum
Hello,

I created a trivial package like this:

R --vanilla
a = 1
package.skeleton("apkg")

Then at the command prompt I removed apkg/man/* to avoid installation errors 
since those man pages are incomplete.

Then:

R CMD build apkg
R CMD INSTALL --build apkg_1.0.tar.gz 

says:
[...]
packaged installation of 'apkg' as 'apkg_1.0.tgz.gz'

I would have expected it to say:
packaged installation of 'apkg' as 'apkg_1.0.tgz'

Because indeed it did create apkg_1.0.tgz, not apkg_1.0.tgz.gz.

> sessionInfo()
R version 3.1.0 RC (2014-04-05 r65382)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

Thanks,
Dan

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


[Rd] attach() outputs messages to stdout - should it be stderr?

2014-04-06 Thread Henrik Bengtsson
Contrary to other functions in 'base', attach() output messages to
stdout instead of stdout, e.g.

> a <- 1
> capture.output(attach(list(a=1)))
[1] "The following object is masked _by_ .GlobalEnv:"
[2] ""
[3] "a"

Shouldn't this message go to stderr?

Here's a patch for the local function checkConflicts() of
base::attach(), cf. ditto for base::library() that outputs to stderr:

Index: library/base/R/attach.R
===
--- library/base/R/attach.R (revision 65344)
+++ library/base/R/attach.R (working copy)
@@ -73,7 +73,7 @@
 "The following objects
are masked %s %s:\n\n%s\n"),
if (i < db.pos) "_by_" else "from",
pkg, paste(objs, collapse="\n"))
-cat(msg)
+cat(msg, file = stderr())
 }
 }
 }

/Henrik

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


Re: [Rd] inconsistent error messages on Mac OS X

2014-04-06 Thread Adam Welc
Dan,

Thank you for your reply! Indeed, the message is consistent when using the
unstable version 2014-03-31 r65345. Even when using this version, though, I
observe the following inconsistency:

Adams-MacBook-Air:work adam$ R --vanilla

R Under development (unstable) (2014-03-31 r65345) -- "Unsuffered
Consequences"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)
...
...
Type 'q()' to quit R.

> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select less than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select more than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select less than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select less than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select more than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select less than one element
> x<-1:4; dim(x)<-c(2,2); x[[-2, 0]]
Error in x[[-2, 0]] : attempt to select less than one element


Any thoughts?

Thank you

Adam



On Wed, Apr 2, 2014 at 3:32 PM, Dan Tenenbaum  wrote:

>
>
> - Original Message -
> > From: "Adam Welc" 
> > To: r-devel@r-project.org
> > Sent: Wednesday, April 2, 2014 3:11:28 PM
> > Subject: [Rd] inconsistent error messages on Mac OS X
> >
> > Hi All,
> >
> > I am one of the contributors to the FastR project (
> > https://bitbucket.org/allr ) and I have
> > encountered an interesting issue when trying to implement vector
> > accesses
> > within FastR. I am trying to understand what kind of error message
> > should
> > be generated for the following expression:
> >
> > x<-1:4; x[[1]]<-NULL; x
> >
> > In order to determine the error message, I ran the shell of standard
> > GNU R
> > (installed via MacPorts - R version 2.15.3) on Mac OS X 10.8.5 as
> > follows,
> > with R metadata (that is .RData or .Rhistory files) removed from the
> > current directory
>
> Instead you should probably start R as follows:
>
> R --vanilla
>
> ?Startup explains why removing .RData etc from the current directory is
> not enough, in the absence of --vanilla.
>
> >(I have edited portions of the R header printed
> > when the
> > shell starts for the sake for readability):
> >
> > Adams-MacBook-Air:work adam$ R
> >
> > R version 2.15.3 (2013-03-01) -- "Security Blanket"
> > Copyright (C) 2013 The R Foundation for Statistical Computing
> > ISBN 3-900051-07-0
> > Platform: x86_64-apple-darwin12.3.0/x86_64 (64-bit)
> > ...
> > ...
> > Type 'q()' to quit R.
> >
> > > x<-1:4; x[[1]]<-NULL; x
> > Error in x[[1]] <- NULL :
> >   incompatible types (from NULL to integer) in [[ assignment
> > > q()
> > Save workspace image? [y/n/c]: n
> >
> >
> > Adams-MacBook-Air:work adam$ R
> >
> > R version 2.15.3 (2013-03-01) -- "Security Blanket"
> > Copyright (C) 2013 The R Foundation for Statistical Computing
> > ISBN 3-900051-07-0
> > Platform: x86_64-apple-darwin12.3.0/x86_64 (64-bit)
> > ...
> > ...
> > Type 'q()' to quit R.
> >
> > > x<-1:4; x[[1]]<-NULL; x
> > Error in x[[1]] <- NULL :
> >   more elements supplied than there are to replace
> > >
> >
> >
> > As you can see, the error message for the same expression is
> > different on
> > two subsequent executions of the GNU R shell (with no workspace image
> > saving - but it does not matter, as I observe the same behavior if
> > the
> > workspace is saved).
> >
> > I tried the same thing on Linux, but there the behavior seems
> > consistent
> > (the second message is displayed in each execution).
> >
> > This issue is not specific to this single expression - it happens in
> > other
> > (though not all) cases when the NULL value is assigned to an element
> > of a
> > vector.
> >
> > I was wondering if someone has observed the same behavior and perhaps
> > knows
> > what may be causing it...
> >
>
> I can't reproduce this on
> R Under development (unstable) (2013-10-12 r64048)
>
> with or without --vanilla, it consistently gives the second error message.
>
> Dan
>
>
> > Thank you
> >
> > Adam
> >
> >   [[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