{"id":2982,"date":"2023-07-19T19:08:39","date_gmt":"2023-07-19T19:08:39","guid":{"rendered":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/"},"modified":"2023-07-19T19:08:39","modified_gmt":"2023-07-19T19:08:39","slug":"rdeki-okuma-satirlari","status":"publish","type":"post","link":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/","title":{"rendered":"R&#39;de readlines() fonksiyonu nas\u0131l kullan\u0131l\u0131r (\u00f6rneklerle)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">R&#8217;deki <strong>readLines()<\/strong> i\u015flevi, bir ba\u011flant\u0131 nesnesindeki metin sat\u0131rlar\u0131n\u0131n tamam\u0131n\u0131 veya bir k\u0131sm\u0131n\u0131 okumak i\u00e7in kullan\u0131labilir.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Bu i\u015flev a\u015fa\u011f\u0131daki s\u00f6zdizimini kullan\u0131r:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong>readLines(con, n=-1L)<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Alt\u0131n:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>dezavantaj:<\/strong> bir ba\u011flant\u0131 nesnesi veya bir karakter dizisi<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>n:<\/strong> Okunacak maksimum sat\u0131r say\u0131s\u0131. Varsay\u0131lan t\u00fcm sat\u0131rlar\u0131 okumakt\u0131r.<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">A\u015fa\u011f\u0131daki \u00f6rnekler, bu i\u015flevin, <strong>some_data.txt<\/strong> ad\u0131 verilen a\u015fa\u011f\u0131daki metin dosyas\u0131yla pratikte nas\u0131l kullan\u0131laca\u011f\u0131n\u0131 g\u00f6sterir:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-25801\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lignes-de-lecture1.jpg\" alt=\"R'de readLines i\u015flevi\" width=\"470\" height=\"340\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <strong><span style=\"color: #000000;\">\u00d6rnek 1: Bir metin dosyas\u0131ndaki t\u00fcm sat\u0131rlar\u0131 okumak i\u00e7in readLines() i\u015flevini kullan\u0131n<\/span><\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Metin dosyas\u0131n\u0131n bilgisayar\u0131mdaki <strong>Belgeler<\/strong> klas\u00f6r\u00fcne kaydedildi\u011fini varsayal\u0131m.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Bu metin dosyas\u0131ndaki her sat\u0131r\u0131 okumak i\u00e7in a\u015fa\u011f\u0131daki <strong>readLines()<\/strong> i\u015flevini kullanabilirim:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#read every line from some_data.txt\n<\/span>readLines(\"C:\/Users\/Bob\/Documents\/some_data.txt\")\n\n[1] \u201cThe first line of the file\u201d \u201cThe second line of the file\u201d\n[3] \u201cThe third line of the file\u201d \u201cThe fourth line of the file\u201d\n[5] \"The fifth line of the file\" \"The sixth line of the file\"  \n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Metin dosyas\u0131 6 sat\u0131r i\u00e7erdi\u011finden <strong>readLines()<\/strong> i\u015flevi 6 uzunlu\u011funda bir karakter vekt\u00f6r\u00fc \u00fcretir.<\/span><\/p>\n<p> <span style=\"color: #000000;\">E\u011fer istersem bunun yerine metin dosyas\u0131n\u0131n sat\u0131rlar\u0131n\u0131 bir veri \u00e7er\u00e7evesine kaydedebilirim:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#read every line from some_data.txt\n<\/span>my_data &lt;- readLines(\"C:\/Users\/Bob\/Documents\/some_data.txt\")\n\n<span style=\"color: #008080;\">#create data frame\n<\/span>df = data. <span style=\"color: #3366ff;\">frame<\/span> (values=my_data)\n\n<span style=\"color: #008080;\">#view data frame\n<\/span>df\n\n                       values\n1 The first line of the file\n2 The second line of the file\n3 The third line of the file\n4 The fourth line of the file\n5 The fifth line of the file\n6 The sixth line of the file<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Sonu\u00e7, bir s\u00fctun ve alt\u0131 sat\u0131rdan olu\u015fan bir veri \u00e7er\u00e7evesidir.<\/span><\/p>\n<h3> <strong><span style=\"color: #000000;\">\u00d6rnek 2: Bir metin dosyas\u0131n\u0131n ilk N sat\u0131r\u0131n\u0131 okumak i\u00e7in readLines() i\u015flevini kullan\u0131n<\/span><\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Tekrar metin dosyas\u0131n\u0131n bilgisayar\u0131mdaki <strong>Belgelerim<\/strong> klas\u00f6r\u00fcne kaydedildi\u011fini varsayal\u0131m.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Bu metin dosyas\u0131n\u0131n yaln\u0131zca ilk n sat\u0131r\u0131n\u0131 okumak i\u00e7in a\u015fa\u011f\u0131daki <strong>readLines()<\/strong> i\u015flevini <strong>n<\/strong> arg\u00fcman\u0131yla kullanabilirim:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#read first 4 lines from some_data.txt\n<\/span>readLines(\"C:\/Users\/Bob\/Documents\/some_data.txt\", n= <span style=\"color: #008000;\">4<\/span> )\n\n[1] \u201cThe first line of the file\u201d \u201cThe second line of the file\u201d\n[3] \u201cThe third line of the file\u201d \u201cThe fourth line of the file\u201d\n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\"><strong>readLines()<\/strong> i\u015flevi 4 uzunlu\u011funda bir karakter vekt\u00f6r\u00fc \u00fcretir.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Bu metin dosyas\u0131ndaki belirli bir sat\u0131ra gitmek i\u00e7in k\u00f6\u015feli parantezleri de kullanabilirim.<\/span><\/p>\n<p> <span style=\"color: #000000;\">\u00d6rne\u011fin karakter vekt\u00f6r\u00fcn\u00fcn yaln\u0131zca ikinci sat\u0131r\u0131na eri\u015fmek i\u00e7in a\u015fa\u011f\u0131daki kodu kullanabilirim:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#read first 4 lines from some_data.txt\n<\/span>my_data &lt;- readLines(\"C:\/Users\/Bob\/Documents\/some_data.txt\", n= <span style=\"color: #008000;\">4<\/span> )\n\n<span style=\"color: #008080;\">#display second line only\n<\/span>my_data[2]\n\n[1] \"The second line of the file\"\n<\/strong><\/span><\/pre>\n<h3> <span style=\"color: #000000;\"><strong>Ek kaynaklar<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">A\u015fa\u011f\u0131daki e\u011fitimlerde di\u011fer dosya t\u00fcrlerinin R&#8217;ye nas\u0131l aktar\u0131laca\u011f\u0131 a\u00e7\u0131klanmaktad\u0131r:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/tr\/r-okuma-masasi\/\" target=\"_blank\" rel=\"noopener\">R&#8217;de read.table nas\u0131l kullan\u0131l\u0131r?<\/a><br \/> <a href=\"https:\/\/statorials.org\/tr\/csvyi-r'ye-aktar\/\" target=\"_blank\" rel=\"noopener\">CSV dosyalar\u0131 R&#8217;ye nas\u0131l aktar\u0131l\u0131r<\/a><br \/> <a href=\"https:\/\/statorials.org\/tr\/exceli-r'ye-aktar\/\" target=\"_blank\" rel=\"noopener\">Excel dosyalar\u0131 R&#8217;ye nas\u0131l aktar\u0131l\u0131r<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>R&#8217;deki readLines() i\u015flevi, bir ba\u011flant\u0131 nesnesindeki metin sat\u0131rlar\u0131n\u0131n tamam\u0131n\u0131 veya bir k\u0131sm\u0131n\u0131 okumak i\u00e7in kullan\u0131labilir. Bu i\u015flev a\u015fa\u011f\u0131daki s\u00f6zdizimini kullan\u0131r: readLines(con, n=-1L) Alt\u0131n: dezavantaj: bir ba\u011flant\u0131 nesnesi veya bir karakter dizisi n: Okunacak maksimum sat\u0131r say\u0131s\u0131. Varsay\u0131lan t\u00fcm sat\u0131rlar\u0131 okumakt\u0131r. A\u015fa\u011f\u0131daki \u00f6rnekler, bu i\u015flevin, some_data.txt ad\u0131 verilen a\u015fa\u011f\u0131daki metin dosyas\u0131yla pratikte nas\u0131l kullan\u0131laca\u011f\u0131n\u0131 g\u00f6sterir: \u00d6rnek [&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-2982","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&#039;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller<\/title>\n<meta name=\"description\" content=\"Bu e\u011fitimde R&#039;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 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-okuma-satirlari\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R&#039;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller\" \/>\n<meta property=\"og:description\" content=\"Bu e\u011fitimde R&#039;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-19T19:08:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lignes-de-lecture1.jpg\" \/>\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=\"3 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/\",\"url\":\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/\",\"name\":\"R&#39;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/tr\/#website\"},\"datePublished\":\"2023-07-19T19:08:39+00:00\",\"dateModified\":\"2023-07-19T19:08:39+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48\"},\"description\":\"Bu e\u011fitimde R&#39;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ev\",\"item\":\"https:\/\/statorials.org\/tr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R&#39;de readlines() fonksiyonu nas\u0131l kullan\u0131l\u0131r (\u00f6rneklerle)\"}]},{\"@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&#39;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller","description":"Bu e\u011fitimde R&#39;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 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-okuma-satirlari\/","og_locale":"tr_TR","og_type":"article","og_title":"R&#39;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller","og_description":"Bu e\u011fitimde R&#39;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.","og_url":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/","og_site_name":"Statorials","article_published_time":"2023-07-19T19:08:39+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lignes-de-lecture1.jpg"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Dr.benjamin anderson","Tahmini okuma s\u00fcresi":"3 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/","url":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/","name":"R&#39;de readLines() Fonksiyonu Nas\u0131l Kullan\u0131l\u0131r (\u00d6rneklerle) \u2013 Statoryaller","isPartOf":{"@id":"https:\/\/statorials.org\/tr\/#website"},"datePublished":"2023-07-19T19:08:39+00:00","dateModified":"2023-07-19T19:08:39+00:00","author":{"@id":"https:\/\/statorials.org\/tr\/#\/schema\/person\/365dc158a39a7c8ae256355451e3de48"},"description":"Bu e\u011fitimde R&#39;de readLines() fonksiyonunun nas\u0131l kullan\u0131laca\u011f\u0131 birka\u00e7 \u00f6rnekle a\u00e7\u0131klanmaktad\u0131r.","breadcrumb":{"@id":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/tr\/rdeki-okuma-satirlari\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Ev","item":"https:\/\/statorials.org\/tr\/"},{"@type":"ListItem","position":2,"name":"R&#39;de readlines() fonksiyonu nas\u0131l kullan\u0131l\u0131r (\u00f6rneklerle)"}]},{"@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\/2982","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=2982"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/posts\/2982\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/media?parent=2982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/categories?post=2982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/tr\/wp-json\/wp\/v2\/tags?post=2982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}