{"id":3360,"date":"2017-05-05T09:34:17","date_gmt":"2017-05-05T08:34:17","guid":{"rendered":"https:\/\/abcdr.guyader.pro\/?p=3360"},"modified":"2018-04-08T00:02:49","modified_gmt":"2018-04-07T23:02:49","slug":"tibble-ou-data-frame","status":"publish","type":"post","link":"https:\/\/thinkr.fr\/abcdr\/tibble-ou-data-frame\/","title":{"rendered":"tibble ou data.frame ?"},"content":{"rendered":"<p>Commen\u00e7ons par un point important : un tibble est un data.frame&#8230; mais un data.frame am\u00e9lior\u00e9 !<\/p>\n<p>\u00c9l\u00e9ment central du tidyverse, cette forme diff\u00e8re des data.frame natifs dans deux comportements :<\/p>\n<ul>\n<li>l&rsquo;affichage : les tibbles s&rsquo;adaptent \u00e0 l&rsquo;\u00e9cran, et chaque colonne affiche son type.<\/li>\n<li>la s\u00e9lection : elle est plus stricte dans un tibble \u2014 elle ne se fait jamais en partial match, et un message d&rsquo;erreur s&rsquo;affiche lorsque vous s\u00e9lectionner un \u00e9l\u00e9ment qui n&rsquo;existe pas.<\/li>\n<\/ul>\n<p>Pour cr\u00e9er un tibble, deux solutions : la conversion depuis un data.frame, ou la cr\u00e9ation \u00e0 la main.<\/p>\n<pre><code>library(tibble)\ndata(\"swiss\")\nas_tibble(swiss)\ntibble(x = 1:4,\n       y = 5:8)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Commen\u00e7ons par un point important : un tibble est un data.frame&#8230; mais un data.frame am\u00e9lior\u00e9 ! \u00c9l\u00e9ment central du tidyverse, cette forme diff\u00e8re des data.frame natifs dans deux comportements : l&rsquo;affichage : les tibbles s&rsquo;adaptent \u00e0 l&rsquo;\u00e9cran, et chaque colonne affiche son type. la s\u00e9lection : elle est plus stricte dans un tibble \u2014 elle ne se fait jamais en partial match, et un message d&rsquo;erreur s&rsquo;affiche lorsque vous s\u00e9lectionner un \u00e9l\u00e9ment qui n&rsquo;existe pas. Pour cr\u00e9er un tibble, deux solutions : la conversion depuis un data.frame, ou la cr\u00e9ation \u00e0 la main. library(tibble) data(\u00ab\u00a0swiss\u00a0\u00bb) as_tibble(swiss) tibble(x = 1:4, y = 5:8)<a class=\"more-link\" href=\"https:\/\/thinkr.fr\/abcdr\/tibble-ou-data-frame\/\">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_post_was_ever_published":false,"_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":""},"categories":[12,22],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-colin","4":"post-3360","6":"format-standard","7":"category-manipulation-de-donnees","8":"category-tidyverse"},"acf":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9O7Sx-Sc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3360","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=3360"}],"version-history":[{"count":2,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3360\/revisions"}],"predecessor-version":[{"id":4325,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3360\/revisions\/4325"}],"wp:attachment":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/media?parent=3360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/categories?post=3360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/tags?post=3360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}