{"id":3684,"date":"2023-07-16T03:51:33","date_gmt":"2023-07-16T03:51:33","guid":{"rendered":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/"},"modified":"2023-07-16T03:51:33","modified_gmt":"2023-07-16T03:51:33","slug":"rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin","status":"publish","type":"post","link":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/","title":{"rendered":"R&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">R&#8217;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctun eklemek i\u00e7in a\u015fa\u011f\u0131daki y\u00f6ntemleri kullanabilirsiniz:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Y\u00f6ntem 1: data.frame nesnesine birden \u00e7ok s\u00fctun ekleme<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>df[c(' <span style=\"color: #ff0000;\">new_col1<\/span> ', ' <span style=\"color: #ff0000;\">new_col2<\/span> ', ' <span style=\"color: #ff0000;\">new_col3<\/span> ')] &lt;- NA\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>Y\u00f6ntem 2: data.table nesnesine birden \u00e7ok s\u00fctun ekleme<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">library<\/span> (data.table)\n\ndf[, ':='(new_col1 = new_col1, new_col2 = new_col2, new_col3 = new_col3)] \n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">A\u015fa\u011f\u0131daki \u00f6rnekler her y\u00f6ntemin pratikte nas\u0131l kullan\u0131laca\u011f\u0131n\u0131 g\u00f6stermektedir.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>\u00d6rnek 1: data.frame nesnesine birden \u00e7ok s\u00fctun ekleme<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">R&#8217;de a\u015fa\u011f\u0131daki veri \u00e7er\u00e7evesine sahip oldu\u011fumuzu varsayal\u0131m:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (A=c(4, 8, 10, 2, 15, 12, 7, 22),\n                 B=c(6, 3, 9, 7, 6, 8, 14, 10),\n                 C=c(10, 9, 4, 4, 3, 7, 10, 11))\n\n<span style=\"color: #008080;\">#view data frame\n<\/span>df\n\n   ABC\n1 4 6 10\n2 8 3 9\n3 10 9 4\n4 2 7 4\n5 15 6 3\n6 12 8 7\n7 7 14 10\n8 22 10 11<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">NA de\u011ferlerinin her birini i\u00e7eren veri \u00e7er\u00e7evesine \u00fc\u00e7 yeni s\u00fctun eklemek i\u00e7in a\u015fa\u011f\u0131daki s\u00f6zdizimini kullanabiliriz:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#add three new columns to data frame\n<\/span>df[c(' <span style=\"color: #ff0000;\">D<\/span> ', ' <span style=\"color: #ff0000;\">E<\/span> ', ' <span style=\"color: #ff0000;\">F<\/span> ')] &lt;- NA\n\n<span style=\"color: #008080;\">#view updated data frame\n<\/span>df\n\n   A B C D E F\n1 4 6 10 NA NA NA\n2 8 3 9 NA NA NA\n3 10 9 4 NA NA NA\n4 2 7 4 NA NA NA\n5 15 6 3 NA NA NA\n6 12 8 7 NA NA NA\n7 7 14 10 NA NA NA\n8 22 10 11 NA NA NA<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Veri \u00e7er\u00e7evesine t\u00fcm NA de\u011ferlerini i\u00e7eren \u00fc\u00e7 yeni s\u00fctun eklendi.<\/span><\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>\u00d6rnek 2: data.table nesnesine birden \u00e7ok s\u00fctun ekleme<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">R&#8217;de a\u015fa\u011f\u0131daki veri tablosuna sahip oldu\u011fumuzu varsayal\u0131m:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">library<\/span> (data.table)\n\n<span style=\"color: #008080;\">#create data table\n<\/span>dt &lt;- data. <span style=\"color: #3366ff;\">table<\/span> (A=c(4, 8, 10, 2, 15, 12, 7, 22),\n                 B=c(6, 3, 9, 7, 6, 8, 14, 10),\n                 C=c(10, 9, 4, 4, 3, 7, 10, 11))\n\n<span style=\"color: #008080;\">#view data table\n<\/span>dt\n\n    ABC\n1:4 6 10\n2:8 3 9\n3:10 9 4\n4:2 7 4\n5:15 6 3\n6:12 8 7\n7:7 14 10\n8:22 10 11\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Veri tablosuna iki yeni s\u00fctun eklemek i\u00e7in a\u015fa\u011f\u0131daki s\u00f6zdizimini kullanabiliriz:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#define two columns to add\n<\/span>D = c(4, 5, 5, 4, 7, 8, 12, 10)\nE = c(2, 2, 5, 7, 6, 5, 10, 13)\n\n<span style=\"color: #008080;\">#add two columns to data table\n<\/span>dt[, ':='(D = D, E = E)]\n\n<span style=\"color: #008080;\">#view updated data table\n<\/span>dt\n\n    A B C D E\n1:4 6 10 4 2\n2: 8 3 9 5 2\n3:10 9 4 5 5\n4:2 7 4 4 7\n5:15 6 3 7 6\n6:12 8 7 8 5\n7:7 14 10 12 10\n8:22 10 11 10 13\n<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Veri tablosuna iki yeni s\u00fctunun eklendi\u011fini unutmay\u0131n.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Ek kaynaklar<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">A\u015fa\u011f\u0131daki e\u011fitimlerde R&#8217;de di\u011fer ortak g\u00f6revlerin nas\u0131l ger\u00e7ekle\u015ftirilece\u011fi a\u00e7\u0131klanmaktad\u0131r:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/tr\/r-diger-sutunlara-dayali-olarak-bir-veri-cercevesine-bir-sutun-eklemek\/\" target=\"_blank\" rel=\"noopener\">R&#8217;deki di\u011fer s\u00fctunlara dayal\u0131 olarak veri \u00e7er\u00e7evesine s\u00fctun nas\u0131l eklenir<\/a><br \/> <a href=\"https:\/\/statorials.org\/tr\/rde-birden-cok-sutuna-gore-siralama\/\" target=\"_blank\" rel=\"noopener\">R&#8217;de birden \u00e7ok s\u00fctuna g\u00f6re s\u0131ralama nas\u0131l yap\u0131l\u0131r<\/a><br \/> <a href=\"https:\/\/statorials.org\/tr\/sutunlari-yeniden-sirala-r\/\" target=\"_blank\" rel=\"noopener\">R&#8217;de s\u00fctunlar nas\u0131l yeniden d\u00fczenlenir<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>R&#8217;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctun eklemek i\u00e7in a\u015fa\u011f\u0131daki y\u00f6ntemleri kullanabilirsiniz: Y\u00f6ntem 1: data.frame nesnesine birden \u00e7ok s\u00fctun ekleme df[c(&#8216; new_col1 &#8216;, &#8216; new_col2 &#8216;, &#8216; new_col3 &#8216;)] &lt;- NA Y\u00f6ntem 2: data.table nesnesine birden \u00e7ok s\u00fctun ekleme library (data.table) df[, &#8216;:='(new_col1 = new_col1, new_col2 = new_col2, new_col3 = new_col3)] A\u015fa\u011f\u0131daki \u00f6rnekler her y\u00f6ntemin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-3684","post","type-post","status-publish","format-standard","hentry","category-rehber"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R - Statorials&#039;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir<\/title>\n<meta name=\"description\" content=\"Bu e\u011fitimde, R&#039;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R - Statorials&#039;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir\" \/>\n<meta property=\"og:description\" content=\"Bu e\u011fitimde, R&#039;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-16T03:51:33+00:00\" \/>\n<meta name=\"author\" content=\"Dr.benjamin anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr.benjamin anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/\",\"url\":\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/\",\"name\":\"R - Statorials&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/tr\/#website\"},\"datePublished\":\"2023-07-16T03:51:33+00:00\",\"dateModified\":\"2023-07-16T03:51:33+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48\"},\"description\":\"Bu e\u011fitimde, R&#39;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ev\",\"item\":\"https:\/\/statorials.org\/tr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/tr\/#website\",\"url\":\"https:\/\/statorials.org\/tr\/\",\"name\":\"Statorials\",\"description\":\"\u0130statistik okuryazarl\u0131\u011f\u0131 rehberiniz!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/tr\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"tr\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/statorials.org\/tr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/tr\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/tr\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Merhaba, ben Benjamin, emekli bir istatistik profes\u00f6r\u00fc ve Statorials \u00f6\u011fretmenine d\u00f6n\u00fc\u015ft\u00fcm. \u0130statistik alan\u0131ndaki kapsaml\u0131 deneyimim ve uzmanl\u0131\u011f\u0131mla, \u00f6\u011frencilerimi Statorials arac\u0131l\u0131\u011f\u0131yla g\u00fc\u00e7lendirmek i\u00e7in bilgilerimi payla\u015fmaya can at\u0131yorum. Daha fazlas\u0131n\u0131 bil\",\"sameAs\":[\"https:\/\/statorials.org\/tr\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R - Statorials&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir","description":"Bu e\u011fitimde, R&#39;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.","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:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/","og_locale":"tr_TR","og_type":"article","og_title":"R - Statorials&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir","og_description":"Bu e\u011fitimde, R&#39;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.","og_url":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/","og_site_name":"Statorials","article_published_time":"2023-07-16T03:51:33+00:00","author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Dr.benjamin anderson","Tahmini okuma s\u00fcresi":"2 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/","url":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/","name":"R - Statorials&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir","isPartOf":{"@id":"https:\/\/statorials.org\/tr\/#website"},"datePublished":"2023-07-16T03:51:33+00:00","dateModified":"2023-07-16T03:51:33+00:00","author":{"@id":"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48"},"description":"Bu e\u011fitimde, R&#39;deki bir veri \u00e7er\u00e7evesine birden \u00e7ok s\u00fctunun nas\u0131l eklenece\u011fi birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.","breadcrumb":{"@id":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/tr\/rdeki-veri-cercevesine-birden-fazla-sutun-ekleyin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Ev","item":"https:\/\/statorials.org\/tr\/"},{"@type":"ListItem","position":2,"name":"R&#39;de veri \u00e7er\u00e7evesine birden fazla s\u00fctun nas\u0131l eklenir"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/tr\/#website","url":"https:\/\/statorials.org\/tr\/","name":"Statorials","description":"\u0130statistik okuryazarl\u0131\u011f\u0131 rehberiniz!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/tr\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"tr"},{"@type":"Person","@id":"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/statorials.org\/tr\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/tr\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/tr\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Merhaba, ben Benjamin, emekli bir istatistik profes\u00f6r\u00fc ve Statorials \u00f6\u011fretmenine d\u00f6n\u00fc\u015ft\u00fcm. \u0130statistik alan\u0131ndaki kapsaml\u0131 deneyimim ve uzmanl\u0131\u011f\u0131mla, \u00f6\u011frencilerimi Statorials arac\u0131l\u0131\u011f\u0131yla g\u00fc\u00e7lendirmek i\u00e7in bilgilerimi payla\u015fmaya can at\u0131yorum. Daha fazlas\u0131n\u0131 bil","sameAs":["https:\/\/statorials.org\/tr"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/posts\/3684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/comments?post=3684"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/posts\/3684\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/media?parent=3684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/categories?post=3684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/tags?post=3684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}