Re: [Rd] Trouble with ifelse and if statement (PR#7962)

2005-06-21 Thread MSchwartz
On Wed, 2005-06-22 at 04:46 +0200, [EMAIL PROTECTED] wrote:
> Full_Name: Woolton Lee
> Version: 2.1
> OS: windows
> Submission from: (NULL) (128.118.224.46)
> 
> 
> I did the following ('g' and 'h' are both numeric vectors)
> > i <- abs(g-h)
> creating a vector 'i' with values,
> > i
>  [1] 0.08 0.00 0.33 0.00 0.00 0.00 0.00 0.33 0.00 0.00 0.08 0.08 0.20 0.00 
> 0.13
> 
> Now, I want to create a new vector =1 whenever 'i' = 0.33 and =0 otherwise.  I
> use the 'ifelse' function to do this but when I do, I find
> > ifelse(i==0.33,1,0)
>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 
> even though the third and eighth elements of 'i' clearly equal 0.33.  Unless I
> have missed something, 'ifelse' should return a vector that looks like,
> [1] 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
> 
> When I try 0.13 I get a correct result
> > ifelse(i==0.13,1,0)
>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
> 
> but when I try 0.08 or 0.2 I find a similar problem,
> > ifelse(i==0.08,1,0)
>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> > ifelse(i==0.20,1,0)
>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> > ifelse(i==0.2,1,0)
>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 
> Can you explain what is happening?  Why is R incorretly returning a vector 
> that
> does not reflect the values in 'i'?  Is this due to a malfunction in R or 
> have I
> missed something?
> 
> Thank you for your help.
> 
> Woolton

This is not a bug and yes you have missed something.

Read R FAQ 7.31 Why doesn't R think these numbers are equal?

More information is also available here:

http://grouper.ieee.org/groups/754/


One possible solution:

> i
 [1] 0.08 0.00 0.33 0.00 0.00 0.00 0.00 0.33 0.00 0.00 0.08 0.08 0.20
[14] 0.00 0.13

> ifelse(sapply(i, function(x) all.equal(x, 0.33)) == "TRUE", 1, 0)
 [1] 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0

> ifelse(sapply(i, function(x) all.equal(x, 0.08)) == "TRUE", 1, 0)
 [1] 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0

> ifelse(sapply(i, function(x) all.equal(x, 0.2)) == "TRUE", 1, 0)
 [1] 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0


Marc Schwartz

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


Re: [Rd] R crashes for large formulas in lm() (PR#8180)

2005-10-05 Thread MSchwartz
On Wed, 2005-10-05 at 14:12 +0200, [EMAIL PROTECTED]
wrote:
> Prof Brian Ripley wrote:
> 
> > On Wed, 5 Oct 2005 [EMAIL PROTECTED] wrote:
> > 
> > 
> >>Full_Name: Hallgeir Grinde
> >>Version: 2.1.1
> >>OS: Windows XP
> >>Submission from: (NULL) (144.127.1.1)
> >>
> >>
> >>While using lm(y~(x*z*c*...*v)^2) R crashes/closes if the numbers of 
> >>variables
> >>are at least 8.
> > 
> > 
> > OK, let's try to reproduce that:
> > 
> > 
> >>x1 <- runif(1000)
> >>x2 <- runif(1000)
> >>x3 <- runif(1000)
> >>x4 <- runif(1000)
> >>x5 <- runif(1000)
> >>x6 <- runif(1000)
> >>x7 <- runif(1000)
> >>x8 <- runif(1000)
> >>y <- rnorm(1000)
> >>fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2)
> > 
> > 
> > No crash, a quite reasonable fit.
> > 
> > Can we please have a reproducible example, as we do ask?
> > 
> 
> Hmm, crashes for me as well with R-2.1.1 and R-2.2.0 beta (2005-09-27 
> r35682M) on WinNT 4.0, SP6.
> 
> 
> Let's make it reproducible:
> 
> set.seed(123)
> x1 <- runif(1000)
> x2 <- runif(1000)
> x3 <- runif(1000)
> x4 <- runif(1000)
> x5 <- runif(1000)
> x6 <- runif(1000)
> x7 <- runif(1000)
> x8 <- runif(1000)
> y <- rnorm(1000)
> fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2)


No problems on FC4 using Version 2.1.1 Patched (2005-10-04):

> summary(fit)

Call:
lm(formula = y ~ (x1 * x2 * x3 * x4 * x5 * x6 * x7 * x8)^2)

Residuals:
  Min1QMedian3Q   Max
-3.315028 -0.532338  0.005368  0.548012  2.957057

Coefficients:
  Estimate Std. Error t value Pr(>|t|)
(Intercept)16.246015.7375   1.032   0.3023
x1-10.031029.7557  -0.337   0.7361
x2-26.267824.0473  -1.092   0.2750
x3-42.571332.9481  -1.292   0.1967

...

x1:x2:x4:x5:x6:x7:x8 -339.8099  1024.8652  -0.332   0.7403
x1:x3:x4:x5:x6:x7:x8 -833.5375  1095.1153  -0.761   0.4468
x2:x3:x4:x5:x6:x7:x8 -546.0684  1050.8648  -0.520   0.6035
x1:x2:x3:x4:x5:x6:x7:x8   533.8390  1861.5862   0.287   0.7744
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ 
’ 1

Residual standard error: 1.001 on 744 degrees of freedom
Multiple R-Squared: 0.2541, Adjusted R-squared: -0.001499
F-statistic: 0.9941 on 255 and 744 DF,  p-value: 0.5161


Is this perhaps a RAM issue? I have 2 Gb.

Marc

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


Re: [Rd] cor doesn't accept na.rm? (PR#8193)

2005-10-09 Thread MSchwartz
On Mon, 2005-10-10 at 01:49 +0200, [EMAIL PROTECTED] wrote:
> Full_Name: Paul Bailey
> Version: 2.1.1
> OS: OS X 10.3
> Submission from: (NULL) (68.252.250.144)
> 
> 
> ?cor 
> [tells me that it has a na.rm variable]
> 
> > cor(frame2[1,],frame2[2,],na.rm=T)
> Error in cor(frame2[1, ], frame2[2, ], na.rm = T) : 
>   unused argument(s) (na.rm ...)
> 
> hmm.


Pray tell, where in ?cor do you see that cor() has a 'na.rm' argument?

cor() has a 'use' argument, which determines how missing values are
handled.

Please read ?cor more carefully before filing a bug report, which now
has to be manually handled by a member of R Core.

Marc Schwartz

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


Re: [Rd] Rgnome depends on obsolete components libglade/libxml (PR#8248)

2005-10-24 Thread mschwartz
On Mon, 2005-10-24 at 17:14 +0100, Hin-Tak Leung wrote:
> Peter Dalgaard wrote:
> > [EMAIL PROTECTED] writes:
> > 
> > 
> >>Full_Name: Hin-Tak Leung
> >>Version: R 2.2.0
> >>OS: x86 linux
> >>Submission from: (NULL) (131.111.126.242)
> >>
> >>
> >>Rgnome depends libglade 0.x and libxml 1.x .
> >>
> >>They are no longer shipped with Redhat EL4.
> >>(I know they are still in fedora core 4).
> >>
> >>Just a wish-list.
> > 
> > 
> > But what is the wish? 
> > 
> > You mean get it upgraded to xml2 and glade2? Patches would likely be
> > accepted... 
> > 
> 
> :-). libglade went from 0.17 to 1.99 then 2.x, but the current Rgnome 
> code depends on some of <0.17-specific stuff.
> 
> Already tried against libglade 2 - not trivial. It probably also 
> requires changing to gtk2 also...
> 
> Just like to have it in the distant TODO list, and not forgotten...
> 
> Hin-Tak Leung


According to the R Admin manual (2.2.0) on page 34:

"This interface is experimental and incomplete. The console offers a
basic command line editing and history mechanism, along with tool and
button bars that give a point-and-click console to some R commands. Many
of the features of the console are currently stubs, and the console is
**no longer under development**: it has been kept available as an
example of adding a front-end to R."


This language (my emphasis added) would suggest that a TODO list does
not (or should not) exist...so Peter's suggestion would seem spot on.

HTH,

Marc Schwartz

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


Re: [Rd] Rgnome depends on obsolete components libglade/libxml (PR#8249)

2005-10-24 Thread mschwartz
On Mon, 2005-10-24 at 19:15 +0100, Hin-Tak Leung wrote:
> Marc Schwartz (via MN) wrote:
> > On Mon, 2005-10-24 at 17:14 +0100, Hin-Tak Leung wrote:
> > 
> >>Peter Dalgaard wrote:
> 
> >>>You mean get it upgraded to xml2 and glade2? Patches would likely be
> >>>accepted... 
> 
> > 
> > According to the R Admin manual (2.2.0) on page 34:
> > 
> > "This interface is experimental and incomplete. The console offers a
> > basic command line editing and history mechanism, along with tool and
> > button bars that give a point-and-click console to some R commands. Many
> > of the features of the console are currently stubs, and the console is
> > **no longer under development**: it has been kept available as an
> > example of adding a front-end to R."
> > 
> > 
> > This language (my emphasis added) would suggest that a TODO list does
> > not (or should not) exist...so Peter's suggestion would seem spot on.
> 
> Peter's suggestion is spot on ("patches would likely be accepted"), 
> yours suggestion, on the other hand...
> 
> You do understand that, as an *example*, studying it and/or trying
> to learn to modify it is useful for future R improvements in
> similiar areas, and you have just managed to discourage a few 
> individuals from studying a complete if out-dated example.
> (yes, I have spent a few hours modifying the code for glade2).

Respectfully, I would disagree with your characterization of my reply. 

I simply pointed out (as it states in the manual) that there should be
no expectation of further development from R Core and as a result no
expectation of an _officially_ maintained, much less reviewed, TODO list
for the package.

It plainly indicates that it has been left as an example for others,
with no implication that one should be dissuaded from using it as such.
It was done (as others have characterized in prior threads) as a "proof
of concept", not as a fully functioning GUI.

Your reporting a RFE to the R Bug Tracking System would imply an
expectation that the request be officially tracked by R Core in some
fashion (even if just to close out the report) and/or perhaps be acted
upon at some future date by _somebody other than yourself_.

Peter's words were direct in that patches would _likely_ be accepted,
but at the same time are not being actively solicited. A substantive
difference, given that a patch made available for an official R package,
would still take some effort on the part of R Core to implement and
test.

It seems to me that yet another option here would be for you to offer to
take over as the package maintainer and bring it up to date to Gtk2, if
you are so inclined. The package has been made available under the GPL,
thus there is nothing precluding you from doing so and even creating a
new CRAN package based upon it.

The same approach is available for the orphaned packages on CRAN, so
this is nothing new.

This brings us full circle to the whole GUI discussion taking place and
so I'll leave it for that thread.

> A TODO list doesn't mean that it has to be done by the R foundation
> - if you can identify small bug do-able areas that needs improvement,
> some individual might come along just for the fun/fame, and in the
> end, the R foundation gains an outsider who is knowledgeable about
> embedding R. e.g. some college professor might assign that as a
> final year computer programming project, or some student might pick
> it as one. Is it such a bad thing to have a list of "inadequacies
> but nowhere important enough to get fixed any time soon" issues?

I think that the question is more, what TODO list, where and maintained
by whom?

In this case, with a package that is no longer being actively maintained
by R Core, it may very well be appropriate to have a separate TODO list
or even Wiki someplace to address issues where participation by useRs is
being actively solicited. The R-sig-* mailing lists would certainly be
one place for such focused activities.

> The possible gain - somebody decides to take it up, and move forward,
> and in so doing, learns some R internals - is it such a bad thing?

Not bad at all. It is more a question of what is the appropriate
mechanism to facilitate such activity, in a fashion that does not have
an impact on R Core, unless it is truly required.

Best regards,

Marc

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


Re: [Rd] package unlisted (PR#8410)

2005-12-18 Thread MSchwartz
On Sun, 2005-12-18 at 15:31 +0100, [EMAIL PROTECTED] wrote:
> Full_Name: Cesar Henrique Torres
> Version: 2.2.0
> OS: winXP-pro
> Submission from: (NULL) (201.1.196.50)
> 
> 
> Hi developer's!
> 
> I'd like to know were gtools package is, because in the link below it isn't:
> http://cran.r-project.org/bin/windows/contrib/r-release/
> This package is used in gplots and I'm trying to make a balloonplot.
> 
> Thanks a lot,
> Cesar Torres.

Please do not post bugs on Contributed packages to the main R-bugs repo.
This now requires intervention by a member of R Core, none of whom are
in a position to resolve the problem. You should contact the package
maintainer instead. In this case it is Nitin Jain
([EMAIL PROTECTED]) who I have cc'd here.

The problem here is that the current version of gtools for Windows is
not passing the required checks before it can be allowed to be included
in the main CRAN repo.  This can be seen here:

http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

On the above, scroll down to gtools and you will see links for the
following error log and interim resolution:

http://cran.r-project.org/bin/windows/contrib/2.2/check/gtools-check.log

http://cran.r-project.org/bin/windows/contrib/2.2/last/ReadMe


This brings you to:

http://cran.r-project.org/bin/windows/contrib/2.2/last/

where you will find the last version of gtools for Windows that passed
the required checks. This will need to be manually downloaded and may or
may not work in the presence of the other related packages given the
potential for version related conflicts. I suspect Nitin will have more
definitive comments.

HTH,

Marc Schwartz

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


Re: [Rd] (Debian Bug 344248): R segfaults when pressing Delete (PR#8421)

2005-12-21 Thread MSchwartz
On Wed, 2005-12-21 at 15:00 +0100, [EMAIL PROTECTED] wrote:
> --CE+1k2dSO48ffgeK
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> Resend after type in mailheader.  I have the bug on my system with
> yesterday's R 2.2.1. A library mismatch is still a likely cause.
> 
> Dirk



> On 21 December 2005 at 01:50, Ethan Glasser-Camp wrote:
> | Package: r-base-core
> | Version: 2.2.1-1
> | 
> | When I run R, I can cause a crash by simply pressing Delete. Backspace works
> | fine, and I can use ESS without problems.
> 
> Uh-oh.
> 
> | [EMAIL PROTECTED]:~$ R
> | 
> | R : Copyright 2005, The R Foundation for Statistical Computing
> | Version 2.2.1  (2005-12-20 r36812)
> | ISBN 3-900051-07-0
> | 
> | R is free software and comes with ABSOLUTELY NO WARRANTY.
> | You are welcome to redistribute it under certain conditions.
> | Type 'license()' or 'licence()' for distribution details.
> | 
> | R is a collaborative project with many contributors.
> | Type 'contributors()' for more information and
> | 'citation()' on how to cite R or R packages in publications.
> | 
> | Type 'demo()' for some demos, 'help()' for on-line help, or
> | 'help.start()' for an HTML browser interface to help.
> | Type 'q()' to quit R.
> | 
> | [Previously saved workspace restored]
> 
> Could you (temporarily) remove that file?
> 
> | > Segmentation fault
> | [EMAIL PROTECTED]:~$
> 
> That said, I just tried this where I seemed to have no ~/.RData file.
> Pressing  leads to a SegFault.
> 
> I will pass this on R Core. 
> 
> Thanks for the bug report.
>  
> Dirk
> 
> | 
> | 
> | Here is a list of packages I thought might be relevant:
> | 
> | $ dpkg -l r-* libreadline*
> | Desired=Unknown/Install/Remove/Purge/Hold
> | | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
> | |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
> uppercase=bad)
> | ||/ Name   VersionDescription
> | 
> +++-==-==-
> | un  libreadline-co  (no description available)
> | un  libreadline-de  (no description available)
> | ii  libreadline-ru 1.8.3+1.8.4pre Readline interface for Ruby 1.8
> | ii  libreadline4   4.3-18 GNU readline and history libraries, 
> run-time
> | un  libreadline4-d  (no description available)
> | ii  libreadline5   5.1-1  GNU readline and history libraries, 
> run-time
> | ii  libreadline5-d 5.1-1  GNU readline and history libraries, 
> developm
> | ii  r-base 2.2.1-1GNU R statistical computing language and 
> env
> | ii  r-base-core2.2.1-1GNU R core of statistical computing 
> language
> | un  r-base-dev  (no description available)
> | ii  r-base-html2.2.1-1GNU R html docs for statistical computing 
> sy
> | ii  r-base-latex   2.2.1-1GNU R LaTeX docs for statistical 
> computing s
> | ii  r-cran-boot1.2.24-1   GNU R package for bootstrapping functions 
> fr
> | ii  r-cran-cluster 1.10.2-1   GNU R package for cluster analysis by 
> Rousse
> | ii  r-cran-foreign 0.8.12-1   GNU R package to read/write data from 
> other
> | ii  r-cran-gdata   2.1.2-1GNU R package with data manipulation 
> tools b
> | ii  r-cran-gplots  2.2.0-1GNU R package with tools for plotting 
> data b
> | un  r-cran-gregmis  (no description available)
> | ii  r-cran-gtools  2.2.2-1GNU R package with R programming tools by 
> Gr
> | ii  r-cran-kernsmo 2.22.15-1  GNU R package for kernel smoothing and 
> densi
> | ii  r-cran-lattice 0.12-11.1-1GNU R package for 'Trellis' graphics
> | ii  r-cran-lattice 0.1.1-1GNU R package of additional graphical 
> displa
> | ii  r-cran-mgcv1.3-12-1   GNU R package for multiple parameter 
> smoothi
> | ii  r-cran-misc3d  0.3-1-1GNU R collection of 3d plot functions and 
> rg
> | ii  r-cran-nlme3.1.62-1   GNU R package for (non-)linear mixed 
> effects
> | ii  r-cran-quadpro 1.4.7-2GNU R package for solving quadratic 
> programm
> | ii  r-cran-rgl 0.65-1 GNU R package for three-dimensional 
> visualis
> | ii  r-cran-rpart   3.1.27-1   GNU R package for recursive partitioning 
> and
> | ii  r-cran-surviva 2.20-1 GNU R package for survival analysis
> | un  r-cran-tkrplot  (no description available)
> | ii  r-cran-vr  7.2.23-1   GNU R package accompanying the Venables 
> and
> | un  r-doc-html  (no description available)
> | ii  r-doc-info 2.2.1-1GNU R info manuals statistical computing 
> sys
> | un  r-doc-pdf   (no description available)
> | un  r-mathlib   (no description available)
> | ii  r-recommended  2.2.1-1GNU R collection of recommended packages 
> [me
> | 
> | 
> | Please let me know if there is anything else I can do to help.
> | 
> | Ethan


FWIW, I cannot replicate the segfault on FC4, with:

  Versi

Re: [Rd] sub returns garbage (PR#8687)

2006-03-16 Thread mschwartz
On Thu, 2006-03-16 at 22:28 +0100, [EMAIL PROTECTED] wrote:
> Full_Name: Todd Bailey
> Version: 2.1
> OS: Mac OS-X 10.4.3
> Submission from: (NULL) (87.112.79.124)
> 
> 
> sub returns garbage in some strings when replacing something with nothing and
> fixed=TRUE.  For example:
> 
> > a=c('hello','hello'); sub('lo','',a,fixed=TRUE)
> [1] "hel" "hel\0\0"
> > a=c('hello','hello'); sub('lo','',a,fixed=FALSE)
> [1] "hel" "hel"


This has been fixed in R Patched. From NEWS:

 o  sub(fixed = TRUE) could get wrong the length of the character
string of elements of the result after the first.


>From my installation:

> a <- c('hello', 'hello'); sub('lo', '', a, fixed=TRUE)
[1] "hel" "hel"

> a <- c('hello', 'hello'); sub('lo', '', a, fixed=FALSE)
[1] "hel" "hel"


HTH,

Marc Schwartz

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


Re: [Rd] Installation oddity on Fedora Core 5 (PR#8814)

2006-04-27 Thread mschwartz
On Thu, 2006-04-27 at 18:10 +0200, [EMAIL PROTECTED] wrote:
> Hello guys:
> 
> I recently installed FC 5 linux and installed R from source. It installed
> fine, but there was an oddity that I want to report. Although I used
> 
> ./configure --prefix=/usr/local/R-2.3.0
> 
> make
> 
> it did not seem to recognize the prefix and went ahead and installed it in
> the source directory -- I usually ``tar xzf'' it to my home directory
> and run the installation scripts from there (as root) to install to
> /usr/local/R-2.3.0
> 
> 
> This procedure worked fine on earlier versions of Fedora as well as on
> debian and other distros. Wonder if this is a gcc-4.1 or GNU make issue.
> 
> Any feedback will be much appreciated.
> 
> Tx.
> 
> Sudipto.

This question may be akin to "Is the computer plugged in?", but did you
also run:

  make install

?

HTH,

Marc Schwartz

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


Re: [Rd] Installation oddity on Fedora Core 5 (PR#8814)

2006-04-27 Thread mschwartz
Hi Sudipto,

OK. Just for clarification:

'make' will simply do the compilation 'in place' in the source directory
tree. No installation is performed here.

'make install' will actually do the installation into the target folder.

You can do 'make install' without 'make' first, but I suspect a lot of
folks, myself included, will run 'make' first and then run 'make
check-all' before installing, to be sure that the compilation is intact
and passes all checks. 

In fact, I keep the output of 'make check-all' as part of my
installation validation documentation.

That being said, were there any error messages output during 'make
install' that might suggest a problem such as access permission issues
to the target directory or the like?

You might also want to run (I think this is correct):

 dmesg

in a console to look for any 'avc' error messages in the error log. This
would be related to FC5's use of SELinux and there have been very
significant SELinux related policy changes in FC5 that could feasibly be
involved here also.

HTH,

Marc


On Thu, 2006-04-27 at 11:25 -0500, Sudipto Banerjee wrote:
> Hi Marc:
> 
> Thanks for your reply. Yeah, I did do
> 
> make install
> 
> and also tried it with simply make (which is, I presume, enough to
> produce the executable scripts for R).
> 
> Please keep me posted.
> 
> Best,
> 
> S.

> 
> On Thu, 27 Apr 2006, Marc Schwartz (via MN) wrote:
> 
> > On Thu, 2006-04-27 at 18:10 +0200, [EMAIL PROTECTED] wrote:
> > > Hello guys:
> > >
> > > I recently installed FC 5 linux and installed R from source. It installed
> > > fine, but there was an oddity that I want to report. Although I used
> > >
> > > ./configure --prefix=/usr/local/R-2.3.0
> > >
> > > make
> > >
> > > it did not seem to recognize the prefix and went ahead and installed it in
> > > the source directory -- I usually ``tar xzf'' it to my home directory
> > > and run the installation scripts from there (as root) to install to
> > > /usr/local/R-2.3.0
> > >
> > >
> > > This procedure worked fine on earlier versions of Fedora as well as on
> > > debian and other distros. Wonder if this is a gcc-4.1 or GNU make issue.
> > >
> > > Any feedback will be much appreciated.
> > >
> > > Tx.
> > >
> > > Sudipto.
> >
> > This question may be akin to "Is the computer plugged in?", but did you
> > also run:
> >
> >   make install
> >
> > ?
> >
> > HTH,
> >
> > Marc Schwartz
> >

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


Re: [Rd] Possible issue with make install (PR#8883)

2006-05-19 Thread mschwartz
On Fri, 2006-05-19 at 22:44 +0200, [EMAIL PROTECTED] wrote:
> Full_Name: Stanley Hornyak
> Version: 2.3.0
> OS: Solaris 9
> Submission from: (NULL) (128.231.93.143)
> 
> 
> # make install
> installing doc ...
> installing doc/html ...
> installing doc/html/search ...
> installing doc/manual ...
> installing etc ...
> bash: -c: line 1: syntax error near unexpected token `;'
> *** Error code 2
> make: Fatal error: Command failed for target `install'
> Current working directory /home/hornyaks/Compiles/R/R-2.3.0/etc
> *** Error code 1
> make: Fatal error: Command failed for target `install'
> 
> 
> bash version is the Solaris default of 2.0.5.
> 
> Everything else seems to be OK.  I used straight borne shell during the
> configure and make.
> 
> 
> 
> Suggestions?

Either use r-patched, available from:

  ftp://ftp.stat.math.ethz.ch/Software/R/R-patched.tar.gz

or as Peter just noted on r-help, better yet and if willing, use
2.3.1Beta from:

  http://cran.r-project.org/src/base-prerelease/

This bug was reported previously and fixed:

  https://stat.ethz.ch/pipermail/r-devel/2006-May/037626.html

HTH,

Marc Schwartz

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


Re: [Rd] ssize_t not defined in sockconn.c (PR#8889)

2006-05-22 Thread MSchwartz
On Mon, 2006-05-22 at 14:18 +0200, [EMAIL PROTECTED] wrote:
> Problem:
> Build of R failed when compiling sockconn.c.  The problem seemed to be
> that ssize_t was not defined.
> 
> The following change in sock.h fixes the problem, though it's probably
> not fixed the _right_ way.
> 
> /* Following line changed by WTR (Cira) to overcome make problem.
> #if defined Win32 && !defined _SSIZE_T_
> typedef int ssize_t;
> #endif
> */
> typedef int ssize_t;
> 
> Thanks!
> Wade

This has been reported at least three times previously and has already
been fixed in 2.3.0patched and 2.3.1Beta by Prof. Ripley.

It is an issue with older Linux distro headers, having been confirmed on
both RH 8.0 and RH 9. Are you using either one of those, which you did
not indicate?  If so, please consider updating your system as well.

You can get the Beta tarball from:

  http://cran.r-project.org/src/base-prerelease/

Please review the list archives and existing bug reports before filing a
new one.

Marc Schwartz

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


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

2006-08-15 Thread mschwartz
On Tue, 2006-08-15 at 21:04 +0200, [EMAIL PROTECTED] wrote:
>
> ?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.

It is referenced in ?plot.default and ?plot.window, with the former
passing the 'asp' argument to the internal localWindow() function as a
wrapper to the latter.

In the HTML help page for ?axis, the 'asp' word in the quote above is a
live link to ?plot.window. 

That is not helpful of course if one is working within ESS.

Perhaps the See Also in ?axis should point to plot.default and
plot.window?

HTH,

Marc Schwartz

__
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 mschwartz
On Tue, 2006-08-15 at 22:13 +0200, [EMAIL PROTECTED] wrote:
> Thanks, Marc

Happy to help Rich.

> 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.

Over the years, more from "behavioral modification" than from instinct,
I look at ?plot.default when I forget defacto plot() arguments. Of
course, plot.default() is in the See Also in ?plot.

It is rare for me to look at ?plot.window, given the rarity in which I
call it directly.

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

Yeah. I enabled options(htmlhelp = TRUE) in my .Rprofile for the times
when I use R from the GNOME console, otherwise I am usually in ESS using
emacs 22 from CVS with the XFT patches.

I am not sure that I ever used the .CHM help when I used to run on
Windows, but presume that there is a hyperlink in that format to
parallel the live link in the HTML file.

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

Could be added as a \concept presumably in the .Rd files for
plot.default and plot.window. For example:

  \concept{asp aspect ratio}

> 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.

Indeed.

Regards,

Marc

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


Re: [Rd] Legend Title missing (PR#9226)

2006-09-14 Thread mschwartz
On Thu, 2006-09-14 at 20:35 +0200, [EMAIL PROTECTED]
wrote:
> Full_Name: Mark O. Kimball
> Version: 2.1
> OS: Linux
> Submission from: (NULL) (128.253.11.148)
> 
> 
> When log="x" is used in a plot() function, the legend "title" option creates
> room for the text but does not display it. When the log="x" function is
> disabled, the text is again displayed. The symbols and/or lines and legend 
> text
> is not affected.

>From NEWS for R 2.3.1:

 o  legend() with log axes would place the title in the wrong place.

Upgrade to the current version.

Please don't report bugs on obsolete versions.

HTH,

Marc Schwartz

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


Re: [Rd] mean relative differences from all.equal() (PR#9276)

2006-10-04 Thread MSchwartz
On Thu, 2006-10-05 at 03:10 +0200, [EMAIL PROTECTED] wrote:
> Full_Name: Brad Christoffersen
> Version: 2.3.1
> OS: Windows XP
> Submission from: (NULL) (128.196.193.132)
> 
> 
> Why is the difference between two numbers so different from the "mean relative
> difference" output from the all.equal() function?  Is this an artifact of the
> way R stores numerics?  I could not find this problem as I searched through 
> the
> submitted bugs. But I am brand new to R so I apologize if there is something
> obvious I'm missing here.
> 
> rm(list=ls(all=TRUE))  ## Remove all objects that could hinder w/ consistent
> output
> a <- 204
> b <- 203.9792
> all.equal(a,b)
> [1] "Mean relative  difference: 0.0001019608"
> a - b
> [1] 0.0208

Read the Details section of ?all.equal, which states:

Numerical comparisons for scale = NULL (the default) are done by first
computing the mean absolute difference of the two numerical vectors. If
this is smaller than tolerance or not finite, absolute differences are
used, otherwise relative differences scaled by the mean absolute
difference.

If scale is positive, absolute comparisons are made after scaling
(dividing) by scale


Thus on R version 2.4.0 (2006-10-03):

> all.equal(a, b, scale = 1)
[1] "Mean scaled  difference: 0.0208"


Please do not report doubts about behavior as bugs.  Simply post a query
on r-help first. If it is a bug, somebody will confirm it and you can
then report it as such.

BTW, time to upgrade...Go Wildcats!

HTH,

Marc Schwartz

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


Re: [Rd] mean relative differences from all.equal() (PR#9276)

2006-10-04 Thread MSchwartz
On Wed, 2006-10-04 at 20:22 -0500, Marc Schwartz wrote:
> On Thu, 2006-10-05 at 03:10 +0200, [EMAIL PROTECTED] wrote:
> > Full_Name: Brad Christoffersen
> > Version: 2.3.1
> > OS: Windows XP
> > Submission from: (NULL) (128.196.193.132)
> > 
> > 
> > Why is the difference between two numbers so different from the "mean 
> > relative
> > difference" output from the all.equal() function?  Is this an artifact of 
> > the
> > way R stores numerics?  I could not find this problem as I searched through 
> > the
> > submitted bugs. But I am brand new to R so I apologize if there is something
> > obvious I'm missing here.
> > 
> > rm(list=ls(all=TRUE))  ## Remove all objects that could hinder w/ consistent
> > output
> > a <- 204
> > b <- 203.9792
> > all.equal(a,b)
> > [1] "Mean relative  difference: 0.0001019608"
> > a - b
> > [1] 0.0208
> 
> Read the Details section of ?all.equal, which states:
> 
> Numerical comparisons for scale = NULL (the default) are done by first
> computing the mean absolute difference of the two numerical vectors. If
> this is smaller than tolerance or not finite, absolute differences are
> used, otherwise relative differences scaled by the mean absolute
> difference.
> 
> If scale is positive, absolute comparisons are made after scaling
> (dividing) by scale
> 
> 
> Thus on R version 2.4.0 (2006-10-03):
> 
> > all.equal(a, b, scale = 1)
> [1] "Mean scaled  difference: 0.0208"
> 
> 
> Please do not report doubts about behavior as bugs.  Simply post a query
> on r-help first. If it is a bug, somebody will confirm it and you can
> then report it as such.
> 
> BTW, time to upgrade...Go Wildcats!
> 
> HTH,
> 
> Marc Schwartz

[OFFLIST and PRIVATE]

Brad,

A couple of comments.

First, welcome to R. I hope that you enjoy it and find it of value.

If you are not used to open source software and communities (ie. Linux,
etc.), you will find that this community, unlike commercial paid support
forums, tends to be direct with respect to comments. Don't take it
personally.

Be aware that nobody is getting paid to support R. It is developed and
supported on a voluntary basis by a large body of folks, mainly those
known as "R Core". Some of them have quite literally risked their
academic careers and livelihood to facilitate R's existence.

You will, over time, get a flavor for the nature of the community and
the interchange that takes place. As a result of the voluntary nature of
the community, there is an a priori expectation that you will have put
forth reasonable efforts to avail yourself of the various support
resources before posting. Especially in the case of a bug report, as a
member of R Core has to manually manage the handling and resolution of
bug reports.

A good place to start is to review the R Posting Guide:

http://www.r-project.org/posting-guide.html

which covers many of these issues and how to go about getting support
via the various sources provided.

That all being said, you will find that R's support mechanisms and
resources are second to none and I would challenge any commercial
software vendor to provide a comparable level of support and expertise.

With respect to your specific question above and how the result is
obtained:

> (a - b) / a
[1] 0.0001019608

Here, 'a' is used as the scaling factor, since you only passed single
values. If these were 'vectors' of values, the scaling factor would be
impacted accordingly.

As a result of R's open source nature, you have access to all of the
source code that is R. You can download the source tarball (archive)
from one of the CRAN mirrors, if you so desire.

In this case, the actual function that is used is called
all.equal.numeric(). This is a consequence of how R uses 'dispatch
methods' after a call to a 'generic' function, such as all.equal(). If
you are not familiar with these terms, the available R documentation is
a good place to start, if you should decide to pursue moving into that
level of detail. If you have experience in other programming languages,
this may be second nature already.

In many cases, R's functions are written in R itself. Others are written
in FORTRAN and/or C that is compiled and linked to R via various calling
mechanisms. Since R is an interpreted language, you can have easy access
to many of the functions within the R console.

Thus, at the R command prompt, you can type:

> all.equal.numeric

[Note without the parens]

which will then display a representation of the function's source code,
enabling you to review how the function works. If you desire to become a
better R user/programmer, this approach provides a reasonable way to see
how functions are coded and to investigate algorithms and techniques.

I hope that the above is helpful.

Best regards,

Marc

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