[R] Cause of error message in cov function?
mckellercran at gmail.com
Thu Jun 14 02:12:54 CEST 2007
Hi Uwe and other R-folks,
To answer your question, effects.cur is a matrix of real numbers.
It turns out that, on updating her version to the current one, the
error disappears. I'm posting this for posterity, just in case anyone
else has a similar problem with the function cov in earlier R
versions. I have no idea why the error was occurring, and can't track
it down because I don't have access to R 2.1...
On 6/13/07, Uwe Ligges <ligges at statistik.uni-dortmund.de> wrote:
> Matthew Keller wrote:
> > Hi all,
> > I have written a script in R that simulates genetically informative
> > data - it is posted on my website and available to the public. This is
> > my first time to write a script for use by others and am learning that
> > it isn't as easy as it seems.
> > To the issue. My script runs fine on my machine and on a server I have
> > access to, but a user has written me saying that it crashes the first
> > time the function "cov" is called up. Below is her error message
> > followed by the version of R she's using.
> > Can anyone help me out here? I can't recreate her error message. Does
> > anyone know what this might have to do with? Is it a version issue
> > (she's using R 2.1)? I'd appreciate any help!!
> It may be a version issue, but hard to say since we do not know what
> effects.cur() is, not do we have any data to reproduce this.
> Uwe Ligges
> > Matt
> > ERROR MESSAGE:
> > cov.varcomp <- cov(t(effects.cur[c("A","AA","D","F","S","E","AGE","AGE.by.A"),]*beta2))
> > there is an argument mssing.
> > error message:
> > Error in mean((a - mean(a)) * (b - mean(b))) :
> > argument "b" is missing, with no default
> > SPECIFICS OF HER MACHINE:
> >> memory.size()
> >  10985480
> >> R.Version()
> > $platform
> >  "i386-pc-mingw32"
> > $arch
> >  "i386"
> > $os
> >  "mingw32"
> > $system
> >  "i386, mingw32"
> > $status
> >  ""
> > $major
> >  "2"
> > $minor
> >  "1.0"
> > $year
> >  "2005"
> > $month
> >  "04"
> > $day
> >  "18"
> > $language
> >  "R"
> >> .Platform
> > $OS.type
> >  "windows"
> > $file.sep
> >  "/"
> > $dynlib.ext
> >  ".dll"
> > $GUI
> >  "Rgui"
> > $endian
> >  "little"
> > $pkgType
> >  "win.binary"
Matthew C Keller
Virginia Institute for Psychiatric and Behavioral Genetics
More information about the R-help