← Back to R Course | Chapter 1: Getting Started | Lesson 2 of 6

R का Console

R console एक chat window है जहाँ आप एक command type करते हैं और R तुरंत answer देता है। यह एक calculator जैसा है जो words भी समझता है।

In this page:

  1. R Console

R Console

R console एक interactive prompt है जहाँ आप expressions type करते हैं और तुरंत results देखते हैं, एक पूरी script लिखने से पहले quick exploration के लिए useful।

आपकी दी गई हर complete expression evaluate होती है और इसकी value console पर automatically print होती है (हालाँकि script के अंदर नहीं)। Scripts, इसके उलट, output दिखाने के लिए explicit print() या cat() calls चाहिए।

Note: Interactive console पर, बस एक variable का नाम type करना इसकी value print करता है -- लेकिन एक script के अंदर आपको explicitly print() call करना ज़रूरी है।

उदाहरण: The R Console

markup
x <- 42
print(x)

y <- x * 2
print(y)
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. एक command type करना और closing bracket या quote भूल जाना, console को एक + continuation prompt पर छोड़ते हुए; cancel करने के लिए Esc दबाएँ।
  2. यह मान लेना कि console में saved variables R बंद होने के बाद भी persist करते हैं, जब workspace खो जाता है जब तक आप इसे save न करें।
  3. console में x = 5 type करना और हर context में x <- 5 behaviour की उम्मीद करना, जब function calls के अंदर arguments = को अलग तरीके से treat करते हैं।
🔒

Chapter Quiz — Complete all 6 topics to unlock

0/6 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.