Re: [Rd] docu buglet

2005-02-14 Thread Prof Brian Ripley
On Sun, 13 Feb 2005, Kjetil Brinchmann Halvorsen wrote:
The help page groupGeneric {base}  refers (Math group)
the defunct |tetragamma|, |pentagamma while the newer
psigamma is not mentioned.
Thanks.
psigamma is not in the Math group generic, despite its help page (it 
cannot be: it is a function of two arguments) and indeed is not generic.

Technically tetragamma etc still are internally group generic, as although 
their R wrappers has been removed they can still be called via .Internal. 
We will tidy this up for 2.1.0.

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


Re: [Rd] formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread Prof Brian Ripley
We'll fix this, but you might like to note that sprintf is more
bulletproof and as from 2.1.0-to-be, a lot more tolerant, e.g.
sprintf(%s, 1)
works there and in 2.0.1 gives a useful error message.
On Fri, 11 Feb 2005 [EMAIL PROTECTED] wrote:
Full_Name: Peter Ehlers
Version: rw2001pat (2005-02-03)
OS: Win XP
Submission from: (NULL) (136.159.61.115)
formatC(1, flag=s) crashes Rgui.
Similarly for flag=[SnZ].
Stupid input, of course, but I'm error-prone.
--
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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] sprintf - was formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread Wolfgang Huber
Dear Prof. Ripley,
Would it be possible to make sprintf accept vector arguments?
I.e. allow expressions like
  sprintf(%04d, 1:3)
to produce something like what currently needs to be done via
  sapply(1:3, function(i) sprintf(%04d,i))
  Best wishes
  Wolfgang
-
Wolfgang Huber
European Bioinformatics Institute
European Molecular Biology Laboratory
Cambridge CB10 1SD
England
Phone: +44 1223 494642
Fax:   +44 1223 494486
Http:  www.ebi.ac.uk/huber
-
Prof Brian Ripley wrote:
We'll fix this, but you might like to note that sprintf is more
bulletproof and as from 2.1.0-to-be, a lot more tolerant, e.g.
sprintf(%s, 1)
works there and in 2.0.1 gives a useful error message.
On Fri, 11 Feb 2005 [EMAIL PROTECTED] wrote:
Full_Name: Peter Ehlers
Version: rw2001pat (2005-02-03)
OS: Win XP
Submission from: (NULL) (136.159.61.115)
formatC(1, flag=s) crashes Rgui.
Similarly for flag=[SnZ].
Stupid input, of course, but I'm error-prone.
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Gregor GORJANC
Hello Uwe.
Thanks for the response. I was searching in bug repository for something 
else and found that wish. Hoewever I tried to do a search for that, so I 
would not bother R-devel team. I was not successfull in finding any 
meaningfull comments on legend in

http://developer.r-project.org/R.svnlog.2005
You are right with NEWS file in R-devel. It really documents this 
improvement. Very nice. You guys really do an excellent job. I did not 
looked in NEWS file since it is kind of hidden i.e. one needs to download 
the R-devel and look in that file. But I confes, it is my blame, not of 
R-devel folk. However I think, that it would be nice that link to NEWS file 
would be accessible directly from R websites. I wrote few lines of HTML 
code that could be added to CRAN webpages for this. I hope r-team or CRAN 
maintainers will find this usefull.

Look files:
* A replacement for http://cran.at.r-project.org/sources.html. I added link 
to last R-devel and R-patched archives and to corresponding NEWS files. 
However there are now no NEWS files at 
ftp://ftp.stat.math.ethz.ch/Software/R. I suggest that NEWS files for last 
R-devel and R-patched should be there, but since there are two, they could 
be named NEWS-devel and NEWS-patched or something alike. Maybe one could 
even divide directories ro R-devel and R-pacthed.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/sources.html
* A replacement for http://cran.at.r-project.org/banner.shtml. I added the 
same as above.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/banner.shtml
Uwe Ligges wrote:
Gorjanc Gregor wrote:
Hello!
I was loooking in R-bugs and found under wishlist-fullfilled wish for 
smart placement of a legend. This has already been done in package
gplots in function smartlegend.

One question. This bug-report is under wishlist-fullfilled. Is it 
really
fullfilled? 

Yes, in the current developer release (AKA R-devel, to be R-2.1.0), as 
you can easily see in the correpsonding NEWS file and the svn logs.

Why do you follow up into the bug repository?
Uwe Ligges

Mail from Elizabeth
---
It would be nice if legend had the option of some default locations 
you could
choose instead of entering specific coordinates, like topleft,
topright,topcenter, etc. based on par(usr) coordinates. I know 
I've wanted
it so often I've made my own simple non-robust wrap-around, so I don't 
have to
remember or parse the xjust and yjust options necessary to make it 
work. Of
course there should be the option of entering in your own coordinates.
Also it would be nice to be able to put a optional title inside your 
legend.
Currently I just make my title the first value in my legend vector, 
and then fix
the other options so no symbols plot next to it. But this isn't always 
a pretty
result and can be a pain if your symbols are complicated.

Thanks,
Elizabeth
Response to Elizabeth by Duncan Murdoch
---
--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentemail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentmail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] sprintf - was formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Wolfgang Huber wrote:
Dear Prof. Ripley,
Would it be possible to make sprintf accept vector arguments?
I.e. allow expressions like
 sprintf(%04d, 1:3)
to produce something like what currently needs to be done via
 sapply(1:3, function(i) sprintf(%04d,i))
I have thought about this, but it is not really clear what the right thing 
would be here with multiple arguments.  What should

sprintf((%04d %s, 1:3, abc)
do?  Produce a character vector of length 1 or 3?  If of length 1,
0001 0002 0003 abc or 0001 2 0003 abc?
I guess the most R-like thing would be to recycle args to the length of 
the longest and then use them in parallel, but that can be done fairly 
easily by *apply.

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


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Gregor GORJANC wrote:
Hello Uwe.
Thanks for the response. I was searching in bug repository for something else 
and found that wish. Hoewever I tried to do a search for that, so I would not 
bother R-devel team. I was not successfull in finding any meaningfull 
comments on legend in

http://developer.r-project.org/R.svnlog.2005
You are right with NEWS file in R-devel. It really documents this 
improvement. Very nice. You guys really do an excellent job. I did not looked 
in NEWS file since it is kind of hidden i.e. one needs to download the 
R-devel and look in that file. But I confes, it is my blame, not of R-devel
It is accessible at
https://svn.r-project.org/R/trunk/NEWS
folk. However I think, that it would be nice that link to NEWS file would be 
accessible directly from R websites. I wrote few lines of HTML code that 
could be added to CRAN webpages for this. I hope r-team or CRAN maintainers 
will find this usefull.

Look files:
* A replacement for http://cran.at.r-project.org/sources.html. I added link 
to last R-devel and R-patched archives and to corresponding NEWS files. 
However there are now no NEWS files at 
ftp://ftp.stat.math.ethz.ch/Software/R. I suggest that NEWS files for last 
R-devel and R-patched should be there, but since there are two, they could be 
named NEWS-devel and NEWS-patched or something alike.
All the information in R-patched should also be in R-devel: it has a 
section on 2.0.1 patched.

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


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Uwe Ligges
Gregor GORJANC wrote:
Hello Uwe.
Thanks for the response. I was searching in bug repository for something 
else and found that wish. Hoewever I tried to do a search for that, so I 
would not bother R-devel team. I was not successfull in finding any 
meaningfull comments on legend in

http://developer.r-project.org/R.svnlog.2005
Right, because it was done last year:
http://developer.r-project.org/R.svnlog.2004
has (among other legend related entries):

r32089 | murdoch | 2004-12-02 17:17:43 -0500 (Thu, 02 Dec 2004) | 1 line
Changed paths:
   M /trunk/NEWS
   M /trunk/src/library/graphics/R/legend.R
   M /trunk/src/library/graphics/man/legend.Rd
legend() enhancements from PR#7400

You are right with NEWS file in R-devel. It really documents this 
improvement. Very nice. You guys really do an excellent job. I did not 
looked in NEWS file since it is kind of hidden i.e. one needs to 
download the R-devel and look in that file. But I confes, it is my 
blame, not of R-devel folk. However I think, that it would be nice that 
link to NEWS file would be accessible directly from R websites. I wrote 
few lines of HTML code that could be added to CRAN webpages for this. I 
hope r-team or CRAN maintainers will find this usefull.

The file is much more easily available via SVN:
https://svn.r-project.org/R/trunk/NEWS
Uwe Ligges


Look files:
* A replacement for http://cran.at.r-project.org/sources.html. I added 
link to last R-devel and R-patched archives and to corresponding NEWS 
files. However there are now no NEWS files at 
ftp://ftp.stat.math.ethz.ch/Software/R. I suggest that NEWS files for 
last R-devel and R-patched should be there, but since there are two, 
they could be named NEWS-devel and NEWS-patched or something alike. 
Maybe one could even divide directories ro R-devel and R-pacthed.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/sources.html
* A replacement for http://cran.at.r-project.org/banner.shtml. I added 
the same as above.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/banner.shtml
Uwe Ligges wrote:
Gorjanc Gregor wrote:
Hello!
I was loooking in R-bugs and found under wishlist-fullfilled wish for 
smart placement of a legend. This has already been done in package
gplots in function smartlegend.

One question. This bug-report is under wishlist-fullfilled. Is it 
really
fullfilled? 

Yes, in the current developer release (AKA R-devel, to be R-2.1.0), as 
you can easily see in the correpsonding NEWS file and the svn logs.

Why do you follow up into the bug repository?
Uwe Ligges

Mail from Elizabeth
---
It would be nice if legend had the option of some default locations 
you could
choose instead of entering specific coordinates, like topleft,
topright,topcenter, etc. based on par(usr) coordinates. I know 
I've wanted
it so often I've made my own simple non-robust wrap-around, so I 
don't have to
remember or parse the xjust and yjust options necessary to make it 
work. Of
course there should be the option of entering in your own coordinates.
Also it would be nice to be able to put a optional title inside your 
legend.
Currently I just make my title the first value in my legend vector, 
and then fix
the other options so no symbols plot next to it. But this isn't 
always a pretty
result and can be a pain if your symbols are complicated.

Thanks,
Elizabeth
Response to Elizabeth by Duncan Murdoch
---
--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentemail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



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


Re: [Rd] formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread P Ehlers
Thanks. And good advice.
Peter
Prof Brian Ripley wrote:
We'll fix this, but you might like to note that sprintf is more
bulletproof and as from 2.1.0-to-be, a lot more tolerant, e.g.
sprintf(%s, 1)
works there and in 2.0.1 gives a useful error message.
On Fri, 11 Feb 2005 [EMAIL PROTECTED] wrote:
Full_Name: Peter Ehlers
Version: rw2001pat (2005-02-03)
OS: Win XP
Submission from: (NULL) (136.159.61.115)
formatC(1, flag=s) crashes Rgui.
Similarly for flag=[SnZ].
Stupid input, of course, but I'm error-prone.

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


Re: [Rd] sprintf - was formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread Wolfgang Huber
Prof Brian Ripley wrote:
On Mon, 14 Feb 2005, Wolfgang Huber wrote:
Dear Prof. Ripley,
Would it be possible to make sprintf accept vector arguments?
I.e. allow expressions like
 sprintf(%04d, 1:3)
to produce something like what currently needs to be done via
 sapply(1:3, function(i) sprintf(%04d,i))

I have thought about this, but it is not really clear what the right 
thing would be here with multiple arguments.  What should

sprintf((%04d %s, 1:3, abc)
do?  Produce a character vector of length 1 or 3?  If of length 1,
0001 0002 0003 abc or 0001 2 0003 abc?
I guess the most R-like thing would be to recycle args to the length of 
the longest and then use them in parallel, but that can be done fairly 
easily by *apply.
Personally, I would prefer the recycling, but of course it can be also 
done this way:

 mapply(sprintf, %04d %s, 1:3, abc)
   %04d %s   NA   NA
0001 abc 0002 abc 0003 abc
the only slightly unaesthetic thing being the names of the resulting vector.
--
Best regards
  Wolfgang
-
Wolfgang Huber
European Bioinformatics Institute
European Molecular Biology Laboratory
Cambridge CB10 1SD
England
Phone: +44 1223 494642
Fax:   +44 1223 494486
Http:  www.ebi.ac.uk/huber
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)

2005-02-14 Thread Gregor GORJANC
Hello!
Prof Brian Ripley wrote:
You did create a corrupt data frame by using *replacement* on part of 
something that did not exist.  The simple workaround is not to do that. 
One can argue about what should happen in such a case and currently R 
assumes that you know what you are doing and will only treat the data 
frame as a list. We could make this an error, but that would add an 
overhead to be paid by careful users too.
I agree to some extent, however I was very surprised of this behaviour. I 
often deal with data that have missing values and now I really do not know 
how to manage such data. How can one add a column to existing data frame
in such a way, that you don't get corrupted data frames as in my example?

(tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D
  y1 f1
1  1  A
2  2  B
3  3  C
4  4  D
# Add new column, which is not full (missing some data for last
# records)
tmp[1:2, y2] - 2
tmp
 y1 f1   y2
1  1  A2
2  2  B2
3  3  C NA
4  4  D NA
Warning message:
corrupt data frame: columns will be truncated or padded with NAs
in: format.data.frame(x, digits = digits)
I hope that this is not the best solution:
tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp$y2 - NA
tmp[1:2, y2] - 2
tmp
If you really want to understand what is going on here, please read the 
source code: R is a volunteer project and the volunteers do not have 
time to explain each and every one of your error messages to you -- we 
have already had several goes over including data frames in data frames.
I try to and I hope I did not take to much of your time.
[... removed the rest ...]
--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentmail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Gregor GORJANC
I added link to https://svn.r-project.org/R/trunk/NEWS in files
http://www.bfro.uni-lj.si/MR/ggorjan/sources.html
http://www.bfro.uni-lj.si/MR/ggorjan/banner.shtml
Uwe Ligges wrote:
Gregor GORJANC wrote:
Hello Uwe.
Thanks for the response. I was searching in bug repository for 
something else and found that wish. Hoewever I tried to do a search 
for that, so I would not bother R-devel team. I was not successfull in 
finding any meaningfull comments on legend in

http://developer.r-project.org/R.svnlog.2005

Right, because it was done last year:
http://developer.r-project.org/R.svnlog.2004
has (among other legend related entries):

r32089 | murdoch | 2004-12-02 17:17:43 -0500 (Thu, 02 Dec 2004) | 1 line
Changed paths:
   M /trunk/NEWS
   M /trunk/src/library/graphics/R/legend.R
   M /trunk/src/library/graphics/man/legend.Rd
legend() enhancements from PR#7400

You are right with NEWS file in R-devel. It really documents this 
improvement. Very nice. You guys really do an excellent job. I did not 
looked in NEWS file since it is kind of hidden i.e. one needs to 
download the R-devel and look in that file. But I confes, it is my 
blame, not of R-devel folk. However I think, that it would be nice 
that link to NEWS file would be accessible directly from R websites. I 
wrote few lines of HTML code that could be added to CRAN webpages for 
this. I hope r-team or CRAN maintainers will find this usefull.

The file is much more easily available via SVN:
https://svn.r-project.org/R/trunk/NEWS
Uwe Ligges


Look files:
* A replacement for http://cran.at.r-project.org/sources.html. I added 
link to last R-devel and R-patched archives and to corresponding NEWS 
files. However there are now no NEWS files at 
ftp://ftp.stat.math.ethz.ch/Software/R. I suggest that NEWS files for 
last R-devel and R-patched should be there, but since there are two, 
they could be named NEWS-devel and NEWS-patched or something alike. 
Maybe one could even divide directories ro R-devel and R-pacthed.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/sources.html
* A replacement for http://cran.at.r-project.org/banner.shtml. I added 
the same as above.

File is available at:
http://www.bfro.uni-lj.si/MR/ggorjan/banner.shtml
Uwe Ligges wrote:
Gorjanc Gregor wrote:
Hello!
I was loooking in R-bugs and found under wishlist-fullfilled wish 
for smart placement of a legend. This has already been done in 
package
gplots in function smartlegend.

One question. This bug-report is under wishlist-fullfilled. Is it 
really
fullfilled? 


Yes, in the current developer release (AKA R-devel, to be R-2.1.0), 
as you can easily see in the correpsonding NEWS file and the svn logs.

Why do you follow up into the bug repository?
Uwe Ligges

Mail from Elizabeth
---
It would be nice if legend had the option of some default locations 
you could
choose instead of entering specific coordinates, like topleft,
topright,topcenter, etc. based on par(usr) coordinates. I know 
I've wanted
it so often I've made my own simple non-robust wrap-around, so I 
don't have to
remember or parse the xjust and yjust options necessary to make it 
work. Of
course there should be the option of entering in your own coordinates.
Also it would be nice to be able to put a optional title inside your 
legend.
Currently I just make my title the first value in my legend vector, 
and then fix
the other options so no symbols plot next to it. But this isn't 
always a pretty
result and can be a pain if your symbols are complicated.

Thanks,
Elizabeth
Response to Elizabeth by Duncan Murdoch
---
--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentemail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel





--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentmail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Prof Brian Ripley wrote:
On Mon, 14 Feb 2005, Gregor GORJANC wrote:

You are right with NEWS file in R-devel. It really documents this 
improvement. Very nice. You guys really do an excellent job. I did not 
looked in NEWS file since it is kind of hidden i.e. one needs to download 
the R-devel and look in that file. But I confes, it is my blame, not of 
R-devel
It is accessible at
https://svn.r-project.org/R/trunk/NEWS
and I have now linked that off the developer page (but it will not become 
visible until that gets its daily update).

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


Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Gregor GORJANC wrote:
Prof Brian Ripley wrote:

You did create a corrupt data frame by using *replacement* on part of 
something that did not exist.  The simple workaround is not to do that. One 
can argue about what should happen in such a case and currently R assumes 
that you know what you are doing and will only treat the data frame as a 
list. We could make this an error, but that would add an overhead to be 
paid by careful users too.

I agree to some extent, however I was very surprised of this behaviour. I 
often deal with data that have missing values and now I really do not know 
how to manage such data. How can one add a column to existing data frame
in such a way, that you don't get corrupted data frames as in my example?
You add a column, not replace part of a non-existent column.  Isn't that 
obvious, given what you wrote?

There is a lot of basic documentation on data manipulation in R/S, and a 
whole chapter in MASS4.  Somehow most other people don't seem to find this 
a problem.

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


Re: [Rd] Wishlist: simple legend options (PR#7400)

2005-02-14 Thread Friedrich . Leisch
 On Mon, 14 Feb 2005 12:28:20 +0100,
 Gregor GORJANC (GG) wrote:

   I added link to https://svn.r-project.org/R/trunk/NEWS in files
   http://www.bfro.uni-lj.si/MR/ggorjan/sources.html
   http://www.bfro.uni-lj.si/MR/ggorjan/banner.shtml

Thanks, I have copied those to CRAN with only minor modifications.

Best,
Fritz

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


Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)

2005-02-14 Thread Gregor GORJANC
Hello!
Sending this also to r-help so anyone can read it also there and maybe also 
help me with my puzzle if this trivial and I don't see it.

Prof Brian Ripley wrote:
[... removed some ...]
You add a column, not replace part of a non-existent column.  Isn't that 
obvious, given what you wrote?
# OK. If I do
tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp[1:2, y2] - 2
tmp
# I am changing nonexistent column y2 in data frame tmp.
# If I do
tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp$y2 - NA
tmp[1:2, y2] - 2
tmp
# I am changing existent column. I understand now the difference. However,
# it is weird for me that this is OK (if column y2 does not yet exist)
tmp[y2] - 2
# but this is not
tmp[1:2, y2] - 2
There is a lot of basic documentation on data manipulation in R/S, and a 
whole chapter in MASS4.  Somehow most other people don't seem to find 
this a problem.
I just ordered MASS4 last week and I am eager to get it in my hands. In 
meanwhile I read quite some documentation and what I more or less saw is

tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp$y2 - 1:4
tmp$y3 - 2*tmp$y1
...
...
i.e. everybody is adding full column to data frame. But I would like to add 
just one part.

--
Lep pozdrav / With regards,
Gregor GORJANC
---
University of Ljubljana
Biotechnical Faculty   URI: http://www.bfro.uni-lj.si
Zootechnical Departmentmail: gregor.gorjanc at bfro.uni-lj.si
Groblje 3  tel: +386 (0)1 72 17 861
SI-1230 Domzalefax: +386 (0)1 72 17 888
Slovenia
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] sprintf - was formatC with illegal input crashes Rgui (PR#7686)

2005-02-14 Thread Peter Dalgaard
Wolfgang Huber [EMAIL PROTECTED] writes:

 Personally, I would prefer the recycling, but of course it can be also
 done this way:
 
   mapply(sprintf, %04d %s, 1:3, abc)
 %04d %s   NA   NA
 0001 abc 0002 abc 0003 abc
 
 the only slightly unaesthetic thing being the names of the resulting vector.

...which is of course fixable with either of


 mapply(sprintf, MoreArgs=list(fmt=%04d %s), 1:3, abc)
[1] 0001 abc 0002 abc 0003 abc
 mapply(sprintf, 1:3, abc, fmt=%04d %s)
[1] 0001 abc 0002 abc 0003 abc
 mapply(sprintf, %04d %s, 1:3, abc, USE.NAMES=FALSE)
[1] 0001 abc 0002 abc 0003 abc

(Only the last one is completely failsafe since the first two relies
on 1:3 not being character:

if (USE.NAMES  length(dots)  is.character(dots[[1]]) 
is.null(names(answer)))
names(answer) - dots[[1]]
)
-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


Re: [R] Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Gregor GORJANC wrote:
Sending this also to r-help so anyone can read it also there and maybe also 
help me with my puzzle if this trivial and I don't see it.
Please don't, and especially do not after having removed the context.
So I have removed R-help from the follow-up.
Prof Brian Ripley wrote:
[... removed some ...]
The question I answered has been removed here, which is discourteous both 
to your helper and to your readers.

You add a column, not replace part of a non-existent column.  Isn't that 
obvious, given what you wrote?
Not if you subsequently remove what you wrote, of course.
# OK. If I do
tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp[1:2, y2] - 2
tmp
# I am changing nonexistent column y2 in data frame tmp.
# If I do
tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp$y2 - NA
tmp[1:2, y2] - 2
tmp
# I am changing existent column. I understand now the difference. However,
# it is weird for me that this is OK (if column y2 does not yet exist)
tmp[y2] - 2
# but this is not
tmp[1:2, y2] - 2
What is `wierd' is your insistence that this makes sense.  Columns in a 
data frame are required to be the same length.  How is that supposed to be 
made up to the correct length?  Possible for a numeric column with NAs, 
but not sensible for a raw column or a data frame column or 

There is a lot of basic documentation on data manipulation in R/S, and a 
whole chapter in MASS4.  Somehow most other people don't seem to find this 
a problem.
I just ordered MASS4 last week and I am eager to get it in my hands. In 
meanwhile I read quite some documentation and what I more or less saw is

tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D)))
tmp$y2 - 1:4
tmp$y3 - 2*tmp$y1
...
...
i.e. everybody is adding full column to data frame. But I would like to add 
just one part.
But you cannot do so and not get a corrupt data frame. All you can hope 
for is to add a column and for something arbitrary to be added to your 
input to do so.

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


Re: [R] Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)

2005-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2005, Gregor GORJANC wrote:
Sending this also to r-help so anyone can read it also there and maybe also 
help me with my puzzle if this trivial and I don't see it.
Please don't, and especially do not after having removed the context.
So I have replied only on R-devel.
Prof Brian Ripley wrote:
[... removed some ...]
You add a column, not replace part of a non-existent column.  Isn't that 
obvious, given what you wrote?
Not if you subsequently remove what you wrote and re-post elsewhere, of 
course,

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


[Rd] Test Tools

2005-02-14 Thread Paul Roebuck
Anyone aware of tools available that can provide complexity
metrics and/or code coverage analysis for R source?

--
SIGSIG -- signature too long (core dumped)

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


[Rd] R News: Call for Papers

2005-02-14 Thread Paul Murrell
Dear useRs and developeRs,
the next issue of `R News' is scheduled for the beginning of May
and we are now  accepting submissions for this first issue in 2005.
For more information see
  http://cran.r-project.org/doc/Rnews/
If you are the author of a package on CRAN and you would like to promote
it a little bit, or if you simply have an interesting application using
R, we hope you can find some time to write a short article on it. We
suggest that it be approximately 3 pages or less. The idea of the
newsletter is that it be interesting to R users without being too
technical. For example an article describing a package could begin by
briefly outlining the statistical background and go on to demonstrate
the usage on some typical data set. Of course graphics are more than
welcome!
Bill Venables [EMAIL PROTECTED] is also encouraging submissions
to the more specialist Programmer's Niche column. In this case the
technical level could be a little higher, of course, but not necessarily:
ingeniousness is the key.
The R Help Desk column is intended to present answers to frequently
asked questions as well as tricks that are useful to the majority of
useRs. Please send submissions to Uwe Ligges [EMAIL PROTECTED].
The deadline for submissions is
April, 10th, 2005
Keep the contributions rolling in!
The Editorial Board,
Doug Bates, Paul Murrell and Torsten Hothorn
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Test Tools

2005-02-14 Thread Gabor Grothendieck
Paul Roebuck roebuck at odin.mdacc.tmc.edu writes:

 
 Anyone aware of tools available that can provide complexity
 metrics and/or code coverage analysis for R source?
 

I am not aware of anything but there are some code tools in 
the codetools package.  Do a google search for:
   codetools Luke

Note that most software complexity metrics are highly correlated
so there may be little to gain beyond using lines of code.

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


[Rd] R News: Call for Papers

2005-02-14 Thread Torsten Hothorn

Dear useRs and developeRs,

the next issue of `R News' is scheduled for the beginning of May
and we are now  accepting submissions for this first issue in 2005.
For more information see

  http://cran.r-project.org/doc/Rnews/

If you are the author of a package on CRAN and you would like to promote
it a little bit, or if you simply have an interesting application using
R, we hope you can find some time to write a short article on it. We
suggest that it be approximately 3 pages or less. The idea of the
newsletter is that it be interesting to R users without being too
technical. For example an article describing a package could begin by
briefly outlining the statistical background and go on to demonstrate
the usage on some typical data set. Of course graphics are more than
welcome!

Bill Venables [EMAIL PROTECTED] is also encouraging submissions
to the more specialist Programmer's Niche column. In this case the
technical level could be a little higher, of course, but not necessarily:
ingeniousness is the key.

The R Help Desk column is intended to present answers to frequently
asked questions as well as tricks that are useful to the majority of
useRs. Please send submissions to Uwe Ligges [EMAIL PROTECTED].

The deadline for submissions is

April, 10th, 2005

Keep the contributions rolling in!

The Editorial Board,

Doug Bates, Paul Murrell and Torsten Hothorn

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