[Rd] bug inside plot.lm (PR#13989)

2009-10-08 Thread rmh
The function
 getCaption <- function(k) as.graphicsAnnot(unlist(caption[k]))
inside plot.lm in R-2.9.2 and R-2.10.0alpha loses the expression
for caption 6.  From a recover() inside the function

Browse[1]> caption[6]
[[1]]
expression("Cook's dist vs Leverage  " * h[ii]/(1 - h[ii]))

Browse[1]> caption[[6]]
expression("Cook's dist vs Leverage  " * h[ii]/(1 - h[ii]))
Browse[1]> getCaption(6)
[[1]]
"Cook's dist vs Leverage  " * h[ii]/(1 - h[ii])

Browse[1]> as.graphicsAnnot(caption[[6]])
expression("Cook's dist vs Leverage  " * h[ii]/(1 - h[ii]))


The repair seems to be to redefine getCaption as follows

Browse[1]> getCaption <- function(k) as.graphicsAnnot(caption[[k]])
Browse[1]> getCaption(6)
expression("Cook's dist vs Leverage  " * h[ii]/(1 - h[ii]))
Browse[1]>

Rich

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


[Rd] possible bug in conflicts() (PR#9760)

2007-06-27 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

Dare I say the word: bug.  It looks to me like a bug in conficts().
The use of seq_along in this line in base::conflicts
+ for (i in seq_along(where)) z[[i]] <- objects(pos = where[i])
is not appropriate.  It has the effect of ignoring the names of the
attached objects.

The proposed repair works as I wish.

> options(chmhelp = FALSE)
> if(!exists("baseenv", mode="function")) baseenv <- function() NULL
> options(STERM='iESS', editor='gnuclient.exe')
> search()
 [1] ".GlobalEnv""package:stats" "package:graphics" 
 [4] "package:grDevices" "package:utils" "package:datasets" 
 [7] "package:rcom"  "package:methods"   "Autoloads"
[10] "package:base" 
> ls(all=TRUE)
character(0)
> conflicts(detail=TRUE)
$`package:methods`
[1] "body<-"

$`package:base`
[1] "body<-"

> conflicts(where=search()[c(8,10)], detail=TRUE)  ## this is effectively using 
> search()[1:2]
list()
> conflicts <-
+ function (where = search(), detail = FALSE) 
+ {
+     if (length(where) < 1) 
+ stop("argument 'where' of length 0")
+ z <- vector(length(where), mode = "list")
+ names(z) <- where
+ for (i in where) z[[i]] <- objects(pos = i)  ## rmh
+ all <- unlist(z, use.names = FALSE)
+ dups <- duplicated(all)
+ dups <- all[dups]
+ if (detail) {
+ for (i in where) z[[i]] <- z[[i]][match(dups, z[[i]], 
+ 0)]
+ z[sapply(z, function(x) length(x) == 0)] <- NULL
+ z
+ }
+ else dups
+ }
> 
> conflicts(where=search()[c(8,10)], detail=TRUE)  ## now it honors c(8,10)
$`package:methods`
[1] "body<-"

$`package:base`
[1] "body<-"

> conflicts(detail=T)
$.GlobalEnv
[1] "conflicts"

$`package:methods`
[1] "body<-"

$`package:base`
[1] "body<-""conflicts"

> bug.report()
bug.report()
The unsent bug report can be found in file c:/tmp/R.bug.report 
> 

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 5.0
 year = 2007
 month = 04
 day = 23
 svn rev = 41293
 language = R
 version.string = R version 2.5.0 (2007-04-23)

Windows XP Home (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, 
package:datasets, 
package:rcom, package:methods, Autoloads, package:base

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


Re: [Rd] source(echo=TRUE) bug (was: [R] source() (PR#10924)

2008-03-09 Thread rmh
Thanks Duncan,

While there, can you give a new optional argument that
will permit the echo of blanks and comments?

Rich

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


[Rd] segments() with zero-length arguments (PR#11192)

2008-04-17 Thread rmh
Uwe Ligges suggested I post this on R-bugs as a wishlist item with a
proposed patch.  R considers zero-length arguments to segments() to be
an error.  I would like R to allow this and to return without an
error.  It occurs naturally in settings like

valid <- c(FALSE, FALSE, FALSE)
segments(x0[valid], y0[valid], x1[valid], y1[valid])

For what it may be worth, S-Plus does not consider zero-length
arguments to segments() be an error.


plot(1:10)
segments(1,1,10,10,col='green')
segments(numeric(0), numeric(0), numeric(0), numeric(0), col='green')
Error in segments(x0, y0, x1, y1, col = col, lty = lty, lwd = lwd, ...) : 
invalid first argument


segments.proposal <-
  function (x0, y0, x1, y1, col = par("fg"), lty = par("lty"), 
lwd = par("lwd"), ...) {
if (length(x0)==0 && length(y0)==0 && length(x1)==0 && length(y1)==0)
  return(invisible(NULL))
.Internal(segments(x0, y0, x1, y1, col = col, lty = lty, lwd = lwd, ...))
}

segments.proposal(numeric(0), numeric(0), numeric(0), numeric(0), col='green')

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


Re: [Rd] Bug in ci.plot(HH Package) (PR#11163)

2008-04-17 Thread rmh
Thank you for the error report.  I have made the correction
which will be in HH_2.1-11 which will be posted in a few days.

Rich

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


[Rd] documentation improvement request: add search (PR#12905)

2008-09-18 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

> help.search("normal probability plot")
No help files found with alias or concept or title matching 'normal
probability plot' using fuzzy matching.


> help.search("probability plot")
finds
  probplot(e1071) Probability Plot
  ppoints(stats)  Ordinates for Probability Plotting
both of which reference qqnorm.


I would like both the original help.search() calls to find qqnorm
  qqnorm(stats)   Quantile-Quantile Plots

Thanks
Rich



--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 7.2
 year = 2008
 month = 08
 day = 25
 svn rev = 46428
 language = R
 version.string = R version 2.7.2 (2008-08-25)

Windows XP (build 2600) Service Pack 3

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:RcmdrPlugin.HH, package:leaps, package:HH, 
package:multcomp, package:mvtnorm, 
package:grid, package:lattice, package:Rcmdr, package:car, package:tcltk, 
package:stats, 
package:graphics, package:grDevices, package:datasets, package:rcom, 
package:utils, 
package:methods, RExcelEnv, RcmdrEnv, Autoloads, package:base

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


[Rd] bug in proj() (PR#13505)

2009-02-05 Thread rmh
The result of proj() is not currently coerced to data.frame
when requested.  I use this capability pedagogically all the time.
It did work when I wrote proj() for the Chambers and Hastie book, and
it still works in S-Plus.  A minimal repair is in the as.data.frame.aovproj 
definition below.

Rich

> version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  8.1 
year   2008
month  12  
day22  
svn rev47281   
language   R   
version.string R version 2.8.1 (2008-12-22)
>

## using the example in ?aov

utils::data(npk, package="MASS")

npk.aov <- aov(yield ~ block + N * P + K, npk)
proj(npk.aov)
cbind(npk, proj(npk.aov))

as.data.frame.aovproj <- function(x, ...) as.data.frame(unclass(x), ...)

cbind(npk, proj(npk.aov))



> cbind(npk, proj(npk.aov))
Error in as.data.frame.default(x[[i]], optional = TRUE) : 
  cannot coerce class "aovproj" into a data.frame
> as.data.frame.aovproj <- function(x, ...) as.data.frame(unclass(x), ...)
> cbind(npk, proj(npk.aov))
   block N P K yield (Intercept)  block N  P K
1  1 0 1 1  49.5  54.875 -0.850 -2.808333 -0.5916667 -1.991667


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


[Rd] bug in summary.aovlist() with split= and (PR#13579)

2009-03-06 Thread rmh

---62a8e378fd5c9332aae960888fd28459
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   r-b...@r-project.org
#

##


summary.aovlist() with split= and expand.split=TRUE
gives two different types of nonsensical results for a:b
in the Within stratum in the two different expansions of tmp3.aov.

S-Plus gives appropriate results and I attach them for comparison.
There are three attached files.
 split.r   source
 split.rt  R transcript showing nonsense results
 split.st  S-Plus transcript showing appropriate results

Rich


--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 8.1
 year = 2008
 month = 12
 day = 22
 svn rev = 47281
 language = R
 version.string = R version 2.8.1 (2008-12-22)

Windows XP (build 2600) Service Pack 3

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:RcmdrPlugin.HH, package:Rcmdr, package:car, package:tcltk, 
package:fortunes, 
package:VGAM, package:stats4, package:splines, package:HH, package:leaps, 
package:multcomp, 
package:mvtnorm, package:grid, package:lattice, package:stats, 
package:graphics, package:datasets, 
package:grDevices, package:rcom, package:rscproxy, package:utils, 
package:methods, RExcelEnv, 
RcmdrEnv, Autoloads, package:base

---62a8e378fd5c9332aae960888fd28459
Content-Type: text/plain;
name="split.r"
Content-Disposition: inline;
filename="split.r"
Content-Transfer-Encoding: quoted-printable

tmp <- data.frame(y=3Drnorm(48),
  a=3Drep(letters[1:3]=
, 16),
  b=3Drep(rep(LETTERS[1:4], each=3D3),4),
 =
 block=3Drep(LETTERS[5:6], each=3D24)
  )
=

tmp.aov <- aov(y ~ a*b, data=3Dtmp)
summary(tmp.aov,
split=3D=
list(a=3Dlist(t=3D1,u=3D2), b=3Dlist(v=3D1,w=3D2,x=3D3)),
expan=
d.split=3DTRUE)

tmp2.aov <- aov(y ~ Error(block) + a*b, data=3Dtmp)
=
summary(tmp2.aov,
split=3Dlist(a=3Dlist(t=3D1,u=3D2), b=3Dlist(=
v=3D1,w=3D2,x=3D3)),
expand.split=3DTRUE)
summary(tmp2.aov,
 =
   split=3Dlist(a=3Dlist(t=3D1,u=3D2)),
expand.split=3DTRUE=
)

tmp3.aov <- aov(y ~ Error(block/a) + a*b, data=3Dtmp)
summary(tmp3=
.aov,
split=3Dlist(a=3Dlist(t=3D1,u=3D2), b=3Dlist(v=3D1,w=3D2,=
x=3D3)),
expand.split=3DTRUE)
summary(tmp3.aov,
split=
=3Dlist(a=3Dlist(t=3D1,u=3D2)),
expand.split=3DTRUE)

---62a8e378fd5c9332aae960888fd28459
Content-Type: text/plain;
name="split.rt"
Content-Disposition: inline;
filename="split.rt"
Content-Transfer-Encoding: quoted-printable

> tmp <- data.frame(y=3Drnorm(48),
+   a=3Drep(letters[=
1:3], 16),
+   b=3Drep(rep(LETTERS[1:4], each=3D3),4),
+   block=3Drep(LETTERS[5:6], each=3D24)
+ =
  )
> =

> tmp.aov <- aov(y ~ a*b, data=3Dtmp)
> summary(tmp.aov,
+ spl=
it=3Dlist(a=3Dlist(t=3D1,u=3D2), b=3Dlist(v=3D1,w=3D2,x=3D3)),
+   =
  expand.split=3DTRUE)
Df Sum Sq Mean Sq F value Pr(>F)
a =
   2  2.060   1.030  1.0528 0.3595
  a: t   1  1.411   1.41=
1  1.4416 0.2377
  a: u   1  0.650   0.650  0.6639 0.4205
b   =
 3  0.839   0.280  0.2859 0.8353
  b: v   1  0.264   0.264  0.2=
702 0.6063
  b: w   1  0.001   0.001  0.0013 0.9711
  b: x   1=
  0.573   0.573  0.5860 0.4489
a:b  6  2.300   0.383  0.3918 0.=
8794
  a:b: t.v   1  0.556   0.556  0.5685 0.4558
  a:b: u.v   1  0.99=
8   0.998  1.0203 0.3192
  a:b: t.w   1  0.171   0.171  0.1747 0.6785
=
  a:b: u.w   1  0.092   0.092  0.0942 0.7607
  a:b: t.x   1  0.361   0.=
361  0.3685 0.5476
  a:b: u.x   1  0.122   0.122  0.1246 0.7261
Residu=
als   36 35.226   0.978   =

> =

> tmp2.aov <- aov(y ~ Error(block) + a*b, data=3Dtmp)
> summary(tmp2.ao=
v,
+ split=3Dlist(a=3Dlist(t=3D1,u=3D2), b=3Dlist(v=3D1,w=3D2,x=
=3D3)),
+ expand.split=3DTRUE)

Error: block
  Df  S=
um Sq Mean Sq F value Pr(>F)
Residuals  1 0.57849 0.57849  =
 =


Error: Within
   Df Sum Sq Mean Sq F value Pr(>F)
a =
  2  2.060   1.030  1.0406 0.3639
  a: t  1  1.411   1.411  1.4250 =
0.2406
  a: u  1  0.650   0.650  0.6563 0.4234
b   3  0.83=
9   0.280  0.2826 0.8376
  b: v  1  0.264   0.264  0.2671 0.6085
 =
 b: w  1  0.001   0.001  0.0013 0.9713
  b: x  1  0.573   0.573=
  0.5793 0.4517
a:b 6  2.300   0.383  0.3873 0.8822
  a:b: t.v=
  1  0.556   0.556  0.5619 0.4585
  a:b: u.v  1  0.998   0.998  1.0085 =
0.3222
  a:b: t.w  1  0.171   0.171  

[Rd] bugs in simtest (PR#8670)

2006-03-08 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

This report is joint from Richard Heiberger <[EMAIL PROTECTED]>
and Burt Holland <[EMAIL PROTECTED]>.
Burt Holland is the coauthor of the paper that the ?ptukey
documentation references.


R was used to run an example in our elementary Stat course.  It was
a one-way ANOVA, the factor `strategy' having 3 levels Price, Quality
and Convenience.   

We issued the command 

summary(simint(sales ~ strategy, type="Tukey", data=Xm15.01s))

and received the output 

Coefficients:
Estimate  2.5 % 97.5 % t value Std.Err.
strategyPrice-strategyConvenience  31.10 -40.67 102.87   1.043   29.824
strategyQuality-strategyConvenience75.45   3.68 147.22   2.530   29.824
strategyQuality-strategyPrice  44.35 -27.42 116.12   1.487   29.824
p raw p Bonf p adj
strategyPrice-strategyConvenience   0.301  0.904 0.553
strategyQuality-strategyConvenience 0.014  0.043 0.037
strategyQuality-strategyPrice   0.143  0.428 0.305

This gives correct 95% confidence intervals and adjusted p-values for the
Tukey multiple comparisons procedure.



Next we issued 

summary(simtest(sales ~ strategy, type="Tukey", data=Xm15.01s))

which produced the output

Coefficients:
Estimate t value Std.Err. p raw p Bonf
strategyQuality-strategyConvenience75.45  -2.530   29.824 0.014  0.043
strategyQuality-strategyPrice  44.35  -1.487   29.824 0.143  0.285
strategyPrice-strategyConvenience  31.10  -1.043   29.824 0.301  0.301
p adj
strategyQuality-strategyConvenience 0.037
strategyQuality-strategyPrice   0.243
strategyPrice-strategyConvenience   0.301

Notice that the simtest output gives negative t statistics.  This is
wrong because the point estimates are positive.

The simtest Bonferroni p-values and adjusted p-values differ from the
simint values by more than trivial amounts.

We are puzzled that the two functions use different conventions on
sequencing the contrasts.  For levels A,B,C, it looks like

simint is using
B-A
C-A
C-B

and simtest is using
C-A
C-B
B-A


We verify all the p-values from the following code


tt <- c(31.10,75.45,44.35)/29.824
tt

 2*(1-pt(tt, 57))## raw
3 * (2*(1-pt(tt, 57)))   ## Bonferroni
1-ptukey(tt*sqrt(2), 3, 57)  ## tukey

## It looks like simtest is using
(3:1) * (2*(1-pt(tt[c(2,3,1)], 57))) ## simtest Bonferroni
## The subscript is there to account for the different sequencing.
## The (3:1) multiplier is strange.

## It looks like simtest is using approximately
(1-ptukey(tt[c(2,3,1)]*sqrt(2), 3, 57)) / (1+c(0,1,3)*.12)^2
## We have no idea what that divisor is doing there other than
## approximating the answer that simtest is giving.




## Here is another example, this time using one of your datasets.
## Again, the p.Bonf and p.adj differ.  Again, the t.values for the
## simtest have the wrong sign.
## This is from
## c:/Program Files/R/R-2.2.1/library/multcomp/R-ex/Rex.zip/simtest.R

> data(cholesterol)
> 
> # adjusted p-values for all-pairwise comparisons in a one-way 
> # layout (tests for restricted combinations)
> simtest(response ~ trt, data=cholesterol, type="Tukey", ttype="logical")

Simultaneous tests: Tukey contrasts

Call: 
simtest.formula(formula = response ~ trt, data = cholesterol, 
type = "Tukey", ttype = "logical")

Contrast matrix:
  trt1time trt2times trt4times trtdrugD trtdrugE
trt2times-trt1time  0   -1 1 000
trt4times-trt1time  0   -1 0 100
trtdrugD-trt1time   0   -1 0 010
trtdrugE-trt1time   0   -1 0 001
trt4times-trt2times 00-1 100
trtdrugD-trt2times  00-1 010
trtdrugE-trt2times  00-1 001
trtdrugD-trt4times  00 0-110
trtdrugE-trt4times  00 0-101
trtdrugE-trtdrugD   00 0 0   -11

Adjusted P-Values

p adj
trtdrugE-trt1time   0.000
trtdrugE-trt2times  0.000
trtdrugD-trt1time   0.000
trtdrugE-trt4times  0.000
trt4times-trt1time  0.000
trtdrugD-trt2times  0.000
trtdrugE-trtdrugD   0.001
trt2times-trt1time  0.042
trt4times-trt2times 0.042
trtdrugD-trt4times  0.044
> 
> 
> summary(simtest(response ~ trt, data=cholesterol, type="Tukey", 
> ttype="logical"))

 Simultaneous tests: Tukey contrasts 

Call: 
simtest.formula(formula = response ~ trt, data = cholesterol, 
type = "Tukey", ttype = "logical")

 Tuk

[Rd] documentation bug as S-Plus catches up (PR#8933)

2006-06-02 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

The R documentation for "is.R" says
 "## 'which()' only exists in R:"
This is no longer true.  In S-Plus 8.0

> version
Enterprise Developer Version 8.0.1 Beta 1  for Microsoft Windows : 2006 

both "is.R" and "which" are defined in the splus directory.


Now that coordination with R, including use of the package system, is one of
the Insightful goals, I hope someone in R-core will be monitoring these changes.
Let me know if you want me to post these types of things in the future.
I won't unless specically requested.

Rich

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 3.1
 year = 2006
 month = 06
 day = 01
 svn rev = 38247
 language = R
 version.string = Version 2.3.1 (2006-06-01)

Windows XP Home Edition (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:grid, package:lattice, 
file:c:/HOME/rmh/h2/library/H2/.RData, 
file:c:/HOME/rmh/hh/splus.library/HH/.RData, package:car, package:Rcmdr, 
package:tcltk, 
package:methods, package:stats, package:graphics, package:grDevices, 
package:utils, 
package:datasets, RcmdrEnv, Autoloads, package:base

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


[Rd] utils package: .Rd to .dvi (PR#9079)

2006-07-14 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

I am building a package.  I discovered that all \usage{} and
\examples{} in the .Rd file that are too long to fit on the .dvi page
are left as is.  They run over the edge of the page and just keep on
going.

I propose that a WARNING or ERROR be generated as part of Rcmd check
for such cases.

The "test <-" line and both "test(" lines below are single lines.
My mailer folds at about 100 characters.

Rich


## test/R/test.R
test <- function(this, is, a, very, long, argument, list, designed, to, show, 
the, difficulty, 
with, .Rd, To, .dvi, conversion) {
  "Hello, World!"
}
## end test/R/test.R


## test/man/test.Rd
\name{test}
\alias{test}
\title{demonstrate a problem}
\description{demonstrate a problem}
\usage{
test(this, is, a, very, long, argument, list, designed, to, show, the, 
difficulty, with, .Rd, 
To, .dvi, conversion)
}
\arguments{
\item{this}{}
\item{is}{}
\item{a}{}
\item{very}{}
\item{long}{}
\item{argument}{}
\item{list}{}
\item{designed}{}
\item{to}{}
\item{show}{}
\item{the}{}
\item{difficulty}{}
\item{with}{}
\item{.Rd}{}
\item{To}{}
\item{.dvi}{}
\item{conversion}{}
}
\examples{
test(this, is, a, very, long, argument, list, designed, to, show, the, 
difficulty, with, .Rd, 
To, .dvi, conversion)
}
\keyword{package}
## end test/man/test.Rd


## test/DESCRIPTION
Package: test
Type: Package
Title: demonstrate a problem
Version: 1.0
Date: 2006-05-15
Author: Richard M. Heiberger
Maintainer: Richard M. Heiberger <[EMAIL PROTECTED]>
Depends: R (>= 2.3.1)
Description: demonstrate a problem
License: GPL version 2 or newer
## test/DESCRIPTION


--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 3.1
 year = 2006
 month = 06
 day = 01
 svn rev = 38247
 language = R
 version.string = Version 2.3.1 (2006-06-01)

Windows XP Professional (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:methods, package:stats, package:utils, package:datasets, 
file:c:/HOME/rmh/h2/library/H2/.RData, 
file:c:/HOME/rmh/hh/splus.library/HH/.RData, 
package:multcomp, package:mvtnorm, package:graphics, package:lattice, 
package:grid, 
package:grDevices, Autoloads, package:base

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


[Rd] axis documentation (PR#9147)

2006-08-15 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

?axis shows the description of the hadj argument:

hadj: adjustment (see 'par("adj")' for all labels _parallel_
  ('horizontal') to the reading direction.  If this is not a
  finite value, the default is used (centring for strings
  parallel to the axis, justification of the end nearest the
  axis otherwise).

The first line is missing a critical close-parenthesis:
hadj: adjustment (see 'par("adj")') for all labels _parallel_


--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 3.1
 year = 2006
 month = 06
 day = 01
 svn rev = 38247
 language = R
 version.string = Version 2.3.1 (2006-06-01)

Windows XP Home Edition (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:HH, package:multcomp, package:mvtnorm, package:grid, 
package:lattice, 
package:methods, package:stats, package:graphics, package:grDevices, 
package:utils, 
package:datasets, Autoloads, package:base

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


[Rd] graphics documentation omission (PR#9148)

2006-08-15 Thread rmh
# R for Windows will not send your bug report automatically.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

?axis says in Details: "(for example,
 if the 'plot' argument 'asp' is set)."

The asp argument is not mentioned in ?plot and is not mentioned in ?par.





--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 3.1
 year = 2006
 month = 06
 day = 01
 svn rev = 38247
 language = R
 version.string = Version 2.3.1 (2006-06-01)

Windows XP Home Edition (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

Search Path:
 .GlobalEnv, package:HH, package:multcomp, package:mvtnorm, package:grid, 
package:lattice, 
package:methods, package:stats, package:graphics, package:grDevices, 
package:utils, 
package:datasets, Autoloads, package:base

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


Re: [Rd] graphics documentation omission (PR#9149)

2006-08-15 Thread rmh
Thanks, Marc

Neither plot.window or plot.default are natural places for me to look for
argument names.  par and plot are, for me, the natural places.  I realize
that asp is not a par argument.  Nonetheless, par is still the first place
to look for arguments that I would use in the ... position of any plot function.
It would be easy to make a case that asp is the same type of argument as mar
or fin, thus it would make sense for it to be added to par.

There are NO (that is, zero) live links in the Rgui help system.

help.search("asp") doesn't find anything related to graphics.

ESS is much better for help than Rgui since ESS Rd mode can go to the help
page for any word that the cursor sits on.  ESS for R help doesn't have the
links themselves.

Rich

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


[Rd] inconsistency or bug in coef() (PR#9358)

2006-11-12 Thread rmh
tmp <- data.frame(x=c(1,1),
  y=c(1,2))

tmp.lm <- lm(y ~ x, data=tmp)
summary(tmp.lm)

coef(summary(tmp.lm))

## I consider this to be a bug.  Since summary(tmp.lm) gives
## two rows for the coefficients, I believe the coef() function
## should also give two rows.



> summary(tmp.lm)

Call:
lm(formula = y ~ x, data = tmp)

Residuals:
   12 
-0.5  0.5 

Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept)  1.50.5   30.205
x NA NA  NA   NA

Residual standard error: 0.7071 on 1 degrees of freedom

> coef(summary(tmp.lm))
Estimate Std. Error t value  Pr(>|t|)
(Intercept)  1.50.5   3 0.2048328
> 
> version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  4.0 
year   2006
month  10  
day03  
svn rev39566   
language   R   
version.string R version 2.4.0 (2006-10-03)
> 


## this is a related problem

tmp <- data.frame(x=c(1,2),
  y=c(1,2))

tmp.lm <- lm(y ~ x, data=tmp)
summary(tmp.lm)

coef(summary(tmp.lm))

## Here the summary() give NA for the values that can't be
## calculated and the coef() function gives NaN.  I think both
## functions should return the same result.


> summary(tmp.lm)

Call:
lm(formula = y ~ x, data = tmp)

Residuals:
ALL 2 residuals are 0: no residual degrees of freedom!

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)0 NA  NA   NA
x  1 NA  NA   NA

Residual standard error: NaN on 0 degrees of freedom
Multiple R-Squared: 1,  Adjusted R-squared:   NaN 
F-statistic:   NaN on 1 and 0 DF,  p-value: NA 

> 
> coef(summary(tmp.lm))
Estimate Std. Error t value Pr(>|t|)
(Intercept)0NaN NaN  NaN
x  1NaN NaN  NaN
> 
>

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


Re: [Rd] inconsistency or bug in coef() (PR#9358)

2006-11-13 Thread rmh
I am fascinated.  I can accept the argument that suppressing aliased
values is a valid behavior of the program.  The defense of the inconsistency
between the two displays surprises me.

Yes, Brian, I checked.  That's why I offered the option of an inconsistency.
I do believe strongly that the coef section of summary and the coef function
should give identical results.

I still think the inconsistency is a bug.  I think the author of the
print.summary.lm did the right thing by showing the requested coef for
the x variable and giving it a missing value.

Rich

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