{"id":1129,"date":"2019-04-15T10:20:54","date_gmt":"2019-04-15T01:20:54","guid":{"rendered":"http:\/\/141.164.34.82\/?p=1129"},"modified":"2019-04-15T10:42:47","modified_gmt":"2019-04-15T01:42:47","slug":"%ec%9c%88%eb%8f%84%ec%9a%b0%ec%97%90%ec%84%9c-%eb%ac%b8%ec%9e%90%ec%97%b4-%ec%9d%b8%ec%bd%94%eb%94%a9-%eb%ac%b8%ec%a0%9c","status":"publish","type":"post","link":"http:\/\/ds.sumeun.org\/?p=1129","title":{"rendered":"\uc708\ub3c4\uc6b0\uc5d0\uc11c \ubb38\uc790\uc5f4 \uc778\ucf54\ub529 \ubb38\uc81c"},"content":{"rendered":"<h1>\uc708\ub3c4\uc6b0\uc5d0\uc11c \ubb38\uc790\uc5f4\uc758 \uc778\ucf54\ub529 \ubb38\uc81c<\/h1>\n<h2>\uc6c0\ub77c\uc6b0\ud2b8(Umlaut)<\/h2>\n<p><code>UTF-8test.txt<\/code>\uc5d0\ub294 \ub2e4\uc74c\uc758 \ub0b4\uc6a9\uc774 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4.<\/p>\n<pre>\"cr\u00e9ation d'un r\u00f4le\",\"\"\u00ff\"\"\r\n\"\u521d\u6f14\",\"\u91cd\u5f79\"\r\n\"\ucd08\uc5f0\",\"\"\uc911\uc5ed\"\uc774\ub77c\uace0\"\r\n<\/pre>\n<p><code>&lt;<\/code><strong>\ubb38\uc790\uc5f4<\/strong><code>&gt;<\/code> \uc7a5\uc5d0\uc11c \uc880 \ub354 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc9c0\ub9cc, \uc27c\ud45c\ub85c \uad6c\ubd84\ub418\uace0, <code>\"<\/code>\uac00 \uc778\uc6a9\ubd80\ud638\ub85c \uc4f0\uc778 \ub370\uc774\ud130 \ud654\uc77c\ub85c \uc0dd\uac01\ud560 \uc218 \uc788\ub2e4. \uc774\ub97c R\uc758 \uae30\ubcf8 \ud568\uc218\uc778 <code>read.csv<\/code>, <code>readr::read_csv<\/code>, <code>data.table::fread<\/code>\ub85c \uc77d\uc5b4\ubcf4\uba74 \uacb0\uacfc\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<pre><code class=\"r\">dat1 &lt;- read.table('UTF-8test.txt', \r\n                   sep=',', \r\n                   fileEncoding='UTF-8', \r\n                   stringsAsFactors=FALSE); dat1\r\ndat2 &lt;- readr::read_delim('UTF-8test.txt', \r\n                          delim=',', \r\n                          col_names=FALSE); dat2\r\ndat3 &lt;- data.table::fread('UTF-8test.txt', \r\n                          sep=',', \r\n                          header=FALSE, \r\n                          encoding='UTF-8'); dat3\r\n<\/code><\/pre>\n<pre><code class=\"r\">dat1 &lt;- read.table('UTF-8test.txt', \r\n                   sep=',', \r\n                   fileEncoding='UTF-8',\r\n                   stringsAsFactors=FALSE); dat1\r\n<\/code><\/pre>\n<pre>##                   V1         V2\r\n## 1 creation d'un role          y\r\n## 2               \u521d\u6f14       \u91cd\u5f79\r\n## 3               \ucd08\uc5f0 \uc911\uc5ed\uc774\ub77c\uace0\r\n<\/pre>\n<p>\ube44\uc2b7\ud558\uc9c0\ub9cc \uc870\uae08\uc529 \ub2e4\ub974\ub2e4. <code>read.table<\/code>\ub85c \uc77d\uc740 <code>dat1<\/code>\uc758 \uacbd\uc6b0 \uc6c0\ub77c\uc6b0\ud2b8\ub77c\uace0 \ubd80\ub974\ub294 \uc54c\ud30c\ubcb3 \uc704\uc758 \uc810\uc774 \uc0ac\ub77c\uc84c\ub2e4. \uadf8\ub9ac\uace0 <code>\"y\"<\/code>\uc758 \ud070 \ub530\uc634\ud45c\ub3c4 \uc0ac\ub77c\uc84c\ub2e4.<\/p>\n<pre><code class=\"r\">dat2 &lt;- readr::read_delim('UTF-8test.txt', \r\n                          delim=',', \r\n                          col_names=FALSE)\r\ndat2\r\n## Parsed with column specification:\r\n## cols(\r\n## X1 = col_character(),\r\n## X2 = col_character(),\r\n## X3 = col_character()\r\n## )\r\n## Warning in rbind(names(probs), probs_f): number of columns of result\r\n## is not a multiple of vector length (arg 1)\r\n## Warning: 5 parsing failures.\r\n## row # A tibble: 5 x 5 col row col expected actual file expected\r\n## ...\r\n### A tibble: 2 x 3\r\n##  X1                 X2               X3   \r\n##  &lt;chr&gt;              &lt;chr&gt;            &lt;chr&gt;\r\n##1 cr\u00e9ation d'un r\u00f4le \"\u00ff\\\"\\r\\n\\\"\u521d\u6f14\"  \u91cd\u5f79 \r\n##2 \ucd08\uc5f0               \"\\\"\uc911\uc5ed\\\"\uc774\ub77c\uace0\" NA   \r\n<\/code><\/pre>\n<p><code>read_delim<\/code>\uc73c\ub85c \uc77d\uc740 <code>dat2<\/code>\uc5d0\ub294 <code>cr\u00e9ation d'un r\u00f4le<\/code>\uc640 \uac19\uc774 \uc6c0\ub77c\uc6b0\ud2b8\ub294 \uc815\ud655\ud558\uac8c \uc77d\uc5c8\uc9c0\ub9cc, \uc5f4\uc758 \uc218\uac00 3\uac1c\ub85c \uc778\uc2dd\ub418\uc5c8\uc73c\uba70 <code>\\r\\n<\/code>\uc640 \uac19\uc740 \uc81c\uc5b4\ubb38\uc790\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\ub2e4.<\/p>\n<pre><code class=\"r\">dat3 &lt;- data.table::fread('UTF-8test.txt', \r\n                          sep=',', \r\n                          header=FALSE, \r\n                          encoding='UTF-8'); dat3\r\n<\/code><\/pre>\n<pre>## Warning in data.table::fread(\"UTF-8test.txt\", sep = \",\", header = FALSE, :\r\n## Found and resolved improper quoting in first 100 rows. If the fields are\r\n## not quoted (e.g. field separator does not appear within any field), try\r\n## quote=\"\" to avoid this warning.\r\n<\/pre>\n<pre>##                    V1           V2\r\n## 1: creation d'un role          \"y\"\r\n## 2:               \u521d\u6f14         \u91cd\u5f79\r\n## 3:               \ucd08\uc5f0 \"\uc911\uc5ed\"\uc774\ub77c\uace0\r\n<\/pre>\n<p><code>fread<\/code>\ub85c \uc77d\uc740 <code>dat3<\/code>\uc758 \ucd9c\ub825 \uacb0\uacfc\ub97c \ubcf4\uba74 <code>data.table::fread<\/code>\uc758 \uacbd\uc6b0\ub3c4 <code>read.csv<\/code>\uc640 \uac19\uc774 \uc6c0\ub77c\uc6b0\ud2b8\uac00 \uc0ac\ub77c\uc84c\ub2e4. \uc774\uc0c1\uc758 \uacb0\uacfc\ub294 \uc708\ub3c4\uc6b0 R\uc5d0\uc11c \uc778\ucf54\ub529 \ubb38\uc81c\uc758 \uc77c\uba74\uc744 \ubcf4\uc5ec\uc900\ub2e4.<\/p>\n<h2>\ubcf4\uc774\ub294 \uac83\uc774 \ubaa8\ub450\uac00 \uc544\ub2c8\ub2e4.<\/h2>\n<p>\ud654\uc77c\uc744 \uc77d\uc5b4\ub4e4\uc77c \ub54c \uba87 \uac00\uc9c0 \uc8fc\uc758\ud560 \uc810\uc774 \uc788\ub2e4. \uc55e\uc5d0\uc11c <code>read.csv<\/code>\uc640 <code>data.table::fread<\/code>\uc758 \uacbd\uc6b0 \uc6c0\ub77c\uc6b0\ud2b8\uac00 \ubaa8\ub450 \uc0ac\ub77c\uc9c4 \uac83\ucc98\ub7fc \ubcf4\uc778\ub2e4. \ud558\uc9c0\ub9cc \ubcf4\uc774\ub294 \uac83\uc774 \uc804\ubd80\uac00 \uc544\ub2c8\ub2e4!<\/p>\n<pre><code class=\"r\">dat1$V1\r\ndat3$V1\r\n\r\n## [1] \"creation d'un role\" \"\u521d\u6f14\"               \"\ucd08\uc5f0\"  \r\n## [1] \"cr\u00e9ation d'un r\u00f4le\" \"\u521d\u6f14\"               \"\ucd08\uc5f0\"  \r\n<\/code><\/pre>\n<p>\uc2e0\uae30\ud558\uac8c\ub3c4 <code>fread<\/code>\uc758 \uacbd\uc6b0\ub294 \ub370\uc774\ud130\ud14c\uc774\ube14\uc758 \ud55c \uc5f4\uc744 \ubca1\ud130\ub85c \ucd9c\ub825\ud558\uba74 \uc6c0\ub77c\uc6b0\ud2b8\uac00 \ubcf4\uc874\ub418\uc5b4 \uc788\uc74c\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. \ub2e4\uc74c\uc740 \ub3d9\uc77c\ud55c \uc790\ub8cc\ub97c \ub370\uc774\ud130\ud504\ub808\uc784, \ud2f0\ube14\ub85c \ubcc0\ud658\ud558\uc5ec \ucd9c\ub825\ud55c \uacb0\uacfc\uc774\ub2e4.<\/p>\n<pre><code class=\"r\">dat3df &lt;- as.data.frame(dat3); dat3tb &lt;- tibble::as_tibble(dat3)\r\nprint(dat3df); print(dat3df$V1)\r\n\r\n##                   V1           V2\r\n## 1 creation d'un role          \"y\"\r\n## 2               \u521d\u6f14         \u91cd\u5f79\r\n## 3               \ucd08\uc5f0 \"\uc911\uc5ed\"\uc774\ub77c\uace0\r\n## [1] \"creation d'un role\" \"\u521d\u6f14\"               \"\ucd08\uc5f0\"   \r\n\r\nprint(dat3tb); print(dat3tb$V1)\r\n\r\n## # A tibble: 3 x 2\r\n##   V1                 V2              \r\n## &lt;chr&gt;              &lt;chr&gt;           \r\n## 1 cr\u00e9ation d'un r\u00f4le \"\\\"\u00ff\\\"\"         \r\n## 2 \u521d\u6f14               \u91cd\u5f79            \r\n## 3 \ucd08\uc5f0               \"\\\"\uc911\uc5ed\\\"\uc774\ub77c\uace0\"\r\n## [1] \"cr\u00e9ation d'un r\u00f4le\" \"\u521d\u6f14\"               \"\ucd08\uc5f0\"  \r\n<\/code><\/pre>\n<p>\ubca1\ud130\ub97c \ucd9c\ub825\ud574\ubcf4\uba74 \uc790\ub8cc\ub294 \ub3d9\uc77c\ud558\ub2e4(\uc6c0\ub77c\uc6b0\ud2b8\uac00 \ubcf4\uc874\ub418\uc5b4 \uc788\ub2e4). \ud2f0\ube14\uc758 \uacbd\uc6b0\ub294 \ud2f0\ube14\uc744 \ucd9c\ub825\ud574\ub3c4 \uc6c0\ub77c\uc6b0\ud2b8\uac00 \ubcf4\uc778\ub2e4. \ud558\uc9c0\ub9cc \ub370\uc774\ud130\ud504\ub808\uc784\uc744 \ucd9c\ub825\ud560 \ub54c\uc5d0\ub294 \uc6c0\ub77c\uc6b0\ud2b8\uac00 \uc0ac\ub77c\uc9c4 \ucc44 \ucd9c\ub825\ub41c\ub2e4.<\/p>\n<hr \/>\n<ul>\n<li>\uc704\uc758 \uae00\uc740 <a href=\"http:\/\/141.164.34.82\/?p=891\">R\ub85c \ud558\ub294 \ube45\ub370\uc774\ud130 \ubd84\uc11d: \ub370\uc774\ud130 \uc804\ucc98\ub9ac\uc640 \uc2dc\uac01\ud654<\/a>\uc758 \uc77c\ubd80\ub97c \ubc1c\ucdcc, \uac01\uc0c9\ud55c \uac83\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\uc708\ub3c4\uc6b0\uc5d0\uc11c \ubb38\uc790\uc5f4\uc758 \uc778\ucf54\ub529 \ubb38\uc81c \uc6c0\ub77c\uc6b0\ud2b8(Umlaut) UTF-8test.txt\uc5d0\ub294 \ub2e4\uc74c\uc758 \ub0b4\uc6a9\uc774 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4. &#8220;cr\u00e9ation d&#8217;un r\u00f4le&#8221;,&#8221;&#8221;\u00ff&#8221;&#8221; &#8220;\u521d\u6f14&#8221;,&#8221;\u91cd\u5f79&#8221; &#8220;\ucd08\uc5f0&#8221;,&#8221;&#8221;\uc911\uc5ed&#8221;\uc774\ub77c\uace0&#8221; &lt;\ubb38\uc790\uc5f4&gt; \uc7a5\uc5d0\uc11c \uc880 \ub354 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc9c0\ub9cc, \uc27c\ud45c\ub85c \uad6c\ubd84\ub418\uace0, &#8220;\uac00 \uc778\uc6a9\ubd80\ud638\ub85c \uc4f0\uc778 \ub370\uc774\ud130 \ud654\uc77c\ub85c \uc0dd\uac01\ud560 \uc218 \uc788\ub2e4. \uc774\ub97c R\uc758 \uae30\ubcf8 \ud568\uc218\uc778 read.csv, readr::read_csv, data.table::fread\ub85c \uc77d\uc5b4\ubcf4\uba74 \uacb0\uacfc\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4. dat1 &lt;- read.table(&#8216;UTF-8test.txt&#8217;, sep=&#8217;,&#8217;, fileEncoding=&#8217;UTF-8&#8242;, stringsAsFactors=FALSE); dat1 dat2 &lt;- readr::read_delim(&#8216;UTF-8test.txt&#8217;, delim=&#8217;,&#8217;, col_names=FALSE); dat2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1134,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[28,94,179],"tags":[219,245,244,247,246],"jetpack_featured_media_url":"http:\/\/ds.sumeun.org\/wp-content\/uploads\/2019\/04\/Rhanglefiles.png","_links":{"self":[{"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/posts\/1129"}],"collection":[{"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1129"}],"version-history":[{"count":5,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/posts\/1129\/revisions"}],"predecessor-version":[{"id":1136,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/posts\/1129\/revisions\/1136"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=\/wp\/v2\/media\/1134"}],"wp:attachment":[{"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1129"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ds.sumeun.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}