Skip to content

`var' broken in 1.8.0 alpha (2003-09-15)

4 messages · Martin Maechler, Torsten Hothorn

#
Hi,

in last nights alpha version, `var' is broken:

R> var(rnorm(100))
Error in var(rnorm(100)) : 3 arguments passed to "cov" which requires 4.

which I suspect is due to recent changes to `cov'. The same is true for

R> cov(rnorm(100), rnorm(100))
Error in cov(rnorm(100), rnorm(100)) : 3 arguments passed to "cov" which
requires 4.


Best,

Torsten

R> version
         _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status   alpha
major    1
minor    8.0
year     2003
month    09
day      15
language R
#
Torsten> Hi,

    Torsten> in last nights alpha version, `var' is broken:

    R> var(rnorm(100))
    Torsten> Error in var(rnorm(100)) : 3 arguments passed to
    Torsten> "cov" which requires 4.

    Torsten> which I suspect is due to recent changes to
    Torsten> `cov'. The same is true for

    R> cov(rnorm(100), rnorm(100))
    Torsten> Error in cov(rnorm(100), rnorm(100)) : 3 arguments
    Torsten> passed to "cov" which requires 4.


Yes these two are related, but the e-mail subject is wrong:
It's *your* fault because you must have unpacked the new version
on top of an older one.
The official alpha version (Snapshots from here, or rsync) do
not have your problem:
Before a few days ago, there were files  
    src/library/base/R/var.R
    src/library/base/R/cov.R
the newer R-alpha do not have them -- and if you use the old
files where you shouldn't --> you get the problem.

Regards,
Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
#
yes, thats the problem, however it is a problem with rsync. I
update the tree via

	rsync -rC rsync.r-project.org::r-devel R

an this does not remove those files:

hothorn@www:~/software/R/src/library/base/R$ ls -la cov.R
-rw-r--r--    1 hothorn  users         375 Sep 12 04:00 cov.R
hothorn@www:~/software/R/src/library/base/R$ ls -la var.R
-rw-r--r--    1 hothorn  users         361 Sep 12 04:00 var.R

A possible fix is using

	rsync -rC --delete rsync.r-project.org::r-devel R

(maybe one should add a hint in section 2.4 of the FAQ).

Thank you for pointing this out!

Best,

Torsten
#
>> Yes these two are related, but the e-mail subject is
    >> wrong: It's *your* fault because you must have unpacked
    >> the new version on top of an older one.  The official
    >> alpha version (Snapshots from here, or rsync) do not have
    >> your problem: Before a few days ago, there were files
    >> src/library/base/R/var.R src/library/base/R/cov.R the
    >> newer R-alpha do not have them -- and if you use the old
    >> files where you shouldn't --> you get the problem.
    >> 

    Torsten> yes, thats the problem, however it is a problem
    Torsten> with rsync. 

no, but with the options you use it with...   ;-)

    Torsten> I update the tree via

    Torsten> 	rsync -rC rsync.r-project.org::r-devel R

    Torsten> an this does not remove those files:
        <......>

    Torsten> A possible fix is using
    Torsten> 	rsync -rC --delete rsync.r-project.org::r-devel R

Of course, I've always used something like the above -- that's
why I said above rsync would also give the correct files... 

    Torsten> (maybe one should add a hint in section 2.4 of the
    Torsten> FAQ).

Definitely.