Ahh...  That's how it works...
embedding
df <- expand.grid(x=x,a=a,b=b)
x <- df$x; a <- df$a; b <- df$b
gave the desired results.
Thanks for helping a beginner.
-Hc.

Deepayan Sarkar wrote:
> .....
> That you haven't created all the (a, b) combinations you want: you are
> plotting these combinations
>
>  > cbind(a, b)
>      a b
> [1,] 1 1
> [2,] 2 2
> [3,] 3 3
>
> when you actually want these:
>
>   
>> expand.grid(a = a, b = b)
>>     
>   a b
> 1 1 1
> 2 2 1
> 3 3 1
> 4 1 2
> 5 2 2
> 6 3 2
> 7 1 3
> 8 2 3
> 9 3 3
>
> -Deepayan
> .....

        [[alternative HTML version deleted]]

______________________________________________
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