{"id":96,"date":"2023-06-05T13:00:16","date_gmt":"2023-09-10T22:58:20","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2025-07-31T13:59:09","modified_gmt":"2025-07-31T04:59:09","slug":"r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5"},"content":{"rendered":"<h3>\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306a\u8a00\u3044\u56de\u3057\u3067\u8a00\u3044\u63db\u3048\u3001\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u304a\u9858\u3044\u3057\u307e\u3059\uff1a<br \/>\n\u300cIntroduction\u300d<\/h3>\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5b58\u5728\u3059\u308b\u6b20\u640d\u5024\u3001\u8ca0\u306e\u5024\u3001\u307e\u305f\u306f\u6b63\u78ba\u3067\u306a\u3044\u5024\u306b\u5bfe\u51e6\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u554f\u984c\u306f\u3001\u5024\u30920\u3001NA\u3001\u307e\u305f\u306f\u5e73\u5747\u5024\u3067\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001R\u3067replace()\u95a2\u6570\u3068is.na()\u95a2\u6570\u3092\u4f7f\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u63a2\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5b8c\u4e86\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u304c\u5fc5\u8981\u3067\u3059:<\/p>\n<ul class=\"post-ul\">\n<li>R installed locally or on a server.<\/li>\n<\/ul>\n<h2>\u30d9\u30af\u30c8\u30eb\u5185\u306e\u5024\u3092replace()\u3092\u4f7f\u3063\u3066\u7f6e\u304d\u63db\u3048\u308b\u3002<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30d9\u30af\u30c8\u30eb\u5185\u306e\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>R\u306ereplace()\u95a2\u6570\u306e\u69cb\u6587\u306b\u306f\u3001\u30d9\u30af\u30c8\u30eb\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d9\u30af\u30c8\u30eb\u3001\u304a\u3088\u3073\u7f6e\u63db\u5024\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>replace<span class=\"token punctuation\">(<\/span>target<span class=\"token punctuation\">,<\/span> index<span class=\"token punctuation\">,<\/span> replacement<span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<p>\u6700\u521d\u306b\u3001\u30d9\u30af\u30c8\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 (Saisho ni, bekutoru o sakusei shite kudasai.)<\/p>\n<pre class=\"post-pre\"><code>df <span class=\"token operator\">&lt;-<\/span> c<span class=\"token punctuation\">(<\/span><span class=\"token string\">'apple'<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">'orange'<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">'grape'<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">'banana'<\/span><span class=\"token punctuation\">)<\/span>\r\ndf\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u308a\u3093\u3054\u3001\u30aa\u30ec\u30f3\u30b8\u3001\u3076\u3069\u3046\u3001\u30d0\u30ca\u30ca\u306e\u30d9\u30af\u30c8\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&#8220;apple&#8221; &#8220;orange&#8221; &#8220;grape&#8221; &#8220;banana&#8221;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3055\u3066\u3001\u30ea\u30b9\u30c8\u306e\u4e2d\u306e\u4e8c\u756a\u76ee\u306e\u9805\u76ee\u3092\u53d6\u308a\u66ff\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>dy <span class=\"token operator\">&lt;-<\/span> replace<span class=\"token punctuation\">(<\/span>df<span class=\"token punctuation\">,<\/span> <mark><span class=\"token number\">2<\/span><\/mark><span class=\"token punctuation\">,<\/span> <mark><span class=\"token string\">'blueberry'<\/span><\/mark><span class=\"token punctuation\">)<\/span>\r\ndy\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30aa\u30ec\u30f3\u30b8\u306f\u30d6\u30eb\u30fc\u30d9\u30ea\u30fc\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&#8220;apple&#8221; &#8220;blueberry&#8221; &#8220;grape&#8221; &#8220;banana&#8221;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3067\u306f\u3001\u30ea\u30b9\u30c8\u306e4\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>dx <span class=\"token operator\">&lt;-<\/span> replace<span class=\"token punctuation\">(<\/span>dy<span class=\"token punctuation\">,<\/span> <mark><span class=\"token number\">4<\/span><\/mark><span class=\"token punctuation\">,<\/span> <mark><span class=\"token string\">'cranberry'<\/span><\/mark><span class=\"token punctuation\">)<\/span>\r\ndx\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306f\u65e5\u672c\u8a9e\u3067\u306e\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30d0\u30ca\u30ca\u306f\u30af\u30e9\u30f3\u30d9\u30ea\u30fc\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&#8220;apple&#8221; &#8220;blueberry&#8221; &#8220;grape&#8221; &#8220;cranberry&#8221;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<h2>R\u3067\u306eNA\u5024\u30920\u306b\u7f6e\u304d\u63db\u3048\u308b<\/h2>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u6e2c\u5b9a\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\u7a7a\u6c17\u306e\u8cea<\/div>\n<pre class=\"post-pre\"><code>    Ozone  Solar.R  Wind  Temp  Month  Day\r\n1      41      190   7.4    67      5    1\r\n2      36      118   8.0    72      5    2\r\n3      12      149  12.6    74      5    3\r\n4      18      313  11.5    62      5    4\r\n5      NA       NA  14.3    56      5    5\r\n6      28       NA  14.9    66      5    6\r\n7      23      299   8.6    65      5    7\r\n8      19       99  13.8    59      5    8\r\n9       8       19  20.1    61      5    9\r\n10     NA      194   8.6    69      5   10\r\n11      7       NA   6.9    74      5   11\r\n12     16      256   9.7    69      5   12\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306fCSV\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<div>\u7a7a\u6c17\u54c1\u8cea\u306eCSV\u30d5\u30a1\u30a4\u30eb<\/div>\n<pre class=\"post-pre\"><code>Ozone,Solar.R,Wind,Temp,Month,Day\r\n41,190,7.4,67,5,1\r\n36,118,8.0,72,5,2\r\n12,149,12.6,74,5,3\r\n18,313,11.5,62,5,4\r\nNA,NA,14.3,56,5,5\r\n28,NA,14.9,66,5,6\r\n23,299,8.6,65,5,7\r\n19,99,13.8,59,5,8\r\n8,19,20.1,61,5,9\r\nNA,194,8.6,69,5,10\r\n7,NA,6.9,74,5,11\r\n16,256,9.7,69,5,12\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u304c\u6b20\u843d\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u306e\u90e8\u5206\u306b\u306f\u300c\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u300d\u3092\u793a\u3059\u6587\u5b57\u5217NA\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>NA\u306e\u5024\u30920\u3067\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>df <span class=\"token operator\">&lt;-<\/span> read.csv<span class=\"token punctuation\">(<\/span><span class=\"token string\">'air_quality.csv'<\/span><span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<p>NA\u306e\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306b\u3001is.na()\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u6b21\u306b\u3001NA\u306e\u5024\u30920\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>df<span class=\"token punctuation\">[<\/span>is.na<span class=\"token punctuation\">(<\/span>df<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;-<\/span> <span class=\"token number\">0<\/span>\r\ndf\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306f\u73fe\u5728\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Ozone Solar.R Wind Temp Month Day 1 41 190 7.4 67 5 1 2 36 118 8.0 72 5 2 3 12 149 12.6 74 5 3 4 18 313 11.5 62 5 4 5 0 0 14.3 56 5 5 6 28 0 14.9 66 5 6 7 23 299 8.6 65 5 7 8 19 99 13.8 59 5 8 9 8 19 20.1 61 5 9 10 0 194 8.6 69 5 10 11 7 0 6.9 74 5 11 12 16 256 9.7 69 5 12<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u5185\u306e\u3059\u3079\u3066\u306eNA\u306f\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<h2>R\u3067\u306e\u5024\u306e\u5e73\u5747\u5024\u3067NA\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u3002<\/h2>\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u306f\u3001NA\uff08\u6b20\u640d\u5024\uff09\u306e\u4ee3\u308f\u308a\u306b\u5e73\u5747\u5024\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u7cbe\u5ea6\u304c\u591a\u304f\u306e\u5834\u5408\u3067\u5411\u4e0a\u3057\u307e\u3059\u3002\u5e73\u5747\u5024\u3092\u8a08\u7b97\u3059\u308b\u305f\u3081\u306b\u306f\u3001mean()\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u72b6\u6cc1\u3092\u4e57\u308a\u8d8a\u3048\u308b\u305f\u3081\u306b\u3001NA\uff08\u6b20\u640d\u5024\uff09\u306f\u6b8b\u308a\u306e\u5024\u306e\u5e73\u5747\u5024\u3067\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002\u3053\u306e\u65b9\u6cd5\u306f\u3001\u30c7\u30fc\u30bf\u306e\u640d\u5931\u306a\u3057\u3067\u9ad8\u3044\u7cbe\u5ea6\u3092\u5b9f\u73fe\u3059\u308b\u4e0a\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>NA\u5024\u3092\u542b\u3080\u4ee5\u4e0b\u306e\u5165\u529b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 (NA\u3061\u3092\u3075\u304f\u3080\u3044\u304b\u306b\u3085\u3046\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u304b\u3093\u304c\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044)<\/p>\n<div>\u7a7a\u6c17\u306e\u8cea<\/div>\n<pre class=\"post-pre\"><code>    Ozone  Solar.R  Wind  Temp  Month  Day\r\n1      41      190   7.4    67      5    1\r\n2      36      118   8.0    72      5    2\r\n3      12      149  12.6    74      5    3\r\n4      18      313  11.5    62      5    4\r\n5      NA       NA  14.3    56      5    5\r\n6      28       NA  14.9    66      5    6\r\n7      23      299   8.6    65      5    7\r\n8      19       99  13.8    59      5    8\r\n9       8       19  20.1    61      5    9\r\n10     NA      194   8.6    69      5   10\r\n11      7       NA   6.9    74      5   11\r\n12     16      256   9.7    69      5   12\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>df <span class=\"token operator\">&lt;-<\/span> read.csv<span class=\"token punctuation\">(<\/span><span class=\"token string\">'air_quality.csv'<\/span><span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<p>NA\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u306b\u3001is.na()\u3068mean()\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>df<span class=\"token operator\">$<\/span>Ozone<span class=\"token punctuation\">[<\/span>is.na<span class=\"token punctuation\">(<\/span>df<span class=\"token operator\">$<\/span>Ozone<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;-<\/span> mean<span class=\"token punctuation\">(<\/span>df<span class=\"token operator\">$<\/span>Ozone<span class=\"token punctuation\">,<\/span> na.rm <span class=\"token operator\">=<\/span> <span class=\"token boolean\">TRUE<\/span><span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<p>\u6700\u521d\u306b\u3001\u3053\u306e\u30b3\u30fc\u30c9\u306fOzone\u5217\u5185\u306e\u3059\u3079\u3066\u306eNA\u306e\u51fa\u73fe\u7b87\u6240\u3092\u898b\u3064\u3051\u307e\u3059\u3002\u6b21\u306b\u3001Ozone\u5217\u306e\u5024\u306e\u5e73\u5747\u3092na.rm\u5f15\u6570\u3067NA\u306e\u5024\u3092\u9664\u5916\u3057\u3066\u8a08\u7b97\u3057\u307e\u3059\u3002\u305d\u308c\u304b\u3089\u3001\u5404NA\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u8a08\u7b97\u3055\u308c\u305f\u5e73\u5747\u5024\u3067\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u5024\u3092\u6574\u6570\u306b\u4e38\u3081\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>df<span class=\"token operator\">$<\/span>Ozone <span class=\"token operator\">&lt;-<\/span> round<span class=\"token punctuation\">(<\/span>df<span class=\"token operator\">$<\/span>Ozone<span class=\"token punctuation\">,<\/span> digits <span class=\"token operator\">=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306f\u73fe\u5728\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Ozone Solar.R Wind Temp Month Day 1 41 190 7.4 67 5 1 2 36 118 8.0 72 5 2 3 12 149 12.6 74 5 3 4 18 313 11.5 62 5 4 5 21 NA 14.3 56 5 5 6 28 NA 14.9 66 5 6 7 23 299 8.6 65 5 7 8 19 99 13.8 59 5 8 9 8 19 20.1 61 5 9 10 21 194 8.6 69 5 10 11 7 NA 6.9 74 5 11 12 16 256 9.7 69 5 12<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30aa\u30be\u30f3\u30ab\u30e9\u30e0\u306eNA\u5024\u306f\u73fe\u5728\u3001\u30aa\u30be\u30f3\u30ab\u30e9\u30e0\u5185\u306e\u5024\u306e\u5e73\u5747(21)\u3092\u56db\u6368\u4e94\u5165\u3057\u305f\u5024\u3067\u7f6e\u304d\u63db\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>R\u3067\u30cd\u30ac\u30c6\u30a3\u30d6\u306a\u5024\u30920\u307e\u305f\u306fNA\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/h2>\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u306e\u904e\u7a0b\u3067\u3001\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u5185\u306e\u8ca0\u306e\u5024\u30920\u307e\u305f\u306fNA\u306b\u7f6e\u304d\u63db\u3048\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u7d50\u679c\u306e\u8ca0\u306e\u50be\u5411\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u5fc5\u8981\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5185\u306e\u8ca0\u306e\u5024\u306f\u5206\u6790\u3092\u8aa4\u89e3\u3055\u305b\u3001\u9593\u9055\u3063\u305f\u6b63\u78ba\u6027\u3092\u751f\u307f\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u30cd\u30ac\u30c6\u30a3\u30d6\u306a\u5024\u3092\u542b\u3080\u4ee5\u4e0b\u306e\u5165\u529b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8003\u616e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u30cd\u30ac\u30c6\u30a3\u30d6_\u30d0\u30ea\u30e5\u30fc.csv<\/div>\n<pre class=\"post-pre\"><code>    count  entry1  entry2  entry3\r\n 1      1     345    -234     345\r\n 2      2      65     654     867\r\n 3      3      23     345    3456\r\n 4      4      87     876       9\r\n 5      5    2345      34     867\r\n 6      6     876      98      76\r\n 7      7      35    -456     123\r\n 8      8      87      98     345\r\n 9      9    -765      67     765\r\n10     10    4567     -87     234\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306b\u3001CSV\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>count,entry1,entry2,entry3\r\n1,345,-234,345\r\n2,65,654,867\r\n3,23,345,3456\r\n4,87,867,9\r\n5,2345,34,867\r\n6,876,98,76\r\n7,35,-456,123\r\n8,87,98,345\r\n9,-765,67,765\r\n10,4567,-87,234\r\n<\/code><\/pre>\n<p>CSV\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u3002<\/p>\n<pre class=\"post-pre\"><code>df <span class=\"token operator\">&lt;-<\/span> read.csv<span class=\"token punctuation\">(<\/span><span class=\"token string\">'negative_values.csv'<\/span><span class=\"token punctuation\">)<\/span>\r\n<\/code><\/pre>\n<h3>\u8ca0\u306e\u5024\u30920\u306b\u7f6e\u304d\u63db\u3048\u308b<\/h3>\n<p>\u30a8\u30f3\u30c8\u30ea2\u306e\u5217\u306e\u8ca0\u306e\u5024\u30920\u306b\u5909\u66f4\u3059\u308b\u305f\u3081\u306b\u3001replace()\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>data_zero <span class=\"token operator\">&lt;-<\/span> df\r\ndata_zero<span class=\"token operator\">$<\/span>entry2 <span class=\"token operator\">&lt;-<\/span> replace<span class=\"token punctuation\">(<\/span>df<span class=\"token operator\">$<\/span>entry2<span class=\"token punctuation\">,<\/span> df<span class=\"token operator\">$<\/span>entry2 <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> \r\ndata_zero\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306f\u73fe\u5728\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>count entry1 entry2 entry3 1 1 345 0 345 2 2 65 654 867 3 3 23 345 3456 4 4 87 867 9 5 5 2345 34 867 6 6 876 98 76 7 7 35 0 123 8 8 87 98 345 9 9 -765 67 765 10 10 4567 0 234<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5217entry2\u306e\u8ca0\u306e\u5024\u306f0\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30cd\u30ac\u30c6\u30a3\u30d6\u306a\u5024\u3092NA\u3067\u7f6e\u304d\u63db\u3048\u308b<\/h3>\n<p>entry2\u5217\u306e\u8ca0\u306e\u5024\u3092NA\u306b\u5909\u66f4\u3059\u308b\u305f\u3081\u306b\u3001replace()\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>data_na <span class=\"token operator\">&lt;-<\/span> df\r\ndata_na<span class=\"token operator\">$<\/span>entry2 <span class=\"token operator\">&lt;-<\/span> replace<span class=\"token punctuation\">(<\/span>df<span class=\"token operator\">$<\/span>entry2<span class=\"token punctuation\">,<\/span> df<span class=\"token operator\">$<\/span>entry2 <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">NA<\/span><span class=\"token punctuation\">)<\/span>\r\ndata_na\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306f\u73fe\u5728\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>count entry1 entry2 entry3 1 1 345 NA 345 2 2 65 654 867 3 3 23 345 3456 4 4 87 867 9 5 5 2345 34 867 6 6 876 98 76 7 7 35 NA 123 8 8 87 98 345 9 9 -765 67 765 10 10 4567 NA 234<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a8\u30f3\u30c8\u30ea\uff12\u306e\u5217\u306e\u8ca0\u306e\u5024\u306fNA\u3067\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>R\u306b\u306f\u30c7\u30fc\u30bf\u89e3\u6790\u306e\u305f\u3081\u306b\u4fbf\u5229\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u5185\u306e\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002R\u306ereplace()\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u89e3\u6790\u3059\u308b\u969b\u306b\u9069\u5207\u306bNA\u30010\u3001\u304a\u3088\u3073\u8ca0\u306e\u5024\u3092\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300csub()\u300d\u304a\u3088\u3073\u300cgsub()\u300d\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u5b66\u7fd2\u3092\u7d9a\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306a\u8a00\u3044\u56de\u3057\u3067\u8a00\u3044\u63db\u3048\u3001\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u304a\u9858\u3044\u3057\u307e\u3059\uff1a \u300cIntroduction\u300d \u30c7\u30fc\u30bf\u5206\u6790\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5b58\u5728\u3059\u308b\u6b20\u640d\u5024\u3001\u8ca0\u306e\u5024\u3001\u307e\u305f\u306f\u6b63\u78ba\u3067\u306a\u3044\u5024\u306b\u5bfe\u51e6\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/r\u3067replace\u3068is-na\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/r\u3067replace\u3068is-na\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-10T22:58:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T04:59:09+00:00\" \/>\n<meta name=\"author\" content=\"\u84ee, \u7ffc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u84ee, \u7ffc\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"11\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-09-10T22:58:20+00:00\",\"dateModified\":\"2025-07-31T04:59:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413\"},\"description\":\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413\",\"name\":\"\u84ee, \u7ffc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g\",\"caption\":\"\u84ee, \u7ffc\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/rentsubasa\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","description":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/r\u3067replace\u3068is-na\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5","og_description":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/r\u3067replace\u3068is-na\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-09-10T22:58:20+00:00","article_modified_time":"2025-07-31T04:59:09+00:00","author":"\u84ee, \u7ffc","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u84ee, \u7ffc","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"11\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-09-10T22:58:20+00:00","dateModified":"2025-07-31T04:59:09+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413"},"description":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"R\u3067`replace()`\u3068`is.na()`\u3092\u4f7f\u3063\u3066\u5024\u3092\u7f6e\u304d\u63db\u3048\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413","name":"\u84ee, \u7ffc","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g","caption":"\u84ee, \u7ffc"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/rentsubasa\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/r%e3%81%a7replace%e3%81%a8is-na%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%80%a4%e3%82%92%e7%bd%ae%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":36349,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions\/36349"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}