<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takeshou</author_name>
  <author_url>https://blog.hatena.ne.jp/takeshou/</author_url>
  <blog_title>ぼやかないつもりのメモ（ブログ Ver）</blog_title>
  <blog_url>https://takeshou.hatenadiary.jp/</blog_url>
  <categories>
    <anon>R</anon>
  </categories>
  <description>実習の関係で学生を振り分ける必要があったので、Rの乱数を使ってやってみた。簡単。適当な数の整数の乱数を発生させる方法を知らなかったので、sample()でやってみた。 a &lt;- c(1:n) # nは必要な数 b &lt;- sample(a, n) b # 終わり rank()を用いる 中澤先生からのコメントで、rank()関数*1を使うともっと簡単だったことがわかった。 rank(runif(n)) *1:引数のベクターの順位を返す関数。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakeshou.hatenadiary.jp%2Fentry%2F20090619%2F1245399304&quot; title=&quot;乱数による割り当て - ぼやかないつもりのメモ（ブログ Ver）&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-06-19 17:15:04</published>
  <title>乱数による割り当て</title>
  <type>rich</type>
  <url>https://takeshou.hatenadiary.jp/entry/20090619/1245399304</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
