{"id":3370,"date":"2017-05-05T09:40:15","date_gmt":"2017-05-05T08:40:15","guid":{"rendered":"https:\/\/abcdr.guyader.pro\/?p=3370"},"modified":"2018-04-08T00:02:47","modified_gmt":"2018-04-07T23:02:47","slug":"comment-separer-une-colonne-separate","status":"publish","type":"post","link":"https:\/\/thinkr.fr\/abcdr\/comment-separer-une-colonne-separate\/","title":{"rendered":"Comment s\u00e9parer une colonne ? separate()"},"content":{"rendered":"<p>Votre colonne contient deux variables (ou plus), et vous avez besoin de la s\u00e9parer ? Pour <strong>transformer xx_yy en deux colonnes qui contiendront xx et yy<\/strong>, faites appel \u00e0 la fonction separate() du package tidyr !<\/p>\n<p><em>separate<\/em> prend quatre arguments principaux : le tableau, le nom de la colonne \u00e0 s\u00e9parer, les noms des colonnes cibles, et le s\u00e9parateur.<\/p>\n<pre><code>library(tidyr)\ndata(\"presidential\")\nseparate(presidential, start, c(\"y\",\"m\", \"d\"), sep = \"-\")<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Votre colonne contient deux variables (ou plus), et vous avez besoin de la s\u00e9parer ? Pour transformer xx_yy en deux colonnes qui contiendront xx et yy, faites appel \u00e0 la fonction separate() du package tidyr ! separate prend quatre arguments principaux : le tableau, le nom de la colonne \u00e0 s\u00e9parer, les noms des colonnes cibles, et le s\u00e9parateur. library(tidyr) data(\u00ab\u00a0presidential\u00a0\u00bb) separate(presidential, start, c(\u00ab\u00a0y\u00a0\u00bb,\u00a0\u00bbm\u00a0\u00bb, \u00ab\u00a0d\u00a0\u00bb), sep = \u00ab\u00a0-\u00ab\u00a0)<a class=\"more-link\" href=\"https:\/\/thinkr.fr\/abcdr\/comment-separer-une-colonne-separate\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"twitter_399453572_399453572":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12,22],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-colin","4":"post-3370","6":"format-standard","7":"category-manipulation-de-donnees","8":"category-tidyverse"},"acf":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9O7Sx-Sm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/comments?post=3370"}],"version-history":[{"count":2,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3370\/revisions"}],"predecessor-version":[{"id":4323,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3370\/revisions\/4323"}],"wp:attachment":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/media?parent=3370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/categories?post=3370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/tags?post=3370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}