[R] non-numeric argument to binary operator

cruz cruadam at gmail.com
Thu Feb 5 04:36:01 CET 2009


Hi,

I compute the value of xi*xj by "for" loops, this how I try:

> x1 <- c(1:3)
> x2 <- c(2:4)

### to compute x1*x2

> (paste("x", 1, sep = ""))*(paste("x", 2, sep = ""))
Error in (paste("x", 1, sep = "")) * (paste("x", 2, sep = "")) :
  non-numeric argument to binary operator
>

All comments are appreciated.

Thanks,
cruz




More information about the R-help mailing list