Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Create new vectors with no element being in the same position as the original vector as well as with other vectors?

$
0
0

This question is an extension of a question I asked earlier.

Suppose I have a vector V1 (with two or more elements):

V1 <- 1:10

I want to sample one or several vectors that:

(1). no element is in the same position as the original vector.

(2). no element is in the same position among the new vectors.

The following two are such vectors:

9  4  7  1  2  5  3 10  6  8
5  7  4  2  3  8  9  6 10  1

Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>