Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
How do I format my code blocks?

I see everybody on this website posting their R outputs from the R console into the question boxes into a nice neat format. How can I do the same?

Basically I want to show in a question box exactly what I see in my R studio console. Copy paste does not work because the rows link together.

share|improve this question

migrated from stackoverflow.com Nov 19 '12 at 18:06

This question came from our site for professional and enthusiast programmers.

marked as duplicate by John, Toon Krijthe, animuson, yoozer8, Robert Harvey Nov 19 '12 at 20:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Also note that a copy/paste of the results of dput(object) will let someone paste your object into their R console, which is very useful for sharing a test object. (See stackoverflow.com/q/5963269/903061) – Gregor Nov 19 '12 at 18:09
    
And after dput, the very useful CTRL-K to format what you pasted into the Stack* page. – Carl Witthoft Nov 19 '12 at 20:01

Try the FAQ and study the formatting bar on top of the box. The two curly braces are formatted code and four indents do the same.

share|improve this answer
    
Also (though perhaps not directly an answer to the question) if you need to have code within some text, you can enclose it in backquotes (` `) giving code formatting : carfit <- lm(dist~speed, data = cars) - which is sometimes convenient. – Glen_b Nov 19 '12 at 19:59