{"id":3127,"date":"2015-07-13T13:57:15","date_gmt":"2015-07-13T12:57:15","guid":{"rendered":"https:\/\/abcdr.guyader.pro\/?p=3127"},"modified":"2018-04-08T00:01:59","modified_gmt":"2018-04-07T23:01:59","slug":"comment-arrondir-un-nombre-quelques-fonctions-floor-ceiling-round","status":"publish","type":"post","link":"https:\/\/thinkr.fr\/abcdr\/comment-arrondir-un-nombre-quelques-fonctions-floor-ceiling-round\/","title":{"rendered":"Comment arrondir un nombre ? Quelques fonctions : floor, ceiling, round."},"content":{"rendered":"<p>Plusieurs fonctions existent sur R et permettent d\u2019arrondir un nombre selon diff\u00e9rentes r\u00e8gles\u00a0:<\/p>\n<p>\u00a0<\/p>\n<pre><code><br \/>floor(1.26)\u00a0\u00a0 #floor() arrondit \u00e0 l'entier le plus petit\n\n[1] 1\n\n\u00a0\n\nceiling(1.26) #ceiling() arrondit \u00e0 l'entier le plus grand\n\n[1] 2\n\n\u00a0\n\n#round() arrondit au nombre le plus proche\n\n#le param\u00e8tre digit pr\u00e9cise le nombre de chiffres apr\u00e8s la virgule que nous voulons conserver\n\nround(1.26, digits=0)\n\n[1] 1\n\nround(1.76, digits=0)\n\n[1] 2\n\nround(1.76, digits=1)\n\n[1] 1.8\n\nround(1.72, digits=1)\n\n[1] 1.7\n\n<\/code><\/pre>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Plusieurs fonctions existent sur R et permettent d\u2019arrondir un nombre selon diff\u00e9rentes r\u00e8gles\u00a0: \u00a0 floor(1.26)\u00a0\u00a0 #floor() arrondit \u00e0 l&rsquo;entier le plus petit [1] 1 \u00a0 ceiling(1.26) #ceiling() arrondit \u00e0 l&rsquo;entier le plus grand [1] 2 \u00a0 #round() arrondit au nombre le plus proche #le param\u00e8tre digit pr\u00e9cise le nombre de chiffres apr\u00e8s la virgule que nous voulons conserver round(1.26, digits=0) [1] 1 round(1.76, digits=0) [1] 2 round(1.76, digits=1) [1] 1.8 round(1.72, digits=1) [1] 1.7 \u00a0<a class=\"more-link\" href=\"https:\/\/thinkr.fr\/abcdr\/comment-arrondir-un-nombre-quelques-fonctions-floor-ceiling-round\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":13,"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":[8,23],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-helene","4":"post-3127","6":"format-standard","7":"category-fonctions-utiles","8":"category-transformation-de-donnees"},"acf":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9O7Sx-Or","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3127","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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/comments?post=3127"}],"version-history":[{"count":2,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3127\/revisions"}],"predecessor-version":[{"id":4274,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3127\/revisions\/4274"}],"wp:attachment":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/media?parent=3127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/categories?post=3127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/tags?post=3127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}