The second, which is what I usually use, is to just ask for help in the usual way: The first, is the usual help.start(), and using a web browser. There are at least two ways of calling help in R inside TeXmacs. We can control this by specifying the size of the image that should actually be produced by R v(width=8,height=8) (remember you can go up and edit the previous expression): Thesefore, hit enter a couple more times, followed by v():Īs you can see, the size of the graph doesn’t fit very well. Not only that, but it might be that we’re not even finished with sending/receiving all the input lines. The current interface between TeXmacs and R can not tell when the R process finished evaluating its input. These represent the prompts given by R as the lines are sent to the session. Here is a nice plot taken from the R Graph Gallery. > plot(1:10) title("Our first sample plot") v() You could, of course, have done two plot commands and one v(). We now have a second copy of our graph, with a title. v() inserts the current plot as is into TeXmacs. The result will look something like the following:Īs you see, we needed two commands: the usual plot call, and v(). Notice that after the first plot() command, usually a new window pops up, and you have to select the TeXmacs window again. To turn on this coloring scheme, select the aptly named menu item Document →add package→Program →varsession.īTW: If you prefer to invert the behaviour of enter and shift-enter, select the option multiline input as shown below: You also see two additional features: syntax highlighting, and special background colors for input and output text. The input field will expend, and nothing will be sent to the R process. If you would like to enter multiple lines of text at once, press shift-enter, instead of enter. The output will be replaced by The new output. What is nice in using TeXmacs as an interface to R is that you can now move up to the previous line, edit it, and press enter again. After starting an R session, you get the usual R prompt ‘>’.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |