Dear R People:

Suppose I have the following:

x <- 1:4

And I want to create the following matrix:

1 2 3 4
2 1 2 3
3 2 1 2
4 3 2 1

Is there a function in place for this, please?  I looked at  symMatrix
in micEcon and some of the items in Matrix, but they didn't quite do
it.

I can put together something quickly, of course, but it seems likely
that this would exist.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

______________________________________________
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