On Nov 3, 2010, at 11:17 AM, Stephen Liu wrote:

----- Original Message ----

From: David Winsemius <dwinsem...@comcast.net>
To: Stephen Liu <sati...@yahoo.com>
Cc: r-help@r-project.org
Sent: Wed, November 3, 2010 11:03:18 PM
Subject: Re: [R] longer object length is not a multiple of shorter object length

- snip -

v <- 2*x + y + 1
Warning message:
In 2 * x + y :
longer object length is not a multiple of shorter object length

What does it mean?  How to rectify it?

You were not supposed to rectify it. That example was designed to show you what happens in R when two vectors (actually three) are offered to the Arithmetic operators. Read the material that is above and below that expression again.


Please help.  TIA

What does this return:

c(length(x), length(y))  # ?

c(length(x), length(y))
[1]  5 11


B.R.
Stephen L



David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to