[Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Gorjanc Gregor
Dear R developers,

I have encountered strange behaviour of fitdistr for gamma in recent R
build i.e. 2.2.0. I have attached the code for data at the end of this mail
so you can reproduce the problem. In short, I am able to run fitdistr under
2.1.0 without problems, while I get the following error under 2.2.0
(Version 2.2.0 Patched (2005-11-15 r36348))

> fitdistr(otm, "gamma")
Error in densfun(x, parm[1], parm[2], ...) : 
'shape' must be strictly positive

The results on 2.1.1 (Version 2.1.1 (2005-06-20)) are

> fitdistr(otm, "gamma")
shape   rate  
  1.030667   0.189177 
 (0.090537) (0.021166)

Platform: Windows XP

Thank you in advance for your effort on this remarkable tool!

Here is the data for above problem/results:

"otm" <-
c(0.059610966029577, 0.0591496321922168, 0.14, 0.18, 0.24, 0.25, 
0.270071982912719, 0.270758049933706, 0.269911804412492, 0.280138451903593, 
0.279787947586738, 0.279429937571753, 0.3, 0.320746235495899, 
0.319553311037365, 0.51, 0.54, 0.56, 0.6, 0.609812622915953, 
0.609198293855879, 0.64, 0.69, 0.74, 0.76, 0.770972826186568, 
0.769288654833566, 0.78, 0.789181584270671, 0.78991363293305, 
0.8, 0.89, 0.900691718998831, 0.8991656800583, 0.92, 0.93, 0.94, 
1.01, 1.02, 1.13, 1.18, 1.26, 1.29, 1.33, 1.42, 1.43, 1.47, 1.47940529614314, 
1.47920716832764, 1.6, 1.61, 1.63, 1.68938231960637, 1.6894849291523, 
1.82, 1.88088044053270, 1.8792804789003, 1.89, 1.92, 2, 2.04, 
2.07, 2.12, 2.17, 2.18, 2.22, 2.23, 2.27, 2.28, 2.3, 2.32092240267433, 
2.31912300181622, 2.38, 2.39, 2.43, 2.46, 2.51, 2.52, 2.55, 2.56, 
2.61, 2.66091404781397, 2.6595832825806, 2.67, 2.7, 2.77, 2.8, 
2.81, 2.86, 2.87, 2.93, 3.01, 3.05, 3.14, 3.15, 3.17, 3.18, 3.24, 
3.26, 3.33, 3.44, 3.45, 3.52, 3.55, 3.63, 3.73, 3.9, 4, 4.01, 
4.04, 4.13, 4.15934497380769, 4.16094719917513, 4.3, 4.33, 4.34, 
4.66, 4.76, 4.82, 4.83, 4.89, 4.92, 5.06, 5.14, 5.16, 5.26, 5.31, 
5.36, 5.48, 5.66, 5.79, 5.8, 5.85, 5.87, 5.92952534468565, 5.92962284128508, 
6.04, 6.11, 6.13, 6.16, 6.19, 6.42, 6.66, 6.69, 7.11, 7.16, 7.29, 
7.3, 7.31, 7.33, 7.72, 7.82, 7.87, 7.91, 8.01, 8.17, 8.45, 8.49, 
8.73, 8.86, 8.95, 9, 9.05, 9.13, 9.22, 9.52, 9.82, 9.88, 9.91, 
9.99, 10.03, 10.4, 10.59, 10.83, 11.06, 11.64, 11.85, 12.02, 
12.4, 12.64, 12.96, 13.44, 14.06, 14.07, 14.37, 15.4, 15.6, 15.92, 
16.23, 16.6, 16.97, 17.06, 17.8, 18.69, 18.73, 19.2, 19.51, 19.54, 
20.57, 21.05, 22.23, 27.02)

Lep pozdrav / With regards,
Gregor Gorjanc

--
University of Ljubljana
Biotechnical FacultyURI: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department mail: gregor.gorjanc  bfro.uni-lj.si
Groblje 3   tel: +386 (0)1 72 17 861
SI-1230 Domzale fax: +386 (0)1 72 17 888
Slovenia, Europe
--
"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.

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


Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread P Ehlers
Gregor,

  fitdistr(otm, "gamma", method="L-BFGS-B")

works for me (on WinXP). Or you could specify "lower = 0".

I no longer have 2.1.0 running, so I don't know why this
wasn't needed in 2.1.0.

"R version 2.2.0, 2005-10-24"
MASS version: 7.2-20

-peter

Gorjanc Gregor wrote:
> Dear R developers,
> 
> I have encountered strange behaviour of fitdistr for gamma in recent R
> build i.e. 2.2.0. I have attached the code for data at the end of this mail
> so you can reproduce the problem. In short, I am able to run fitdistr under
> 2.1.0 without problems, while I get the following error under 2.2.0
> (Version 2.2.0 Patched (2005-11-15 r36348))
> 
> 
>>fitdistr(otm, "gamma")
> 
> Error in densfun(x, parm[1], parm[2], ...) : 
> 'shape' must be strictly positive
> 
> The results on 2.1.1 (Version 2.1.1 (2005-06-20)) are
> 
> 
>>fitdistr(otm, "gamma")
> 
> shape   rate  
>   1.030667   0.189177 
>  (0.090537) (0.021166)
> 
> Platform: Windows XP
> 
> Thank you in advance for your effort on this remarkable tool!
> 
> Here is the data for above problem/results:
> 
> "otm" <-
> c(0.059610966029577, 0.0591496321922168, 0.14, 0.18, 0.24, 0.25, 
> 0.270071982912719, 0.270758049933706, 0.269911804412492, 0.280138451903593, 
> 0.279787947586738, 0.279429937571753, 0.3, 0.320746235495899, 
> 0.319553311037365, 0.51, 0.54, 0.56, 0.6, 0.609812622915953, 
> 0.609198293855879, 0.64, 0.69, 0.74, 0.76, 0.770972826186568, 
> 0.769288654833566, 0.78, 0.789181584270671, 0.78991363293305, 
> 0.8, 0.89, 0.900691718998831, 0.8991656800583, 0.92, 0.93, 0.94, 
> 1.01, 1.02, 1.13, 1.18, 1.26, 1.29, 1.33, 1.42, 1.43, 1.47, 1.47940529614314, 
> 1.47920716832764, 1.6, 1.61, 1.63, 1.68938231960637, 1.6894849291523, 
> 1.82, 1.88088044053270, 1.8792804789003, 1.89, 1.92, 2, 2.04, 
> 2.07, 2.12, 2.17, 2.18, 2.22, 2.23, 2.27, 2.28, 2.3, 2.32092240267433, 
> 2.31912300181622, 2.38, 2.39, 2.43, 2.46, 2.51, 2.52, 2.55, 2.56, 
> 2.61, 2.66091404781397, 2.6595832825806, 2.67, 2.7, 2.77, 2.8, 
> 2.81, 2.86, 2.87, 2.93, 3.01, 3.05, 3.14, 3.15, 3.17, 3.18, 3.24, 
> 3.26, 3.33, 3.44, 3.45, 3.52, 3.55, 3.63, 3.73, 3.9, 4, 4.01, 
> 4.04, 4.13, 4.15934497380769, 4.16094719917513, 4.3, 4.33, 4.34, 
> 4.66, 4.76, 4.82, 4.83, 4.89, 4.92, 5.06, 5.14, 5.16, 5.26, 5.31, 
> 5.36, 5.48, 5.66, 5.79, 5.8, 5.85, 5.87, 5.92952534468565, 5.92962284128508, 
> 6.04, 6.11, 6.13, 6.16, 6.19, 6.42, 6.66, 6.69, 7.11, 7.16, 7.29, 
> 7.3, 7.31, 7.33, 7.72, 7.82, 7.87, 7.91, 8.01, 8.17, 8.45, 8.49, 
> 8.73, 8.86, 8.95, 9, 9.05, 9.13, 9.22, 9.52, 9.82, 9.88, 9.91, 
> 9.99, 10.03, 10.4, 10.59, 10.83, 11.06, 11.64, 11.85, 12.02, 
> 12.4, 12.64, 12.96, 13.44, 14.06, 14.07, 14.37, 15.4, 15.6, 15.92, 
> 16.23, 16.6, 16.97, 17.06, 17.8, 18.69, 18.73, 19.2, 19.51, 19.54, 
> 20.57, 21.05, 22.23, 27.02)
> 
> Lep pozdrav / With regards,
> Gregor Gorjanc
> 
> --
> University of Ljubljana
> Biotechnical FacultyURI: http://www.bfro.uni-lj.si/MR/ggorjan
> Zootechnical Department mail: gregor.gorjanc  bfro.uni-lj.si
> Groblje 3   tel: +386 (0)1 72 17 861
> SI-1230 Domzale fax: +386 (0)1 72 17 888
> Slovenia, Europe
> --
> "One must learn by doing the thing; for though you think you know it,
>  you have no certainty until you try." Sophocles ~ 450 B.C.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Peter Ehlers
University of Calgary

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


[Rd] Scan data from a .txt file

2005-11-17 Thread Vasundhara Akkineni
Hi all,
Am trying to read data from a .txt file in such a way that i can access the
column names too. For example, the data in the table.txt file is as below:
 Name Weight Height Gender
Anne 150 65 F
Rob 160 68 M
George 180 65 M
Greg 205 69 M
 i used the following commands:
 data<-scan("table.txt",list("",0,0,0),sep="")
a<-data[[1]]
b<-data[[2]]
c<-data[[3]]
d<-data[[4]]
 But this doesn't work because of type mismatch. I want to pull the col
names also into the respective lists. For example i want 'b' to have
(weight,150,160,180,205) so that i can access the col name and also the
induvidual weights. I tried using the read.table method too, but couldn't
get this working. Can someone suggest a way to do this.
Thanks,
Vasu.

[[alternative HTML version deleted]]

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


Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Peter Dalgaard
P Ehlers <[EMAIL PROTECTED]> writes:

> Gregor,
> 
>   fitdistr(otm, "gamma", method="L-BFGS-B")
> 
> works for me (on WinXP). Or you could specify "lower = 0".

The really odd thing is that it even works with

>  fitdistr(otm, "gamma",lower=-Inf)
 shape rate
  1.03081094   0.18924370
 (0.09055117) (0.02117350)

or even

>  fitdistr(otm, "gamma",upper=Inf)
 shape rate
  1.03081094   0.18924370
 (0.09055117) (0.02117350)


Also

>  fitdistr(otm, "gamma",control=list(parscale=c(.1,.1)))
 shape rate
  1.03079500   0.18923897
 (0.09055106) (0.02117363)

and quite amusingly:


>  fitdistr(otm, "gamma",method="BFGS",lower=0)
 shape rate
  1.03081096   0.18924371
 (0.09055118) (0.02117350)
Warning message:
bounds can only be used with method L-BFGS-B in: optim(x = c(0.059610966029577, 
0.0591496321922168, 0.14, 0.18,
>  fitdistr(otm, "gamma",method="CG",lower=0)
 shape rate
  1.03081096   0.18924371
 (0.09055118) (0.02117350)
Warning message:
bounds can only be used with method L-BFGS-B in: optim(x = c(0.059610966029577, 
0.0591496321922168, 0.14, 0.18,

whereas the same calls without the dysfunctional lower= gives the
warning about `shape` needing to be positive.

This probably all indicates that something inside optim() is broken.


 
> I no longer have 2.1.0 running, so I don't know why this
> wasn't needed in 2.1.0.
> 
> "R version 2.2.0, 2005-10-24"
> MASS version: 7.2-20
> 
> -peter
> 
> Gorjanc Gregor wrote:
> > Dear R developers,
> > 
> > I have encountered strange behaviour of fitdistr for gamma in recent R
> > build i.e. 2.2.0. I have attached the code for data at the end of this mail
> > so you can reproduce the problem. In short, I am able to run fitdistr under
> > 2.1.0 without problems, while I get the following error under 2.2.0
> > (Version 2.2.0 Patched (2005-11-15 r36348))
> > 
> > 
> >>fitdistr(otm, "gamma")
> > 
> > Error in densfun(x, parm[1], parm[2], ...) : 
> > 'shape' must be strictly positive
> > 
> > The results on 2.1.1 (Version 2.1.1 (2005-06-20)) are
> > 
> > 
> >>fitdistr(otm, "gamma")
> > 
> > shape   rate  
> >   1.030667   0.189177 
> >  (0.090537) (0.021166)
> > 
> > Platform: Windows XP
> > 
> > Thank you in advance for your effort on this remarkable tool!
> > 
> > Here is the data for above problem/results:
> > 
> > "otm" <-
> > c(0.059610966029577, 0.0591496321922168, 0.14, 0.18, 0.24, 0.25, 
> > 0.270071982912719, 0.270758049933706, 0.269911804412492, 0.280138451903593, 
> > 0.279787947586738, 0.279429937571753, 0.3, 0.320746235495899, 
> > 0.319553311037365, 0.51, 0.54, 0.56, 0.6, 0.609812622915953, 
> > 0.609198293855879, 0.64, 0.69, 0.74, 0.76, 0.770972826186568, 
> > 0.769288654833566, 0.78, 0.789181584270671, 0.78991363293305, 
> > 0.8, 0.89, 0.900691718998831, 0.8991656800583, 0.92, 0.93, 0.94, 
> > 1.01, 1.02, 1.13, 1.18, 1.26, 1.29, 1.33, 1.42, 1.43, 1.47, 
> > 1.47940529614314, 
> > 1.47920716832764, 1.6, 1.61, 1.63, 1.68938231960637, 1.6894849291523, 
> > 1.82, 1.88088044053270, 1.8792804789003, 1.89, 1.92, 2, 2.04, 
> > 2.07, 2.12, 2.17, 2.18, 2.22, 2.23, 2.27, 2.28, 2.3, 2.32092240267433, 
> > 2.31912300181622, 2.38, 2.39, 2.43, 2.46, 2.51, 2.52, 2.55, 2.56, 
> > 2.61, 2.66091404781397, 2.6595832825806, 2.67, 2.7, 2.77, 2.8, 
> > 2.81, 2.86, 2.87, 2.93, 3.01, 3.05, 3.14, 3.15, 3.17, 3.18, 3.24, 
> > 3.26, 3.33, 3.44, 3.45, 3.52, 3.55, 3.63, 3.73, 3.9, 4, 4.01, 
> > 4.04, 4.13, 4.15934497380769, 4.16094719917513, 4.3, 4.33, 4.34, 
> > 4.66, 4.76, 4.82, 4.83, 4.89, 4.92, 5.06, 5.14, 5.16, 5.26, 5.31, 
> > 5.36, 5.48, 5.66, 5.79, 5.8, 5.85, 5.87, 5.92952534468565, 
> > 5.92962284128508, 
> > 6.04, 6.11, 6.13, 6.16, 6.19, 6.42, 6.66, 6.69, 7.11, 7.16, 7.29, 
> > 7.3, 7.31, 7.33, 7.72, 7.82, 7.87, 7.91, 8.01, 8.17, 8.45, 8.49, 
> > 8.73, 8.86, 8.95, 9, 9.05, 9.13, 9.22, 9.52, 9.82, 9.88, 9.91, 
> > 9.99, 10.03, 10.4, 10.59, 10.83, 11.06, 11.64, 11.85, 12.02, 
> > 12.4, 12.64, 12.96, 13.44, 14.06, 14.07, 14.37, 15.4, 15.6, 15.92, 
> > 16.23, 16.6, 16.97, 17.06, 17.8, 18.69, 18.73, 19.2, 19.51, 19.54, 
> > 20.57, 21.05, 22.23, 27.02)
> > 
> > Lep pozdrav / With regards,
> > Gregor Gorjanc
> > 
> > --
> > University of Ljubljana
> > Biotechnical FacultyURI: http://www.bfro.uni-lj.si/MR/ggorjan
> > Zootechnical Department mail: gregor.gorjanc  bfro.uni-lj.si
> > Groblje 3   tel: +386 (0)1 72 17 861
> > SI-1230 Domzale fax: +386 (0)1 72 17 888
> > Slovenia, Europe
> > --
> > "One must learn by doing the thing; for though you think you know it,
> >  you have no certainty until you try." Sophocles ~ 450 B.C.
> > 
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> Peter Ehlers
> University of Calgary
> 
> ___

Re: [Rd] Scan data from a .txt file

2005-11-17 Thread Duncan Murdoch
On 11/17/2005 10:35 AM, Vasundhara Akkineni wrote:
> Hi all,
> Am trying to read data from a .txt file in such a way that i can access the
> column names too. For example, the data in the table.txt file is as below:
>  Name Weight Height Gender
> Anne 150 65 F
> Rob 160 68 M
> George 180 65 M
> Greg 205 69 M
>  i used the following commands:
>  data<-scan("table.txt",list("",0,0,0),sep="")
> a<-data[[1]]
> b<-data[[2]]
> c<-data[[3]]
> d<-data[[4]]
>  But this doesn't work because of type mismatch. I want to pull the col
> names also into the respective lists. For example i want 'b' to have
> (weight,150,160,180,205) so that i can access the col name and also the
> induvidual weights. I tried using the read.table method too, but couldn't
> get this working. Can someone suggest a way to do this.

You probably want to use read.table("table.txt", head=TRUE).  Chances 
are it will automatically recognize the column types; if not, there's 
the colClasses argument.

Duncan Murdoch

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


[Rd] Matrix (PR#8321)

2005-11-17 Thread Cougar
It appears to me that the new version of the package Matrix will not load to
R-2.2.0.

Respectfully,

Frank Lawrence

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


Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread P Ehlers
I think the problem may lie with fitdistr().
Specifically, replacing the code in fitdistr.R (VR_7.2-20)
(line 137 to end) with the code in VR_7.2-8 (line 92 to end)
seems to handle

   fitdistr(otm, "gamma")

just fine. But I haven't done much testing.

Peter Ehlers

Peter Dalgaard wrote:
> P Ehlers <[EMAIL PROTECTED]> writes:
> 
> 
>>Gregor,
>>
>>  fitdistr(otm, "gamma", method="L-BFGS-B")
>>
>>works for me (on WinXP). Or you could specify "lower = 0".
> 
> 
> The really odd thing is that it even works with
> 
> 
>> fitdistr(otm, "gamma",lower=-Inf)
> 
>  shape rate
>   1.03081094   0.18924370
>  (0.09055117) (0.02117350)
> 
> or even
> 
> 
>> fitdistr(otm, "gamma",upper=Inf)
> 
>  shape rate
>   1.03081094   0.18924370
>  (0.09055117) (0.02117350)
> 
> 
> Also
> 
> 
>> fitdistr(otm, "gamma",control=list(parscale=c(.1,.1)))
> 
>  shape rate
>   1.03079500   0.18923897
>  (0.09055106) (0.02117363)
> 
> and quite amusingly:
> 
> 
> 
>> fitdistr(otm, "gamma",method="BFGS",lower=0)
> 
>  shape rate
>   1.03081096   0.18924371
>  (0.09055118) (0.02117350)
> Warning message:
> bounds can only be used with method L-BFGS-B in: optim(x = 
> c(0.059610966029577, 0.0591496321922168, 0.14, 0.18,
> 
>> fitdistr(otm, "gamma",method="CG",lower=0)
> 
>  shape rate
>   1.03081096   0.18924371
>  (0.09055118) (0.02117350)
> Warning message:
> bounds can only be used with method L-BFGS-B in: optim(x = 
> c(0.059610966029577, 0.0591496321922168, 0.14, 0.18,
> 
> whereas the same calls without the dysfunctional lower= gives the
> warning about `shape` needing to be positive.
> 
> This probably all indicates that something inside optim() is broken.
> 
> 
>  
> 
>>I no longer have 2.1.0 running, so I don't know why this
>>wasn't needed in 2.1.0.
>>
>>"R version 2.2.0, 2005-10-24"
>>MASS version: 7.2-20
>>
>>-peter
>>
>>Gorjanc Gregor wrote:
>>
>>>Dear R developers,
>>>
>>>I have encountered strange behaviour of fitdistr for gamma in recent R
>>>build i.e. 2.2.0. I have attached the code for data at the end of this mail
>>>so you can reproduce the problem. In short, I am able to run fitdistr under
>>>2.1.0 without problems, while I get the following error under 2.2.0
>>>(Version 2.2.0 Patched (2005-11-15 r36348))
>>>
>>>
>>>
fitdistr(otm, "gamma")
>>>
>>>Error in densfun(x, parm[1], parm[2], ...) : 
>>>'shape' must be strictly positive
>>>
>>>The results on 2.1.1 (Version 2.1.1 (2005-06-20)) are
>>>
>>>
>>>
fitdistr(otm, "gamma")
>>>
>>>shape   rate  
>>>  1.030667   0.189177 
>>> (0.090537) (0.021166)
>>>
>>>Platform: Windows XP
>>>
>>>Thank you in advance for your effort on this remarkable tool!
>>>
>>>Here is the data for above problem/results:
>>>
>>>"otm" <-
>>>c(0.059610966029577, 0.0591496321922168, 0.14, 0.18, 0.24, 0.25, 
>>>0.270071982912719, 0.270758049933706, 0.269911804412492, 0.280138451903593, 
>>>0.279787947586738, 0.279429937571753, 0.3, 0.320746235495899, 
>>>0.319553311037365, 0.51, 0.54, 0.56, 0.6, 0.609812622915953, 
>>>0.609198293855879, 0.64, 0.69, 0.74, 0.76, 0.770972826186568, 
>>>0.769288654833566, 0.78, 0.789181584270671, 0.78991363293305, 
>>>0.8, 0.89, 0.900691718998831, 0.8991656800583, 0.92, 0.93, 0.94, 
>>>1.01, 1.02, 1.13, 1.18, 1.26, 1.29, 1.33, 1.42, 1.43, 1.47, 
>>>1.47940529614314, 
>>>1.47920716832764, 1.6, 1.61, 1.63, 1.68938231960637, 1.6894849291523, 
>>>1.82, 1.88088044053270, 1.8792804789003, 1.89, 1.92, 2, 2.04, 
>>>2.07, 2.12, 2.17, 2.18, 2.22, 2.23, 2.27, 2.28, 2.3, 2.32092240267433, 
>>>2.31912300181622, 2.38, 2.39, 2.43, 2.46, 2.51, 2.52, 2.55, 2.56, 
>>>2.61, 2.66091404781397, 2.6595832825806, 2.67, 2.7, 2.77, 2.8, 
>>>2.81, 2.86, 2.87, 2.93, 3.01, 3.05, 3.14, 3.15, 3.17, 3.18, 3.24, 
>>>3.26, 3.33, 3.44, 3.45, 3.52, 3.55, 3.63, 3.73, 3.9, 4, 4.01, 
>>>4.04, 4.13, 4.15934497380769, 4.16094719917513, 4.3, 4.33, 4.34, 
>>>4.66, 4.76, 4.82, 4.83, 4.89, 4.92, 5.06, 5.14, 5.16, 5.26, 5.31, 
>>>5.36, 5.48, 5.66, 5.79, 5.8, 5.85, 5.87, 5.92952534468565, 5.92962284128508, 
>>>6.04, 6.11, 6.13, 6.16, 6.19, 6.42, 6.66, 6.69, 7.11, 7.16, 7.29, 
>>>7.3, 7.31, 7.33, 7.72, 7.82, 7.87, 7.91, 8.01, 8.17, 8.45, 8.49, 
>>>8.73, 8.86, 8.95, 9, 9.05, 9.13, 9.22, 9.52, 9.82, 9.88, 9.91, 
>>>9.99, 10.03, 10.4, 10.59, 10.83, 11.06, 11.64, 11.85, 12.02, 
>>>12.4, 12.64, 12.96, 13.44, 14.06, 14.07, 14.37, 15.4, 15.6, 15.92, 
>>>16.23, 16.6, 16.97, 17.06, 17.8, 18.69, 18.73, 19.2, 19.51, 19.54, 
>>>20.57, 21.05, 22.23, 27.02)
>>>
>>>Lep pozdrav / With regards,
>>>Gregor Gorjanc
>>>
>>>--
>>>University of Ljubljana
>>>Biotechnical FacultyURI: http://www.bfro.uni-lj.si/MR/ggorjan
>>>Zootechnical Department mail: gregor.gorjanc  bfro.uni-lj.si
>>>Groblje 3   tel: +386 (0)1 72 17 861
>>>SI-1230 Domzale fax: +386 (0)1 72 17 888
>>>Slovenia, Europe
>>>-

Re: [Rd] Matrix (PR#8321)

2005-11-17 Thread P Ehlers
Assuming you're on Windows (you didn't say), it looks
like the PACKAGES file in /.../contrib/2.2/ has two
entries for Matrix. Perhaps that's the problem.

Peter


[EMAIL PROTECTED] wrote:

> It appears to me that the new version of the package Matrix will not load to
> R-2.2.0.
> 
> Respectfully,
> 
> Frank Lawrence
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Ehlers
Department of Mathematics and Statistics
University of Calgary, 2500 University Dr. NW
Calgary, Alberta  T2N 1N4, CANADA

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


[Rd] problem with \eqn (PR#8322)

2005-11-17 Thread ross
Full_Name: Ross Boylan
Version: 2.2.0
OS: Linux
Submission from: (NULL) (65.175.48.58)


  \eqn{{\bf\beta}_j}{b(j)} in my .Rd file produces this error

! Missing $ inserted.
 
$
l.7 \eqn{{\bf\beta}_j}{\bf\beta}_
 jnormal-bracket5bracket-normal{b(j)}
--
! Missing $ inserted.
 
$
l.16 
 
--
! Missing } inserted.
 
}
l.16 
 
--
! Extra }, or forgotten \endgroup.
\par ...m [EMAIL PROTECTED] {\@@par }\fi \else {\@@par }
  \fi 
l.16 
---
I think this is a bug.  A query to r-help has produced no response.

Note that \bf\beta seems to have been doubled.

Currently on R 2.2.0.final-4 on Debian.  I think I've seen this with
many prior versions too.

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


Re: [Rd] Matrix (PR#8321)

2005-11-17 Thread Cougar Lawrence
Thanks for the reply.  I am using windows.  I tried both packages.  The
directions under Matrix indicate that package 99.2 is current.  It is the
one that will not load.

Respectfully,
 
Frank Lawrence


-Original Message-
From: P Ehlers [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 16:53
To: [EMAIL PROTECTED]
Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED]
Subject: Re: [Rd] Matrix (PR#8321)


Assuming you're on Windows (you didn't say), it looks
like the PACKAGES file in /.../contrib/2.2/ has two
entries for Matrix. Perhaps that's the problem.

Peter


[EMAIL PROTECTED] wrote:

> It appears to me that the new version of the package Matrix will not 
> load to R-2.2.0.
> 
> Respectfully,
> 
> Frank Lawrence
> 
> __
> R-devel@r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Ehlers
Department of Mathematics and Statistics
University of Calgary, 2500 University Dr. NW
Calgary, Alberta  T2N 1N4, CANADA

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


Re: [Rd] Matrix (PR#8321)

2005-11-17 Thread P Ehlers
Actually, my guess about PACKAGES was wrong. I just removed Matrix
and re-installed Matrix_0.99-2 (Rgui: Packages menu) from CRAN and
had no problems.

You'll have to be more explicit about "will not load".

Peter


Cougar Lawrence wrote:

> Thanks for the reply.  I am using windows.  I tried both packages.  The
> directions under Matrix indicate that package 99.2 is current.  It is the
> one that will not load.
> 
> Respectfully,
>  
> Frank Lawrence
> 
> 
> -Original Message-
> From: P Ehlers [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 17, 2005 16:53
> To: [EMAIL PROTECTED]
> Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED]
> Subject: Re: [Rd] Matrix (PR#8321)
> 
> 
> Assuming you're on Windows (you didn't say), it looks
> like the PACKAGES file in /.../contrib/2.2/ has two
> entries for Matrix. Perhaps that's the problem.
> 
> Peter
> 
> 
> [EMAIL PROTECTED] wrote:
> 
> 
>>It appears to me that the new version of the package Matrix will not 
>>load to R-2.2.0.
>>
>>Respectfully,
>>
>>Frank Lawrence
>>
>>__
>>R-devel@r-project.org mailing list 
>>https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Peter Ehlers
Department of Mathematics and Statistics
University of Calgary, 2500 University Dr. NW

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


[Rd] PR#8282

2005-11-17 Thread pdbailey
When an attempt was made to reproduce this on other platforms,
how high was the index? For one of my Apples, I need to take
it very high, maybe 100? Sorry, I guess I edited that part
out.

--
zi <- vector()
for(i in 1:100) {
  zi[i] <- c(1,2)
}
zi[,1]
--

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


[Rd] R-exts.texi in SVN version 36380

2005-11-17 Thread Berwin A Turlach
G'day all,

after issuing `svn up' on my machine this morning, I noticed that
`make info' choked on R-exts.texi.  Below is a patch that seems to
solve the problem.  BTW, while `make info' runs now, I still get the
following warning:

/usr/bin/makeinfo --enable-encoding -D UseExternalXrefs 
-I/opt/src/R-devel-src/doc/manual /opt/src/R-devel-src/doc/manual/R-exts.texi
/opt/src/R-devel-src/doc/manual/R-exts.texi:1219: warning: @strong{Note...} 
produces a spurious cross-reference in Info; reword to avoid that.

No idea how to fix that, my texinfo knowledge is not good enough. :)

Actually, I am not clear on the following two questions:
1) Should such patches be sent to r-devel, r-bugs or both?
2) Should such patches be sent at all, or should users just wait till
   R-core fixes it itself?

Cheers,

Berwin


Index: doc/manual/R-exts.texi
===
--- doc/manual/R-exts.texi  (revision 36380)
+++ doc/manual/R-exts.texi  (working copy)
@@ -1715,24 +1715,24 @@
 @code{myDLL}:
 
 @example
-R_CMethodDef cMethods[] = {
-   {"foo", &foo, 4, {REALSXP, INTSXP, STRSXP, LGLSXP}},
-   {"bar_sym", &bar, 0},
-   {NULL, NULL, 0}
-};
+R_CMethodDef cMethods[] = @{
+   @{"foo", &foo, 4, @{REALSXP, INTSXP, STRSXP, [EMAIL PROTECTED]@},
+   @{"bar_sym", &bar, [EMAIL PROTECTED],
+   @{NULL, NULL, [EMAIL PROTECTED]
[EMAIL PROTECTED];
 
-R_CallMethodDef callMethods[] = {
-   {"R_call_sym", &R_call, 4},
-   {"R_version_sym", &R_version, 0},
-   {NULL, NULL, 0}
-};
[EMAIL PROTECTED]
+R_CallMethodDef callMethods[] = @{
+   @{"R_call_sym", &R_call, [EMAIL PROTECTED],
+   @{"R_version_sym", &R_version, [EMAIL PROTECTED],
+   @{NULL, NULL, [EMAIL PROTECTED]
[EMAIL PROTECTED];
[EMAIL PROTECTED] example
 
 Then, the directive in the @file{NAMESPACE} file
 
 @example
 useDynLib(myDLL, .registration = TRUE)
[EMAIL PROTECTED]
[EMAIL PROTECTED] example
 
 causes the DLL to be loaded and also for the R variables @code{foo},
 @code{bar_sym}, @code{R_call_sym} and @code{R_version_sym} to be
@@ -1748,10 +1748,10 @@
 @example
 R_version =
 function()
-{
[EMAIL PROTECTED]
   .Call(R_version_sym)
-}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] example
 
 
 More information about this symbol lookup, along with some approaches
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Gregor Gorjanc
Thanks to both Peters for involvment. I will add argument for method to
be used in optim.

-- 
Lep pozdrav / With regards,
Gregor Gorjanc

--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3   mail: gregor.gorjanc  bfro.uni-lj.si

SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europefax: +386 (0)1 72 17 888

--
"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.

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


Re: [Rd] R-exts.texi in SVN version 36380

2005-11-17 Thread Prof Brian Ripley
On Fri, 18 Nov 2005, Berwin A Turlach wrote:

> G'day all,
>
> after issuing `svn up' on my machine this morning, I noticed that
> `make info' choked on R-exts.texi.

Actually 'make' chokes.

> Below is a patch that seems to
> solve the problem.  BTW, while `make info' runs now, I still get the
> following warning:
>
> /usr/bin/makeinfo --enable-encoding -D UseExternalXrefs 
> -I/opt/src/R-devel-src/doc/manual /opt/src/R-devel-src/doc/manual/R-exts.texi
> /opt/src/R-devel-src/doc/manual/R-exts.texi:1219: warning: @strong{Note...} 
> produces a spurious cross-reference in Info; reword to avoid that.

Thank you for the report.  The last warning is long-standing and has been 
not thought worth fixing as very few (if any) Windows users use info.
The fix is simple though

@quotation Note to Windows users
@code{R CMD check} and @code{R CMD build} work well under Windows



> No idea how to fix that, my texinfo knowledge is not good enough. :)
>
> Actually, I am not clear on the following two questions:
> 1) Should such patches be sent to r-devel, r-bugs or both?
> 2) Should such patches be sent at all, or should users just wait till
>   R-core fixes it itself?

If they are this obvious you can just do nothing if you prefer.  We do 
expect people to run 'make all check' before committing and deal with any 
new warnings/errors, and when (as here) people omit to do so it gets 
spotted and fixed within hours.

There were other markup problems, e.g. we use @R{} for R.

-- 
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#8282

2005-11-17 Thread ripley
The attempt made was to reproduce exactly the example you reported (of 
course).

Notice that this is incorrect usage, as you are trying to replace one 
element by 2.  We have since found another example of this, and fixed it, 
but it is nothing new in 2.2.0.  Please try a current version of R 
(R-patched or R-devel).  The relevant NEWS item is

 o  Subassignment of a vector which increased the length of the
vector _and_ had the wrong length of replacement could
occasionally segfault.  (This has been there since at least
mid 1997.)

It is poor practice to increase the size of a vector in this way rather
than pre-allocate.  Perhaps it has persisted so long because it is a user 
error in poor practice that can need 100 repeats to reproduce.


On Fri, 18 Nov 2005 [EMAIL PROTECTED] wrote:

> When an attempt was made to reproduce this on other platforms,
> how high was the index? For one of my Apples, I need to take
> it very high, maybe 100? Sorry, I guess I edited that part
> out.
>
> --
> zi <- vector()
> for(i in 1:100) {
>  zi[i] <- c(1,2)
> }
> zi[,1]
> --
>
> __
> 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