<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kinuit</author_name>
  <author_url>https://blog.hatena.ne.jp/kinuit/</author_url>
  <blog_title>と。</blog_title>
  <blog_url>https://socinuit.hatenablog.com/</blog_url>
  <categories>
    <anon>07_R言語</anon>
    <anon>08_Python</anon>
  </categories>
  <description>シチュエーション 卒業論文やお仕事でアンケートをとった． 年齢の選択肢つけるのめんどくさかったので実年齢入れてもらった 年齢と何かのクロス集計をかけたいが，実年齢は整数なのでめんどい 10歳刻みの年代でくくりたいなあ． 関数 こんな感じ．関数にしなくても別にいい． thFunc &lt;- function(Vec){ Vec[Vec%%10 != 0] &lt;- Vec[Vec%%10 != 0] %%10 *10 return(Vec) } thFunc(c(14,15,99,40,56,22)) &gt; [1] 40 50 90 40 60 20 解説 %%演算子は剰余を返す．また，%/%演算子は整数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsocinuit.hatenablog.com%2Fentry%2F2019%2F04%2F09%2F203706&quot; title=&quot;九捨十入(年代変数の簡単な作り方) - と。&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>2019-04-09 20:37:06</published>
  <title>九捨十入(年代変数の簡単な作り方)</title>
  <type>rich</type>
  <url>https://socinuit.hatenablog.com/entry/2019/04/09/203706</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
