<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hoxo_m</author_name>
  <author_url>https://blog.hatena.ne.jp/hoxo_m/</author_url>
  <blog_title>ほくそ笑む</blog_title>
  <blog_url>https://hoxo-m.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>R言語を使う上で知っていても知らなくても特に問題にならないようなこぼれ話をしていくシリーズ、第2回は tryCatch() の話です。 tryCatch() は主にエラー処理に使われる関数です。 例えば、ファイルを読み込もうとしたときに、そのファイルが存在しない場合は警告が発生します。 警告が発生したとき、ファイルの読み込みを中断し、その警告が持つメッセージを表示するには次のようにします。 tryCatch({ read.csv(&quot;hogehoge.csv&quot;) }, warning = function(w) { print(w$message) }) [1] &quot;cannot open fil…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhoxo-m.hatenablog.com%2Fentry%2F2022%2F12%2F07%2F000000&quot; title=&quot;R言語こぼれ話(2) tryCatch はなんでもつかめる - ほくそ笑む&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>https://m.media-amazon.com/images/I/51-1q-IODsL._SL500_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-12-07 00:00:00</published>
  <title>R言語こぼれ話(2) tryCatch はなんでもつかめる</title>
  <type>rich</type>
  <url>https://hoxo-m.hatenablog.com/entry/2022/12/07/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
