[R] Cause of error message in cov function?

From: Matthew Keller <mckellercran_at_gmail.com>
Date: Tue, 12 Jun 2007 13:37:45 -0400

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


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

[1] 10985480

> R.Version()
[1] "i386-pc-mingw32"
[1] "i386"

[1] "mingw32"

[1] "i386, mingw32"
[1] ""

[1] "2"

[1] "1.0"
[1] "2005"

[1] "04"

[1] "18"

[1] "R"

> .Platform
[1] "windows"

[1] "/"

[1] ".dll"

[1] "Rgui"

[1] "little"

[1] "win.binary"

Matthew C Keller
Postdoctoral Fellow
Virginia Institute for Psychiatric and Behavioral Genetics

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 12 Jun 2007 - 17:46:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Jun 2007 - 09:31:51 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.