R का Console
R console एक chat window है जहाँ आप एक command type करते हैं और R तुरंत answer देता है। यह एक calculator जैसा है जो words भी समझता है।
In this page:
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
x <- 42
print(x)
y <- x * 2
print(y)
Login to try C/C++/Java/PHP code in the editor
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. #}
आम गलतियां
- एक command type करना और closing bracket या quote भूल जाना, console को एक
+continuation prompt पर छोड़ते हुए; cancel करने के लिए Esc दबाएँ। - यह मान लेना कि console में saved variables R बंद होने के बाद भी persist करते हैं, जब workspace खो जाता है जब तक आप इसे save न करें।
- console में
x = 5type करना और हर context मेंx <- 5behaviour की उम्मीद करना, जब function calls के अंदर arguments=को अलग तरीके से treat करते हैं।
🔒
Chapter Quiz — Complete all 6 topics to unlock
0/6 topics done
Complete these topics first: