Re: [Rd] Running ./tools/rsync-recommended through a proxy

2005-06-29 Thread Prof Brian Ripley
Googling for 'squid rsync' suggests that squid has to be explicitly
configured to allow rsync, e.g.

http://www.sai.msu.su/~er/rsync_proxy.html

Why not ask the proxy administrators if they have rsync configured?


On Tue, 28 Jun 2005, Douglas Bates wrote:

> My computers at my office will no longer be able to connect directly
> to web sites etc.  I will be going through a proxy server.  The
> particular server is running squid on port 3128.
>
> I have managed to configure web browsers, ssh, apt, svn and a whole
> lot of other tools to use the proxy server but I haven't been able to
> configure rsync.  My usual method of updating my copy of the R-devel
> sources is via
>
> cd my_R_devel_sources
> svn up
> ./tools/rsync-recommended
>
> cd my_R_build_directory
> ...
>
> Can anyone offer suggestions on how to get rsync-recommended to work
> through a proxy?  I have set
>
> export RSYNC_PROXY="machine.name:3128"
>
> which I understand from the documentation is the magic environment
> variable (I don't give the name of the server explicitly because it is
> an open proxy).  However, I still get
>
> [EMAIL PROTECTED]:/usr/src/r-devel$ ./tools/rsync-recommended
> bad response from proxy - HTTP/1.0 403 Forbidden
> rsync: failed to connect to machine.name: Success (0)
> rsync error: error in socket IO (code 10) at clientserver.c(94)
> *** rsync failed to update Recommended files ***
> Creating links
>
> Is it likely that the proxy server is not passing connections to port 873?
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] (PR#7972) row-side color bars ... in heatmap

2005-06-29 Thread maechler
Hi Kevin,

> "krc" == krc  <[EMAIL PROTECTED]>
> on Mon, 27 Jun 2005 21:55:37 +0200 (CEST) writes:

krc> Full_Name: Kevin R. Coombes
krc> Version: 2.1.0
krc> OS: Windows XP
krc> Submission from: (NULL) (143.111.224.169)


krc> When revC = TRUE and RowSideColors is set to a list of
krc> colors in heatmap, then the image and dendrogram are
krc> inverted, but the row-side color map does not
krc> change. The following script illustrates the problem.

krc> ##
krc> set.seed(1023)
krc> # generate columns of two different types
krc> d1 <- matrix(rnorm(100*6, rnorm(100, 0.5)), nrow=100, ncol=6, 
byrow=FALSE)
krc> d2 <- matrix(rnorm(100*4, rnorm(100, 0.5)), nrow=100, ncol=4, 
byrow=FALSE)
krc> # join them together
krc> dd <- cbind(d1, d2)
krc> # label them with different colors
krc> cols <- rep(c('blue', 'green'), times=c(6,4))

krc> # change the order of the columns and the matching labels
krc> # to show that reordering occurs in one case in heatmap
krc> col.order <- sample(10)
krc> dd <- dd[, col.order]
krc> cols <- cols[col.order]

krc> # compute the dendrogram to be used in the display
krc> hc <- hclust(dist(dd, 'euclid'))

a clustering of 100 observational units

krc> # get the correlation matrix
krc> m <- cor(dd)

a 10 x 10 matrix ; i.e. 10 row units and 10 column units.

Hence the following never works,
at least not for the heatmap() function as in ``standard R''.

krc> # this version works correctly
krc> heatmap(m, Rowv=as.dendrogram(hc), symm=TRUE, revC=FALSE, 
RowSideColors=cols)

gives immediately the obvious error

 Error in heatmap(m, Rowv =  :
 row dendrogram ordering gave index of wrong length

krc> #this version reverses the dendrogram and image, but not the colors
krc> heatmap(m, Rowv=as.dendrogram(hc), symm=TRUE, revC=TRUE,
krc> RowSideColors=cols)

so I wonder what you did want.

Regards,
Martin

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


Re: [Rd] (PR#7972) row-side color bars ... in heatmap

2005-06-29 Thread maechler
Hi Kevin,

> "krc" == krc  <[EMAIL PROTECTED]>
> on Mon, 27 Jun 2005 21:55:37 +0200 (CEST) writes:

krc> Full_Name: Kevin R. Coombes
krc> Version: 2.1.0
krc> OS: Windows XP
krc> Submission from: (NULL) (143.111.224.169)


krc> When revC = TRUE and RowSideColors is set to a list of
krc> colors in heatmap, then the image and dendrogram are
krc> inverted, but the row-side color map does not
krc> change. The following script illustrates the problem.

krc> ##
krc> set.seed(1023)
krc> # generate columns of two different types
krc> d1 <- matrix(rnorm(100*6, rnorm(100, 0.5)), nrow=100, ncol=6, 
byrow=FALSE)
krc> d2 <- matrix(rnorm(100*4, rnorm(100, 0.5)), nrow=100, ncol=4, 
byrow=FALSE)
krc> # join them together
krc> dd <- cbind(d1, d2)
krc> # label them with different colors
krc> cols <- rep(c('blue', 'green'), times=c(6,4))

krc> # change the order of the columns and the matching labels
krc> # to show that reordering occurs in one case in heatmap
krc> col.order <- sample(10)
krc> dd <- dd[, col.order]
krc> cols <- cols[col.order]

krc> # compute the dendrogram to be used in the display
krc> hc <- hclust(dist(dd, 'euclid'))

a clustering of 100 observational units

krc> # get the correlation matrix
krc> m <- cor(dd)

a 10 x 10 matrix ; i.e. 10 row units and 10 column units.

Hence the following never works,
at least not for the heatmap() function as in ``standard R''.

krc> # this version works correctly
krc> heatmap(m, Rowv=as.dendrogram(hc), symm=TRUE, revC=FALSE, 
RowSideColors=cols)

gives immediately the obvious error

 Error in heatmap(m, Rowv =  :
 row dendrogram ordering gave index of wrong length

krc> #this version reverses the dendrogram and image, but not the colors
krc> heatmap(m, Rowv=as.dendrogram(hc), symm=TRUE, revC=TRUE,
krc> RowSideColors=cols)

so I wonder what you did want.

Regards,
Martin

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


[Rd] Viewing R objects in gdb

2005-06-29 Thread Duncan Murdoch
I'm trying to track down a bug in some experimental code, where an 
object's attribute is getting messed up.  This means I'd like to examine 
R objects while within gdb.

One of the things I'd like to do is to examine the names of all the 
attributes.  This is exactly what an example in the R Extensions manual 
section 4.11.2 "Inspecting R objects when debugging" does, but the code 
there doesn't work, presumably because the R internals have changed 
since it was written.

Specifically, I get

(gdb) p $a->u.listsxp.tagval->u.symsxp.pname->u.vecsxp.type.c
Error: There is no member named vecsxp.

where $a was set to be the attrib member of an SEXP.

Could someone let me know what needs to be fixed for this to work?  I 
imagine it's a typecast, but I haven't been able to put it together.

(An example using R_PV to print the attributes of an SEXP would also be 
welcome, but I can probably figure that one out once I get this...)

Duncan Murdoch

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


[Rd] Failed make (PR#7978)

2005-06-29 Thread kent
I downloaded R v2.1.1 earlier this morning to compile under Fedora Core 4. 
It compiled without incident, but 'make check' failed. Below is the relevant
part of its report. Is this a known problem? 

I used a locally compiled version of GCC v4.0.0 that reports

[EMAIL PROTECTED] R-2.1.1]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.0/configure --enable-languages=c,c++,f95,java
Thread model: posix
gcc version 4.0.0
[EMAIL PROTECTED] R-2.1.1]$

Kent Holsinger
[EMAIL PROTECTED]

make[3]: Entering directory `/home/kent/source-arc/R-2.1.1/tests'
running code in 'eval-etc.R' ... OK
comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ...2a3,157
> >   eval / parse / deparse / substitute  etc
> >
> > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
> > ##- Subject: Re: source() / eval() bug ??? (PR#96)
> > ##- Date: 20 Jan 1999 14:56:24 +0100
> > e1 <- parse(text='c(F=(f <- .3), "Tail area" = 2 * if(f < 1) 30 else 
> > 90)')[[1]]
> > e1
> c(F = (f <- 0.3), "Tail area" = 2 * if (f < 1) 30 else 90)
> > str(eval(e1))
>  Named num [1:2] 0.3 60
>  - attr(*, "names")= chr [1:2] "F" "Tail area"
> > mode(e1)
> [1] "call"
> >
> > ( e2 <- quote(c(a=1,b=2)) )
> c(a = 1, b = 2)
> > names(e2)[2] <- "a b c"
> > e2
> c("a b c" = 1, b = 2)
> > parse(text=deparse(e2))
> expression(c("a b c" = 1, b = 2))
> >
> > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
> > ##- Date: 22 Jan 1999 11:47
> >
> > ( e3 <- quote(c(F=1,"tail area"=pf(1,1,1))) )
> c(F = 1, "tail area" = pf(1, 1, 1))
> > eval(e3)
> F tail area
>   1.0   0.5
> > names(e3)
> [1] ""  "F" "tail area"
> >
> > names(e3)[2] <- "Variance ratio"
> > e3
> c("Variance ratio" = 1, "tail area" = pf(1, 1, 1))
> > eval(e3)
> Variance ratio  tail area
>1.00.5
> >
> >
> > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
> > ##- Date: 2 Sep 1999
> >
> > ## The first failed in 0.65.0 :
> > attach(list(x=1))
> > evalq(dim(x) <- 1,as.environment(2))
> > dput(get("x", env=as.environment(2)), control="all")
> structure(1, .Dim = as.integer(1))
> >
> > e <- local({x <- 1;environment()})
> > evalq(dim(x) <- 1,e)
> > dput(get("x",env=e), control="all")
> structure(1, .Dim = as.integer(1))
> >
> > ### Substitute, Eval, Parse, etc
> >
> > ## PR#3 : "..." matching
> > ## Revised March 7 2001 -pd
> > A <- function(x, y, ...) {
> + B <- function(a, b, ...) { match.call() }
> + B(x+y, ...)
> + }
> > (aa <- A(1,2,3))
> B(a = x + y, b = 3)
> > all.equal(as.list(aa),
> +   list(as.name("B"), a = expression(x+y)[[1]], b = 3))
> [1] TRUE
> > (a2 <- A(1,2, named = 3)) #A(1,2, named = 3)
> B(a = x + y, named = 3)
> > all.equal(as.list(a2),
> +   list(as.name("B"), a = expression(x+y)[[1]], named = 3))
> [1] TRUE
> >
> > CC <- function(...) match.call()
> > DD <- function(...) CC(...)
> > a3 <- DD(1,2,3)
> > all.equal(as.list(a3),
> +   list(as.name("CC"), 1, 2, 3))
> [1] TRUE
> >
> > ## More dots issues: March 19 2001 -pd
> > ## Didn't work up to and including 1.2.2
> >
> > f <- function(...) {
> + val <- match.call(expand.dots=F)$...
> + x <- val[[1]]
> + eval.parent(substitute(missing(x)))
> + }
> > g <- function(...) h(f(...))
> > h <- function(...) list(...)
> > k <- function(...) g(...)
> > X <- k(a=)
> > all.equal(X, list(TRUE))
> [1] TRUE
> >
> > ## Bug PR#24
> > f <- function(x,...) substitute(list(x,...))
> > deparse(f(a, b)) == "list(a, b)" &&
> + deparse(f(b, a)) == "list(b, a)" &&
> + deparse(f(x, y)) == "list(x, y)" &&
> + deparse(f(y, x)) == "list(y, x)"
> [1] TRUE
> >
> > tt <- function(x) { is.vector(x); deparse(substitute(x)) }
> > a <- list(b=3); tt(a$b) == "a$b" # tends to break when ...
> [1] TRUE
> >
> >
> > ## Parser:
> > 1 <
> + 2
> [1] TRUE
> > 2 <=
> + 3
> [1] TRUE
> > 4 >=
> + 3
> [1] TRUE
> > 3 >
> + 2
> [1] TRUE
> > 2 ==
> + 2
> [1] TRUE
> > ## bug till ...
> > 1 !=
> + 3
> [1] TRUE
> >
> > all(NULL == NULL)
> [1] TRUE
> >
> > ## PR #656 (related)
> > u <- runif(1);  length(find(".Random.seed")) == 1
> [1] TRUE
> >
> > MyVaR <<- "val";length(find("MyVaR")) == 1
> [1] TRUE
> > rm(MyVaR);  length(find("MyVaR")) == 0
> [1] TRUE
> >
> >
> > ## Martin Maechler: rare bad bug in sys.function() {or match.arg()} 
> > (PR#1409)
> > callme <- function(a = 1, mm = c("Abc", "Bde")) {
> + mm <- match.arg(mm); cat("mm = "); str(mm) ; invisible()
> + }
> > ## The first two were as desired:
> > callme()
> mm =  chr "Abc"
> > callme(mm="B")
> mm =  chr "Bde"
> > mycaller <- function(x = 1, callme = pi) { callme(x) }
> > mycaller()## wrongly gave `mm = NULL'  now = "Abc"
> mm =  chr "Abc"
make[3]: *** [eval-etc.Rout] Error 1
make[3]: Leaving directory `/home/kent/source-arc/R-2.1.1/tests'
make[2]: *** [test-Specific] Error 2
make[2]: Leaving directory `/home/kent/source-arc/R-2.1.1/tests'
make[1]: *** [test-all-basics] Error 1
make[1]: Leaving directory `/home/kent/source-arc/R-2.1.1/tests'
make: *** [check] Error 2


[Rd] Failed "make check" under Fedora Core 4 (PR#7979)

2005-06-29 Thread kent
I downloaded R v2.1.1 earlier this morning to compile under Fedora Core 
4. It compiled without incident, but 'make check' failed. Below is the 
relevant part of its report. Is this a known problem?

I used a locally compiled version of GCC v4.0.0 that reports

[EMAIL PROTECTED] R-2.1.1]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.0/configure --enable-languages=c,c++,f95,java
Thread model: posix
gcc version 4.0.0
[EMAIL PROTECTED] R-2.1.1]$

Kent Holsinger
[EMAIL PROTECTED]

make[3]: Entering directory `/home/kent/source-arc/R-2.1.1/tests'
running code in 'eval-etc.R' ... OK
comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ...2a3,157
 > >   eval / parse / deparse / substitute  etc
 > >
 > > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
 > > ##- Subject: Re: source() / eval() bug ??? (PR#96)
 > > ##- Date: 20 Jan 1999 14:56:24 +0100
 > > e1 <- parse(text='c(F=(f <- .3), "Tail area" = 2 * if(f < 1) 30 
else 90)')[[1]]
 > > e1
 > c(F = (f <- 0.3), "Tail area" = 2 * if (f < 1) 30 else 90)
 > > str(eval(e1))
 >  Named num [1:2] 0.3 60
 >  - attr(*, "names")= chr [1:2] "F" "Tail area"
 > > mode(e1)
 > [1] "call"
 > >
 > > ( e2 <- quote(c(a=1,b=2)) )
 > c(a = 1, b = 2)
 > > names(e2)[2] <- "a b c"
 > > e2
 > c("a b c" = 1, b = 2)
 > > parse(text=deparse(e2))
 > expression(c("a b c" = 1, b = 2))
 > >
 > > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
 > > ##- Date: 22 Jan 1999 11:47
 > >
 > > ( e3 <- quote(c(F=1,"tail area"=pf(1,1,1))) )
 > c(F = 1, "tail area" = pf(1, 1, 1))
 > > eval(e3)
 > F tail area
 >   1.0   0.5
 > > names(e3)
 > [1] ""  "F" "tail area"
 > >
 > > names(e3)[2] <- "Variance ratio"
 > > e3
 > c("Variance ratio" = 1, "tail area" = pf(1, 1, 1))
 > > eval(e3)
 > Variance ratio  tail area
 >1.00.5
 > >
 > >
 > > ##- From: Peter Dalgaard BSA <[EMAIL PROTECTED]>
 > > ##- Date: 2 Sep 1999
 > >
 > > ## The first failed in 0.65.0 :
 > > attach(list(x=1))
 > > evalq(dim(x) <- 1,as.environment(2))
 > > dput(get("x", env=as.environment(2)), control="all")
 > structure(1, .Dim = as.integer(1))
 > >
 > > e <- local({x <- 1;environment()})
 > > evalq(dim(x) <- 1,e)
 > > dput(get("x",env=e), control="all")
 > structure(1, .Dim = as.integer(1))
 > >
 > > ### Substitute, Eval, Parse, etc
 > >
 > > ## PR#3 : "..." matching
 > > ## Revised March 7 2001 -pd
 > > A <- function(x, y, ...) {
 > + B <- function(a, b, ...) { match.call() }
 > + B(x+y, ...)
 > + }
 > > (aa <- A(1,2,3))
 > B(a = x + y, b = 3)
 > > all.equal(as.list(aa),
 > +   list(as.name("B"), a = expression(x+y)[[1]], b = 3))
 > [1] TRUE
 > > (a2 <- A(1,2, named = 3)) #A(1,2, named = 3)
 > B(a = x + y, named = 3)
 > > all.equal(as.list(a2),
 > +   list(as.name("B"), a = expression(x+y)[[1]], named = 3))
 > [1] TRUE
 > >
 > > CC <- function(...) match.call()
 > > DD <- function(...) CC(...)
 > > a3 <- DD(1,2,3)
 > > all.equal(as.list(a3),
 > +   list(as.name("CC"), 1, 2, 3))
 > [1] TRUE
 > >
 > > ## More dots issues: March 19 2001 -pd
 > > ## Didn't work up to and including 1.2.2
 > >
 > > f <- function(...) {
 > + val <- match.call(expand.dots=F)$...
 > + x <- val[[1]]
 > + eval.parent(substitute(missing(x)))
 > + }
 > > g <- function(...) h(f(...))
 > > h <- function(...) list(...)
 > > k <- function(...) g(...)
 > > X <- k(a=)
 > > all.equal(X, list(TRUE))
 > [1] TRUE
 > >
 > > ## Bug PR#24
 > > f <- function(x,...) substitute(list(x,...))
 > > deparse(f(a, b)) == "list(a, b)" &&
 > + deparse(f(b, a)) == "list(b, a)" &&
 > + deparse(f(x, y)) == "list(x, y)" &&
 > + deparse(f(y, x)) == "list(y, x)"
 > [1] TRUE
 > >
 > > tt <- function(x) { is.vector(x); deparse(substitute(x)) }
 > > a <- list(b=3); tt(a$b) == "a$b" # tends to break when ...
 > [1] TRUE
 > >
 > >
 > > ## Parser:
 > > 1 <
 > + 2
 > [1] TRUE
 > > 2 <=
 > + 3
 > [1] TRUE
 > > 4 >=
 > + 3
 > [1] TRUE
 > > 3 >
 > + 2
 > [1] TRUE
 > > 2 ==
 > + 2
 > [1] TRUE
 > > ## bug till ...
 > > 1 !=
 > + 3
 > [1] TRUE
 > >
 > > all(NULL == NULL)
 > [1] TRUE
 > >
 > > ## PR #656 (related)
 > > u <- runif(1);  length(find(".Random.seed")) == 1
 > [1] TRUE
 > >
 > > MyVaR <<- "val";length(find("MyVaR")) == 1
 > [1] TRUE
 > > rm(MyVaR);  length(find("MyVaR")) == 0
 > [1] TRUE
 > >
 > >
 > > ## Martin Maechler: rare bad bug in sys.function() {or match.arg()} 
(PR#1409)
 > > callme <- function(a = 1, mm = c("Abc", "Bde")) {
 > + mm <- match.arg(mm); cat("mm = "); str(mm) ; invisible()
 > + }
 > > ## The first two were as desired:
 > > callme()
 > mm =  chr "Abc"
 > > callme(mm="B")
 > mm =  chr "Bde"
 > > mycaller <- function(x = 1, callme = pi) { callme(x) }
 > > mycaller()## wrongly gave `mm = NULL'  now = "Abc"
 > mm =  chr "Abc"
make[3]: *** [eval-etc.Rout] Error 1
make[3]: Leaving directory `/home/kent/source-arc/R-2.1.1/tests'
make[2]: *** [test-Specific] Error 2
make[2]: Leaving directory `/home/kent/source-arc

Re: [Rd] Failed make (PR#7978)

2005-06-29 Thread Simon Urbanek
On Jun 29, 2005, at 1:52 PM, [EMAIL PROTECTED] wrote:

> I downloaded R v2.1.1 earlier this morning to compile under Fedora  
> Core 4.
> It compiled without incident, but 'make check' failed. Below is the  
> relevant
> part of its report. Is this a known problem?

My guess is that you're using gfortran instead of g77 and you didn't  
set GFORTRAN_STDIN_UNIT to -1 nor used FLIBS to force static fortran  
libraries - please see B.5.1. "Using gfortran" in "R Installation and  
Administration".

Cheers,
Simon

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


Re: [Rd] Viewing R objects in gdb

2005-06-29 Thread Luke Tierney
On Wed, 29 Jun 2005, Duncan Murdoch wrote:

> I'm trying to track down a bug in some experimental code, where an
> object's attribute is getting messed up.  This means I'd like to examine
> R objects while within gdb.
>
> One of the things I'd like to do is to examine the names of all the
> attributes.  This is exactly what an example in the R Extensions manual
> section 4.11.2 "Inspecting R objects when debugging" does, but the code
> there doesn't work, presumably because the R internals have changed
> since it was written.
>
> Specifically, I get
>
> (gdb) p $a->u.listsxp.tagval->u.symsxp.pname->u.vecsxp.type.c
> Error: There is no member named vecsxp.
>

Something like this I think (untested):

 p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp.type.c

luke

> where $a was set to be the attrib member of an SEXP.
>
> Could someone let me know what needs to be fixed for this to work?  I
> imagine it's a typecast, but I haven't been able to put it together.
>
> (An example using R_PV to print the attributes of an SEXP would also be
> welcome, but I can probably figure that one out once I get this...)
>
> Duncan Murdoch
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
Actuarial Science
241 Schaeffer Hall  email:  [EMAIL PROTECTED]
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu

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


Re: [Rd] Failed make (PR#7978)

2005-06-29 Thread ripley
On Wed, 29 Jun 2005, Simon Urbanek wrote:

> On Jun 29, 2005, at 1:52 PM, [EMAIL PROTECTED] wrote:
>
>> I downloaded R v2.1.1 earlier this morning to compile under Fedora
>> Core 4.
>> It compiled without incident, but 'make check' failed. Below is the
>> relevant
>> part of its report. Is this a known problem?
>
> My guess is that you're using gfortran instead of g77 and you didn't
> set GFORTRAN_STDIN_UNIT to -1 nor used FLIBS to force static fortran
> libraries - please see B.5.1. "Using gfortran" in "R Installation and
> Administration".

That is a known problem with vanilla gcc-4.0.0 but not with the version in 
FC4.  I do wonder why anyone would replace a patched compiler with an 
known buggy one.  At least use the latest release candidate of 4.0.1 if 
you insist on using gcc4.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] Viewing R objects in gdb

2005-06-29 Thread Duncan Murdoch
On 6/29/2005 2:06 PM, Luke Tierney wrote:
> On Wed, 29 Jun 2005, Duncan Murdoch wrote:
> 
>> I'm trying to track down a bug in some experimental code, where an
>> object's attribute is getting messed up.  This means I'd like to examine
>> R objects while within gdb.
>>
>> One of the things I'd like to do is to examine the names of all the
>> attributes.  This is exactly what an example in the R Extensions manual
>> section 4.11.2 "Inspecting R objects when debugging" does, but the code
>> there doesn't work, presumably because the R internals have changed
>> since it was written.
>>
>> Specifically, I get
>>
>> (gdb) p $a->u.listsxp.tagval->u.symsxp.pname->u.vecsxp.type.c
>> Error: There is no member named vecsxp.
>>
> 
> Something like this I think (untested):
> 
>  p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp.type.c

That gets the typecast right, but now I have the problem that currently 
vecsxp doesn't have a type member:

(gdb) p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp.type.c
Error: There is no member named type.

(gdb) p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp
$1 = {length = 5, truelength = 6957219}

I guess I need to write a function that uses the macros to extract the 
data (since gdb doesn't see the macros).  Or do we already have one?

Duncan Murdoch

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


Re: [Rd] Objects and regex (PR#7970)

2005-06-29 Thread Rafal Kustra
No bug, mystery solved. My fault.

I got 'generateSigma' when trying to match for "^genes?" not "^genes?$".

I keep forgetting '?' stands for '0 or more of prec. char' not for
'any char' as in shell.

best,
rafal



---



On 26 Jun 2005 20:21:58 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> 
> > Full_Name: Rafal Kustra
> > Version: 2.1.0
> > OS: Linux
> > Submission from: (NULL) (64.229.198.89)
> >
> >
> > objects(pattern="^genes?$") returns "generateSigma" among other legal 
> > things.
> 
> Not on my 2.1.1:
> 
> > generateSigma <-1
> > objects(pattern="^genes?$")
> character(0)
> > objects(pattern="^genes?")
> [1] "generateSigma"
> 
> So. on what system did this happen?
> 
> --
>O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
> ~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907
>

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


Re: [Rd] Viewing R objects in gdb

2005-06-29 Thread Luke Tierney
On Wed, 29 Jun 2005, Duncan Murdoch wrote:

> On 6/29/2005 2:06 PM, Luke Tierney wrote:
>> On Wed, 29 Jun 2005, Duncan Murdoch wrote:
>> 
>>> I'm trying to track down a bug in some experimental code, where an
>>> object's attribute is getting messed up.  This means I'd like to examine
>>> R objects while within gdb.
>>> 
>>> One of the things I'd like to do is to examine the names of all the
>>> attributes.  This is exactly what an example in the R Extensions manual
>>> section 4.11.2 "Inspecting R objects when debugging" does, but the code
>>> there doesn't work, presumably because the R internals have changed
>>> since it was written.
>>> 
>>> Specifically, I get
>>> 
>>> (gdb) p $a->u.listsxp.tagval->u.symsxp.pname->u.vecsxp.type.c
>>> Error: There is no member named vecsxp.
>>> 
>> 
>> Something like this I think (untested):
>>
>>  p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp.type.c
>
> That gets the typecast right, but now I have the problem that currently 
> vecsxp doesn't have a type member:
>
> (gdb) p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp.type.c
> Error: There is no member named type.
>
> (gdb) p ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->vecsxp
> $1 = {length = 5, truelength = 6957219}
>
> I guess I need to write a function that uses the macros to extract the data 
> (since gdb doesn't see the macros).  Or do we already have one?

The type fiels it in the sxpinfo part of the header; I think either

   ((VECSEXP)$a->u.listsxp.tagval->u.symsxp.pname)->sxpinfo.type

or

   $a->u.listsxp.tagval->u.symsxp.pname->sxpinfo.type

will give you that.

It is probably possible to do something like write a file of gdb
macros, run the C pre-processor over it to get the expnansions, and
load that into gdb. Not that I've tried...

luke

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
Actuarial Science
241 Schaeffer Hall  email:  [EMAIL PROTECTED]
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu

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


[Rd] write.csv suggestion

2005-06-29 Thread McGehee, Robert
Hello all, 
I had some trouble recently with write.csv because I couldn't change one
of the default options. A quick view of the code showed that the
function was not defined in the most optimal way.

Currently,
write.csv <- function (..., col.names = NA, sep = ",", qmethod =
"double") 
write.table(..., col.names = NA, sep = ",", qmethod = "double")

Thus, the options passed along to write.csv are ignored by the function
(unless in the ...).

Perhaps a better way to define the function is as such (similar to
read.csv):

write.csv <- function (..., col.names = NA, sep = ",", qmethod =
"double") 
write.table(..., col.names = col.names, sep = sep, qmethod =
qmethod)

The same also applies to write.csv2

Best,
Robert


> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor1.1
year 2005   
month06 
day  20 
language R

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


Re: [Rd] write.csv suggestion

2005-06-29 Thread Prof Brian Ripley
The help page says

  By default there is no column name for a column of row names.  If
  'col.names = NA' and 'row.names = TRUE' a blank column name is
  added.  This can be used to write CSV files for input to
  spreadsheets.  'write.csv' and 'write.csv2' provide convenience
  wrappers for doing so.

and they are set up to disallow the options they set to be changed.

If you get the option wrong to read a file, you will know soon enough, but 
these are to ensure a suitable CSV file gets written (which will not be so
immediately apparent).

Please define `optimal': doing what it was designed for and is documented 
to do is according to you not `optimal'.

Why would anyone want to use write.csv to write files with something other 
than a comma/semicolon as separator, rather than use write.table?


On Wed, 29 Jun 2005, McGehee, Robert wrote:

> Hello all,
> I had some trouble recently with write.csv because I couldn't change one
> of the default options. A quick view of the code showed that the
> function was not defined in the most optimal way.
>
> Currently,
> write.csv <- function (..., col.names = NA, sep = ",", qmethod =
> "double")
>   write.table(..., col.names = NA, sep = ",", qmethod = "double")
>
> Thus, the options passed along to write.csv are ignored by the function
> (unless in the ...).
>
> Perhaps a better way to define the function is as such (similar to
> read.csv):
>
> write.csv <- function (..., col.names = NA, sep = ",", qmethod =
> "double")
>   write.table(..., col.names = col.names, sep = sep, qmethod =
> qmethod)
>
> The same also applies to write.csv2
>
> Best,
> Robert
>
>
>> version
> _
> platform i386-pc-mingw32
> arch i386
> os   mingw32
> system   i386, mingw32
> status
> major2
> minor1.1
> year 2005
> month06
> day  20
> language R
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] write.csv suggestion

2005-06-29 Thread McGehee, Robert
I didn't want to use a different separator, I wanted to remove
row.names, as in this example:

> data(USArrests)
> write.csv(USArrests, file = "~/test.csv", row.names = FALSE, col.names
= TRUE)
Error in if (col.names) d[[2]] else NULL : 
missing value where TRUE/FALSE needed

I only mentioned this suggestion because the above syntax seemed
reasonable (and self-documenting), but by making the options
unchangeable, I received an unhelpful error message.

After checking the code, I rewrote the line to this:
> write.table(USArrests, file = "~/test.csv", sep = ",", row.names =
FALSE, col.names = TRUE)

This only seemed suboptimal (to me) because one would have to read the
code to know that the col.names = TRUE option was not being passed along
to write.table (as I expected).

Best,
Robert

-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 29, 2005 4:16 PM
To: McGehee, Robert
Cc: r-devel@stat.math.ethz.ch
Subject: Re: [Rd] write.csv suggestion


The help page says

  By default there is no column name for a column of row names.  If
  'col.names = NA' and 'row.names = TRUE' a blank column name is
  added.  This can be used to write CSV files for input to
  spreadsheets.  'write.csv' and 'write.csv2' provide convenience
  wrappers for doing so.

and they are set up to disallow the options they set to be changed.

If you get the option wrong to read a file, you will know soon enough,
but 
these are to ensure a suitable CSV file gets written (which will not be
so
immediately apparent).

Please define `optimal': doing what it was designed for and is
documented 
to do is according to you not `optimal'.

Why would anyone want to use write.csv to write files with something
other 
than a comma/semicolon as separator, rather than use write.table?


On Wed, 29 Jun 2005, McGehee, Robert wrote:

> Hello all,
> I had some trouble recently with write.csv because I couldn't change
one
> of the default options. A quick view of the code showed that the
> function was not defined in the most optimal way.
>
> Currently,
> write.csv <- function (..., col.names = NA, sep = ",", qmethod =
> "double")
>   write.table(..., col.names = NA, sep = ",", qmethod = "double")
>
> Thus, the options passed along to write.csv are ignored by the
function
> (unless in the ...).
>
> Perhaps a better way to define the function is as such (similar to
> read.csv):
>
> write.csv <- function (..., col.names = NA, sep = ",", qmethod =
> "double")
>   write.table(..., col.names = col.names, sep = sep, qmethod =
> qmethod)
>
> The same also applies to write.csv2
>
> Best,
> Robert
>
>
>> version
> _
> platform i386-pc-mingw32
> arch i386
> os   mingw32
> system   i386, mingw32
> status
> major2
> minor1.1
> year 2005
> month06
> day  20
> language R
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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