_:nb7a957a4289e473dab9bb3885a52f117xb7
<http://schema.org/text>
"<p><a href=\"https://d.cosx.org/d/422228/2\" class=\"PostMention\" data-id=\"439741\" rel=\"\" target=\"\">qsuqn</a></p> \n\n<pre><code class=\"language-r\">pv &lt;- c(1,1,2,1,1,3,15,7,18)\nresults &lt;- vector(length = length(pv))\nresults &lt;- ifelse(pv &lt; 5 | pv == 5, \"初级用户\", ifelse(pv &lt; 15 | pv == 15, \"中级用户\", \"高级用户\"))\nresults\n#&gt; [1] \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"中级用户\"\n#&gt; [8] \"中级用户\" \"高级用户\"\n\n#或者：\n\npv &lt;- c(1,1,2,1,1,3,15,7,18)\nresults &lt;- vector(length = length(pv))\nresults[pv &lt; 5 | pv == 5] &lt;- \"初级用户\"\nresults[pv &gt; 5 &amp; pv &lt; 15 | pv == 15] &lt;- \"中级用户\"\nresults[pv &gt; 15] &lt;- \"高级用户\"\nresults\n#&gt; [1] \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"初级用户\" \"中级用户\"\n#&gt; [8] \"中级用户\" \"高级用户\"</code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github\" integrity=\"sha384-fQc6882DqpMzcLWJbK07+Xnd8dceuG+q15iFvx+m/bAzjiBJeLnbNfaiXYzJBEn/\" onload=\"hljsLoader.highlightBlocks(this.parentNode)\" src=\"https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.28/loader.min.js\"></script></pre>\n\n<p>一看提示“<a href=\"https://bookdown.org/yihui/r-ninja/data-structure.html\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">找不到对象</a>”，就莫名地感到欢乐。</p>\n"
<https://d.cosx.org/d/422228->