Re: [R] 2nd R Console
Oh now that *is* something interesting! Thank you Greg, I'll have to give this a try. -Original Message- From: Greg Snow [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 3:44 PM To: [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Subject: RE: [R] 2nd R Console Have you looked at the nws package? It allows for a common workspace that multiple R sessions can all access. Hope this helps, -Original Message- From: "Michael Janis" <[EMAIL PROTECTED]> To: "r-help@stat.math.ethz.ch" Sent: 7/30/07 7:49 AM Subject: [R] 2nd R Console Hi, I was reading a thread: [R] "2nd R console" and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which access the same R session (all objects in that session, etc.). This would be R on linux accessed through a shell - kind of like using GNU screen multi-user such that people could work collaboratively on a given session. The problem with screen is that all commands are interleaved in the same terminal, which is confusing and does not allow access to the command prompt at the same time, rather it would be sequential. I know there will be "why" questions but it is useful in an academic environment. Basically we have a memory machine for large genomic analysis - and we could set that up as an Rserver, but this placing R into a multi-user engine is better suited for our immediate needs. Does anybody have thoughts on this? Thanks for considering, Michael Janis UCLA Bioinformatics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] 2nd R Console
Have you looked at the nws package? It allows for a common workspace that multiple R sessions can all access. Hope this helps, -Original Message- From: "Michael Janis" <[EMAIL PROTECTED]> To: "r-help@stat.math.ethz.ch" Sent: 7/30/07 7:49 AM Subject: [R] 2nd R Console Hi, I was reading a thread: [R] "2nd R console" and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which access the same R session (all objects in that session, etc.). This would be R on linux accessed through a shell - kind of like using GNU screen multi-user such that people could work collaboratively on a given session. The problem with screen is that all commands are interleaved in the same terminal, which is confusing and does not allow access to the command prompt at the same time, rather it would be sequential. I know there will be "why" questions but it is useful in an academic environment. Basically we have a memory machine for large genomic analysis - and we could set that up as an Rserver, but this placing R into a multi-user engine is better suited for our immediate needs. Does anybody have thoughts on this? Thanks for considering, Michael Janis UCLA Bioinformatics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] 2nd R Console
On 28-Jul-07 08:19:10, Michael Janis wrote: > Hi, > > I was reading a thread: [R] "2nd R console" and had a similar > question regarding having more than one R console open at a time. > However, my question differs from that of the thread: > > Is it possible, or is there a wrapper that will allow one, to open > an arbitrary number of R consoles which access the same R session > (all objects in that session, etc.). This would be R on linux > accessed through a shell - kind of like using GNU screen multi-user > such that people could work collaboratively on a given session. > The problem with screen is that all commands are interleaved in > the same terminal, which is confusing and does not allow access > to the command prompt at the same time, rather it would be sequential. > I know there will be "why" questions but it is useful in an > academic environment. Basically we have a memory machine for large > genomic analysis - and we could set that up as an Rserver, but this > placing R into a multi-user engine is better suited for our immediate > needs. Does anybody have thoughts on this? You could have a look at XMX (X-protocol Multiplexer). This is now rather old, and I think it has not been further developed for many years. http://www.cs.brown.edu/software/xmx/README.patch7 Basically, you would start XMX from one machine (A) networked to others (B,C,...), all running X-windows. in the startup, you designate which machines are to share the session, and what rights they will have. On machine A, and all designated machines B, C, ... , appears a window. This in fact acts like a screen emulator, with its own X session inside it. The A user then starts up a program (say R) in this window, and what A sees is mirrored on the other machines. If A has granted input privileges to the other machines, then users of B, C, ... can do things themselves, and the effects of their actions are mirrored to all the other machines. Thus, for instance, it would be possible for different users to take turns at entering commands into the R session, and so on, from their own machines. This is a much better way of arranging things, than having all the people queue up to take turns at sitting in the one and only chair! It is certainly useful in a classroom situation, and even in a one-to-one tutorial. For instance, I've used it in the past to teach programming and system management, sitting more or less beside the other person but at different machines. We would both, for instance, be editing the same program file, and either could initiate a program run with the current file. (Of course, what's technically called a "race condition" can develop here ... ). I've even envisaged the scenario where two people, one in England and one in the US, could simultaneously be editing a joint paper (you'd also need an independent communication channel as well, but that's no problem using a "chat" program). The one constraint with XMX (at least in the past, I'm not sure to what extent it may have been relaxed) which can limit its use is that it depends on fairly close compatibility between the X resources of all the different machines. It's best of they're identical (same screen resolution e.g. 1024x768, same colour depths on all screens, ... ). Otherwise it's liable to not establish the necessary connections, and only some machines can join in. However, in a computing lab environment, it may well be that all machines are compatible. Suck it and see! Hoping this is useful, Ted. E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 094 0861 Date: 30-Jul-07 Time: 19:27:48 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] 2nd R Console
Hi, I was reading a thread: [R] "2nd R console" and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which access the same R session (all objects in that session, etc.). This would be R on linux accessed through a shell - kind of like using GNU screen multi-user such that people could work collaboratively on a given session. The problem with screen is that all commands are interleaved in the same terminal, which is confusing and does not allow access to the command prompt at the same time, rather it would be sequential. I know there will be "why" questions but it is useful in an academic environment. Basically we have a memory machine for large genomic analysis - and we could set that up as an Rserver, but this placing R into a multi-user engine is better suited for our immediate needs. Does anybody have thoughts on this? Thanks for considering, Michael Janis UCLA Bioinformatics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] 2nd R Console
Hi, I was reading a thread: [R] "2nd R console" and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which access the same R session (all objects in that session, etc.). This would be R on linux accessed through a shell - kind of like using GNU screen multi-user such that people could work collaboratively on a given session. The problem with screen is that all commands are interleaved in the same terminal, which is confusing and does not allow access to the command prompt at the same time, rather it would be sequential. I know there will be "why" questions but it is useful in an academic environment. Basically we have a memory machine for large genomic analysis - and we could set that up as an Rserver, but this placing R into a multi-user engine is better suited for our immediate needs. Does anybody have thoughts on this? Thanks for considering, Michael Janis UCLA Bioinformatics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] keyboard issue in R console
We can also say that in recent versions of R you have to choose deliberately to disable readline when building R. (This is made quite hard: I am currently building R on a brand new Solaris 10 system, and I had to work to get the right 64-bit libreadline linked in. Just having libreadline[-devel] missing is not enough.) I think Hao Liu needs to explain how he managed to do this, by giving the basic information asked for in the posting guide, e.g. - version of R - what is 'linux' here - how R was installed (from sources, RPM, .deb ) On Fri, 4 May 2007, Marc Schwartz wrote: > On Fri, 2007-05-04 at 10:48 -0400, Hao Liu wrote: >> hi! All: >> >> I can do up or down arrow on keyboard to browse through command history >> on R console in windows. However, I can't do that on a linux xterm or >> console... I wonder how to make this feature work on linux... it will >> make working a lot more efficient... >> >> Thanks >> Hao > > You are most likely missing the readline library and/or the readline > 'devel' files, depending upon how you installed R. > > See R FAQ 7.20 How can I get command line editing to work? > > http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-get-command-line-editing-to-work_003f > > > Additional information is available in the R Installation/Administration > Manual with your system or in HTML here: > > http://cran.us.r-project.org/doc/manuals/R-admin.html > > HTH, > > Marc Schwartz > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] keyboard issue in R console
On Fri, 2007-05-04 at 10:48 -0400, Hao Liu wrote: > hi! All: > > I can do up or down arrow on keyboard to browse through command history > on R console in windows. However, I can't do that on a linux xterm or > console... I wonder how to make this feature work on linux... it will > make working a lot more efficient... > > Thanks > Hao You are most likely missing the readline library and/or the readline 'devel' files, depending upon how you installed R. See R FAQ 7.20 How can I get command line editing to work? http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-get-command-line-editing-to-work_003f Additional information is available in the R Installation/Administration Manual with your system or in HTML here: http://cran.us.r-project.org/doc/manuals/R-admin.html HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] keyboard issue in R console
hi! All: I can do up or down arrow on keyboard to browse through command history on R console in windows. However, I can't do that on a linux xterm or console... I wonder how to make this feature work on linux... it will make working a lot more efficient... Thanks Hao __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Mac OS X: Clearing R Console screen
Hi all, I'm trying to figure out how to clear the console (screen) in the Mac OS X R console. Using ctrl-l does not work. I have also tried system ("clear") but, I get "TERM environment variable not set.", I find this a bit strange because system("ls") and other bash commands work fine. When using R in Terminal or iTerm, the system("clear") works great. Any ideas on how to get the R Console to clear, or how to set the TERM variable? I see others have had similar issues but, can't seem to find the solution. Thanks! Jesse __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
>>>>> "Lauri" == Lauri Nikkinen <[EMAIL PROTECTED]> >>>>> on Fri, 9 Feb 2007 14:21:26 +0200 writes: Lauri> This still does not solve the issue that when I print in R console I get Lauri> columns that don't fit in the window underneath each other. Thanks anyway! But Brian did give you all you needed (even more I'd say) to solve that !?!? Please apologize if I use a bit frank language, but using R, you *really* are expected to read the documentation which is written pretty carefully {probably that's what some people don't like about it and call "confusing" ??}. Specifically, Brian said BDR> 200 columns will take far more than 250 characters. The help says and then pointed you to the docu for options(width = .). I think you need to reread that paragraph, particularly the word 'character' and then you will understand that your original approach of using options(width = 250) can *not* be what you want if your dataframe has 200 columns. Martin Lauri> 2007/2/9, Martin Maechler <[EMAIL PROTECTED]>: >> >> >>>>> "Petr" == Petr Pikal <[EMAIL PROTECTED]> >> >>>>> on Fri, 09 Feb 2007 09:42:13 +0100 writes: >> Petr> Hi Petr> On 9 Feb 2007 at 10:17, Lauri Nikkinen wrote: >> >> >> Thank you for your answer. When I set options(width=250) I still get >> >> the same result when I print the data.frame on my Rgui console (R >> >> 2.4.1, Windows XP). Colums become underneath each other. I also get >> an >> >> error (?) message >> >> [ reached getOption("max.print") -- omitted 3462 rows ]]. >> >> As Petr explains below (and Brian Ripley), you >> *really* should use different means here --- >> but I think this is the first time that the relatively new >> option 'max.print' has "hit R-help", hence one other hint, maybe >> useful to the public: >> >> Note that the 'max.print' option was introduced exactly for the >> purpose of **protecting** the inadvertent user from a flood of output >> spilling into his console/gui/.. >> (and apparently locking up R completely, we have even seen >> crashes when people wanted to print dataframes/matrices/arrays >> with millions of entries). >> >> So, given the above message (yes, not an error), >> why did you not try to read >> help(getOption) >> and look for the word 'max.print' there ? >> --> if you really really don't want to follow the advice of >> Brian and Petr, then say something like >> options(max.print = 1e6) >> >> Martin Maechler, ETH Zurich >> >> >> >> For example if I have a data.frame with 4000 rows and 200 >> >> columns I would like to be able to use scroll bars in >> >> Rconsole to investigate the whole data.frame. >> Petr> I am not sure if it is the best idea. You shall probably use >> other Petr> means for checking your data frame. >> Petr> Try ?summary, ?str or if you really want to check all values in >> data Petr> frame you can use >> Petr> invisible(edit(test)) >> Petr> to open a spreadsheet like editor. >> Petr> HTH Petr> Petr >> >> Lauri> [[alternative HTML version deleted]] Lauri> __ Lauri> R-help@stat.math.ethz.ch mailing list Lauri> https://stat.ethz.ch/mailman/listinfo/r-help Lauri> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html Lauri> and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
Hi, This still does not solve the issue that when I print in R console I get columns that don't fit in the window underneath each other. Thanks anyway! -Lauri 2007/2/9, Martin Maechler <[EMAIL PROTECTED]>: > > >>>>> "Petr" == Petr Pikal <[EMAIL PROTECTED]> > >>>>> on Fri, 09 Feb 2007 09:42:13 +0100 writes: > >Petr> Hi >Petr> On 9 Feb 2007 at 10:17, Lauri Nikkinen wrote: > >>> Thank you for your answer. When I set options(width=250) I still get >>> the same result when I print the data.frame on my Rgui console (R >>> 2.4.1, Windows XP). Colums become underneath each other. I also get > an >>> error (?) message >>> [ reached getOption("max.print") -- omitted 3462 rows ]]. > > As Petr explains below (and Brian Ripley), you > *really* should use different means here --- > but I think this is the first time that the relatively new > option 'max.print' has "hit R-help", hence one other hint, maybe > useful to the public: > > Note that the 'max.print' option was introduced exactly for the > purpose of **protecting** the inadvertent user from a flood of output > spilling into his console/gui/.. > (and apparently locking up R completely, we have even seen > crashes when people wanted to print dataframes/matrices/arrays > with millions of entries). > > So, given the above message (yes, not an error), > why did you not try to read > help(getOption) > and look for the word 'max.print' there ? > > --> if you really really don't want to follow the advice of > Brian and Petr, then say something like > options(max.print = 1e6) > > Martin Maechler, ETH Zurich > > >>> For example if I have a data.frame with 4000 rows and 200 >>> columns I would like to be able to use scroll bars in >>> Rconsole to investigate the whole data.frame. > >Petr> I am not sure if it is the best idea. You shall probably use > other >Petr> means for checking your data frame. > >Petr> Try ?summary, ?str or if you really want to check all values in > data >Petr> frame you can use > >Petr> invisible(edit(test)) > >Petr> to open a spreadsheet like editor. > >Petr> HTH >Petr> Petr > > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
> "Petr" == Petr Pikal <[EMAIL PROTECTED]> > on Fri, 09 Feb 2007 09:42:13 +0100 writes: Petr> Hi Petr> On 9 Feb 2007 at 10:17, Lauri Nikkinen wrote: >> Thank you for your answer. When I set options(width=250) I still get >> the same result when I print the data.frame on my Rgui console (R >> 2.4.1, Windows XP). Colums become underneath each other. I also get an >> error (?) message >> [ reached getOption("max.print") -- omitted 3462 rows ]]. As Petr explains below (and Brian Ripley), you *really* should use different means here --- but I think this is the first time that the relatively new option 'max.print' has "hit R-help", hence one other hint, maybe useful to the public: Note that the 'max.print' option was introduced exactly for the purpose of **protecting** the inadvertent user from a flood of output spilling into his console/gui/.. (and apparently locking up R completely, we have even seen crashes when people wanted to print dataframes/matrices/arrays with millions of entries). So, given the above message (yes, not an error), why did you not try to read help(getOption) and look for the word 'max.print' there ? --> if you really really don't want to follow the advice of Brian and Petr, then say something like options(max.print = 1e6) Martin Maechler, ETH Zurich >> For example if I have a data.frame with 4000 rows and 200 >> columns I would like to be able to use scroll bars in >> Rconsole to investigate the whole data.frame. Petr> I am not sure if it is the best idea. You shall probably use other Petr> means for checking your data frame. Petr> Try ?summary, ?str or if you really want to check all values in data Petr> frame you can use Petr> invisible(edit(test)) Petr> to open a spreadsheet like editor. Petr> HTH Petr> Petr __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
Ok. Thanks for all of you. I have used fix, edit, summary and str for checking my data. Before R I have used SAS and SPSS so I'm used to view my data in spreadsheet. -Lauri 2007/2/9, Petr Pikal <[EMAIL PROTECTED]>: > > Hi > > > On 9 Feb 2007 at 10:17, Lauri Nikkinen wrote: > > Date sent: Fri, 9 Feb 2007 10:17:48 +0200 > From: "Lauri Nikkinen" <[EMAIL PROTECTED]> > To: "Prof Brian Ripley" <[EMAIL PROTECTED]> > Copies to: r-help@stat.math.ethz.ch > Subject:Re: [R] Data.frame columns in R console > > > Thank you for your answer. When I set options(width=250) I still get > > the same result when I print the data.frame on my Rgui console (R > > 2.4.1, Windows XP). Colums become underneath each other. I also get an > > error (?) message [ reached getOption("max.print") -- omitted 3462 > > rows ]]. For example if I have a data.frame with 4000 rows and 200 > > columns I would like to be able to use scroll bars in Rconsole to > > investigate the whole data.frame. > > I am not sure if it is the best idea. You shall probably use other > means for checking your data frame. > > Try ?summary, ?str or if you really want to check all values in data > frame you can use > > invisible(edit(test)) > > to open a spreadsheet like editor. > > HTH > Petr > > > > > > > > > > > > > btw, R is very useful system, my sincere thanks goes to R developers! > > > > > > > > -Lauri > > > > > > 2007/2/8, Prof Brian Ripley <[EMAIL PROTECTED]>: > > > > > > ?options, look for 'width'. > > > > > > I don't know what OS this in: the Windows Rgui has an option to set > > > the width to the width of the console, but you can override it. > > > > > > On Thu, 8 Feb 2007, Lauri Nikkinen wrote: > > > > > > > Hi R-users, > > > > > > > > > > > > > > > > A newbie question: assume that I have for example 30 columns in my > > > > data.frame named DF. When I print DF in R console I get columns > > > > that > > > don't > > > > fit on the same row underneath each other. So how do I change the > > > > R > > > console > > > > preferences so that the console does not wrap my data.frame > > > > columns? I > > > want > > > > the columns to be printed next to each other, as in a normal > > > > table. > > > > > > > > > > > > > > > > Cheers, > > > > > > > > Lauri > > > > > > > > [[alternative HTML version deleted]] > > > > > > > > __ > > > > R-help@stat.math.ethz.ch mailing list > > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > > PLEASE do read the posting guide > > > http://www.R-project.org/posting-guide.html > > > > and provide commented, minimal, self-contained, reproducible code. > > > > > > > > > > -- > > > Brian D. Ripley, [EMAIL PROTECTED] > > > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > > > University of Oxford, Tel: +44 1865 272861 (self) 1 > > > South Parks Road, +44 1865 272866 (PA) Oxford > > > OX1 3TG, UKFax: +44 1865 272595 > > > > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html and provide commented, > > minimal, self-contained, reproducible code. > > Petr Pikal > [EMAIL PROTECTED] > > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
Hi On 9 Feb 2007 at 10:17, Lauri Nikkinen wrote: Date sent: Fri, 9 Feb 2007 10:17:48 +0200 From: "Lauri Nikkinen" <[EMAIL PROTECTED]> To: "Prof Brian Ripley" <[EMAIL PROTECTED]> Copies to: r-help@stat.math.ethz.ch Subject: Re: [R] Data.frame columns in R console > Thank you for your answer. When I set options(width=250) I still get > the same result when I print the data.frame on my Rgui console (R > 2.4.1, Windows XP). Colums become underneath each other. I also get an > error (?) message [ reached getOption("max.print") -- omitted 3462 > rows ]]. For example if I have a data.frame with 4000 rows and 200 > columns I would like to be able to use scroll bars in Rconsole to > investigate the whole data.frame. I am not sure if it is the best idea. You shall probably use other means for checking your data frame. Try ?summary, ?str or if you really want to check all values in data frame you can use invisible(edit(test)) to open a spreadsheet like editor. HTH Petr > > > > btw, R is very useful system, my sincere thanks goes to R developers! > > > > -Lauri > > > 2007/2/8, Prof Brian Ripley <[EMAIL PROTECTED]>: > > > > ?options, look for 'width'. > > > > I don't know what OS this in: the Windows Rgui has an option to set > > the width to the width of the console, but you can override it. > > > > On Thu, 8 Feb 2007, Lauri Nikkinen wrote: > > > > > Hi R-users, > > > > > > > > > > > > A newbie question: assume that I have for example 30 columns in my > > > data.frame named DF. When I print DF in R console I get columns > > > that > > don't > > > fit on the same row underneath each other. So how do I change the > > > R > > console > > > preferences so that the console does not wrap my data.frame > > > columns? I > > want > > > the columns to be printed next to each other, as in a normal > > > table. > > > > > > > > > > > > Cheers, > > > > > > Lauri > > > > > > [[alternative HTML version deleted]] > > > > > > __ > > > R-help@stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > > and provide commented, minimal, self-contained, reproducible code. > > > > > > > -- > > Brian D. Ripley, [EMAIL PROTECTED] > > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > > University of Oxford, Tel: +44 1865 272861 (self) 1 > > South Parks Road, +44 1865 272866 (PA) Oxford > > OX1 3TG, UKFax: +44 1865 272595 > > > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html and provide commented, > minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
On Fri, 9 Feb 2007, Lauri Nikkinen wrote: > Thank you for your answer. When I set options(width=250) I still get the > same result when I print the data.frame on my Rgui console (R 2.4.1, Windows > XP). Colums become underneath each other. I also get an error (?) message [ > reached getOption("max.print") -- omitted 3462 rows ]]. For example if I > have a data.frame with 4000 rows and 200 columns I would like to be able to > use scroll bars in Rconsole to investigate the whole data.frame. 200 columns will take far more than 250 characters. The help says 'width': controls the number of characters on a line. You may want to change this if you re-size the window that R is running in. Valid values are 10...1 with default normally 80. I would use the spreadsheet view of edit(mydf) in preference. > btw, R is very useful system, my sincere thanks goes to R developers! > > > > -Lauri > > > 2007/2/8, Prof Brian Ripley <[EMAIL PROTECTED]>: >> >> ?options, look for 'width'. >> >> I don't know what OS this in: the Windows Rgui has an option to set the >> width to the width of the console, but you can override it. >> >> On Thu, 8 Feb 2007, Lauri Nikkinen wrote: >> >>> Hi R-users, >>> >>> >>> >>> A newbie question: assume that I have for example 30 columns in my >>> data.frame named DF. When I print DF in R console I get columns that >> don't >>> fit on the same row underneath each other. So how do I change the R >> console >>> preferences so that the console does not wrap my data.frame columns? I >> want >>> the columns to be printed next to each other, as in a normal table. >>> >>> >>> >>> Cheers, >>> >>> Lauri >>> >>> [[alternative HTML version deleted]] >>> >>> __ >>> R-help@stat.math.ethz.ch mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> -- >> Brian D. Ripley, [EMAIL PROTECTED] >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UKFax: +44 1865 272595 >> > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
Thank you for your answer. When I set options(width=250) I still get the same result when I print the data.frame on my Rgui console (R 2.4.1, Windows XP). Colums become underneath each other. I also get an error (?) message [ reached getOption("max.print") -- omitted 3462 rows ]]. For example if I have a data.frame with 4000 rows and 200 columns I would like to be able to use scroll bars in Rconsole to investigate the whole data.frame. btw, R is very useful system, my sincere thanks goes to R developers! -Lauri 2007/2/8, Prof Brian Ripley <[EMAIL PROTECTED]>: > > ?options, look for 'width'. > > I don't know what OS this in: the Windows Rgui has an option to set the > width to the width of the console, but you can override it. > > On Thu, 8 Feb 2007, Lauri Nikkinen wrote: > > > Hi R-users, > > > > > > > > A newbie question: assume that I have for example 30 columns in my > > data.frame named DF. When I print DF in R console I get columns that > don't > > fit on the same row underneath each other. So how do I change the R > console > > preferences so that the console does not wrap my data.frame columns? I > want > > the columns to be printed next to each other, as in a normal table. > > > > > > > > Cheers, > > > > Lauri > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Data.frame columns in R console
?options, look for 'width'. I don't know what OS this in: the Windows Rgui has an option to set the width to the width of the console, but you can override it. On Thu, 8 Feb 2007, Lauri Nikkinen wrote: > Hi R-users, > > > > A newbie question: assume that I have for example 30 columns in my > data.frame named DF. When I print DF in R console I get columns that don't > fit on the same row underneath each other. So how do I change the R console > preferences so that the console does not wrap my data.frame columns? I want > the columns to be printed next to each other, as in a normal table. > > > > Cheers, > > Lauri > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Data.frame columns in R console
Hi R-users, A newbie question: assume that I have for example 30 columns in my data.frame named DF. When I print DF in R console I get columns that don't fit on the same row underneath each other. So how do I change the R console preferences so that the console does not wrap my data.frame columns? I want the columns to be printed next to each other, as in a normal table. Cheers, Lauri [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] 2nd R console?
On Fri, 10 Mar 2006, mark garey wrote: yes sorry at the very least i should have mentioned this is on OSX. Yes, but the real question is what you mean by "a 2nd R console". I guessed that you meant a second console for the same workspace, Brian Ripley guessed that you meant another instance of R. -thomas regards, mark+ \ ucsf On Mar 10, 2006, at 5:14 AM, roger bos wrote: I never tried opening more than one instance of Rgui, but when I wanted to run two jobs at the same time on one Win XP PC, I would run one in Rgui and one in Rterm and I have never had a problem with that setup.? As above, when I close my R session, I always say no to the save question. ? HTH, ? Roger ? On 3/10/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: On Thu, 9 Mar 2006, Thomas Lumley wrote: On Thu, 9 Mar 2006, mark garey wrote: hello all, i'm forwarding this question for a colleague. "Is it possible to open a 2nd R Console?" The answer is probably "No", but since it isn't clear what your colleague means by "a 2nd R Console" or what OS this is, it's hard to be sure. I would say the answer is almost certainly 'yes'.??In all the cases I know of if you launch 2 (or more) R consoles you will get separate R processes with separate workspaces.??The only problem I can envisage is that they might share a working directory and so the last one shut down could overwrite the workspace image and history saved from other consoles. (But that is only a problem if you save your work that way, and I rarely do.) -- Brian D. Ripley,[EMAIL PROTECTED] Professor of Applied Statistics,??http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel:??+44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax:??+44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- mark garey ucsf department of epidemiology and biostatistics division of biostatistics 185 berry street, suite 5700 san francisco, ca. 94107-1739 415.514.8147 [[alternative text/enriched version deleted]] Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
Never used that, but go to your bin folder and see if you see both Rgui.exeand Rterm.exe. If so, you can definitely use that method. HTH, Roger On 3/10/06, mark garey <[EMAIL PROTECTED]> wrote: > > yes sorry at the very least i should have mentioned this > is on OSX. > > regards, > > mark+ \ ucsf > > On Mar 10, 2006, at 5:14 AM, roger bos wrote: > > > I never tried opening more than one instance of Rgui, but when I > > wanted to run two jobs at the same time on one Win XP PC, I would run > > one in Rgui and one in Rterm and I have never had a problem with that > > setup. As above, when I close my R session, I always say no to the > > save question. > > > > HTH, > > > > Roger > > > > > > On 3/10/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: On Thu, 9 > > Mar 2006, Thomas Lumley wrote: > >> > >> > On Thu, 9 Mar 2006, mark garey wrote: > >> > > >> >> hello all, i'm forwarding this question for a colleague. > >> >> > >> >> "Is it possible to open a 2nd R Console?" > >> > > >> > The answer is probably "No", but since it isn't clear what your > >> colleague > >> > means by "a 2nd R Console" or what OS this is, it's hard to be sure. > >> > >> I would say the answer is almost certainly 'yes'.In all the cases I > >> know > >> of if you launch 2 (or more) R consoles you will get separate R > >> processes > >> with separate workspaces.The only problem I can envisage is that > >> they > >> might share a working directory and so the last one shut down could > >> overwrite the workspace image and history saved from other consoles. > >> (But that is only a problem if you save your work that way, and I > >> rarely > >> do.) > >> > >> -- > >> Brian D. Ripley,[EMAIL PROTECTED] > >> Professor of Applied Statistics,http://www.stats.ox.ac.uk/~ripley/ > >> University of Oxford, Tel:+44 1865 272861 (self) > >> 1 South Parks Road, +44 1865 272866 (PA) > >> Oxford OX1 3TG, UKFax:+44 1865 272595 > >> > >> __ > >> R-help@stat.math.ethz.ch mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide! > >> http://www.R-project.org/posting-guide.html > >> > -- > mark garey > ucsf > department of epidemiology and biostatistics > division of biostatistics > 185 berry street, suite 5700 > san francisco, ca. 94107-1739 > 415.514.8147 > >[[alternative text/enriched version deleted]] > > > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
yes sorry at the very least i should have mentioned this is on OSX. regards, mark+ \ ucsf On Mar 10, 2006, at 5:14 AM, roger bos wrote: > I never tried opening more than one instance of Rgui, but when I > wanted to run two jobs at the same time on one Win XP PC, I would run > one in Rgui and one in Rterm and I have never had a problem with that > setup. As above, when I close my R session, I always say no to the > save question. > > HTH, > > Roger > > > On 3/10/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: On Thu, 9 > Mar 2006, Thomas Lumley wrote: >> >> > On Thu, 9 Mar 2006, mark garey wrote: >> > >> >> hello all, i'm forwarding this question for a colleague. >> >> >> >> "Is it possible to open a 2nd R Console?" >> > >> > The answer is probably "No", but since it isn't clear what your >> colleague >> > means by "a 2nd R Console" or what OS this is, it's hard to be sure. >> >> I would say the answer is almost certainly 'yes'. In all the cases I >> know >> of if you launch 2 (or more) R consoles you will get separate R >> processes >> with separate workspaces. The only problem I can envisage is that >> they >> might share a working directory and so the last one shut down could >> overwrite the workspace image and history saved from other consoles. >> (But that is only a problem if you save your work that way, and I >> rarely >> do.) >> >> -- >> Brian D. Ripley,[EMAIL PROTECTED] >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UKFax: +44 1865 272595 >> >> __ >> R-help@stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >> -- mark garey ucsf department of epidemiology and biostatistics division of biostatistics 185 berry street, suite 5700 san francisco, ca. 94107-1739 415.514.8147 [[alternative text/enriched version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
I never tried opening more than one instance of Rgui, but when I wanted to run two jobs at the same time on one Win XP PC, I would run one in Rgui and one in Rterm and I have never had a problem with that setup. As above, when I close my R session, I always say no to the save question. HTH, Roger On 3/10/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > On Thu, 9 Mar 2006, Thomas Lumley wrote: > > > On Thu, 9 Mar 2006, mark garey wrote: > > > >> hello all, i'm forwarding this question for a colleague. > >> > >> "Is it possible to open a 2nd R Console?" > > > > The answer is probably "No", but since it isn't clear what your > colleague > > means by "a 2nd R Console" or what OS this is, it's hard to be sure. > > I would say the answer is almost certainly 'yes'. In all the cases I know > of if you launch 2 (or more) R consoles you will get separate R processes > with separate workspaces. The only problem I can envisage is that they > might share a working directory and so the last one shut down could > overwrite the workspace image and history saved from other consoles. > (But that is only a problem if you save your work that way, and I rarely > do.) > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
On Thu, 9 Mar 2006, Thomas Lumley wrote: > On Thu, 9 Mar 2006, mark garey wrote: > >> hello all, i'm forwarding this question for a colleague. >> >> "Is it possible to open a 2nd R Console?" > > The answer is probably "No", but since it isn't clear what your colleague > means by "a 2nd R Console" or what OS this is, it's hard to be sure. I would say the answer is almost certainly 'yes'. In all the cases I know of if you launch 2 (or more) R consoles you will get separate R processes with separate workspaces. The only problem I can envisage is that they might share a working directory and so the last one shut down could overwrite the workspace image and history saved from other consoles. (But that is only a problem if you save your work that way, and I rarely do.) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
On Windows, I often have more than one R console (instance of Rgui.exe) open at the same time. Unless by mistake, each instance is open on a unique working directory. MHP mark garey wrote on 3/9/2006 8:05 PM: > hello all, i'm forwarding this question for a colleague. > > "Is it possible to open a 2nd R Console?" > > regards, > > mark+ > > -- > mark garey > ucsf > department of epidemiology and biostatistics > division of biostatistics > 185 berry street, suite 5700 > san francisco, ca. 94107-1739 > 415.514.8147 > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > -- Michael H. Prager, Ph.D. Population Dynamics Team NOAA Center for Coastal Habitat and Fisheries Research NMFS Southeast Fisheries Science Center Beaufort, North Carolina 28516 USA http://shrimp.ccfhrb.noaa.gov/~mprager/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] 2nd R console?
On Thu, 9 Mar 2006, mark garey wrote: > hello all, i'm forwarding this question for a colleague. > > "Is it possible to open a 2nd R Console?" > The answer is probably "No", but since it isn't clear what your colleague means by "a 2nd R Console" or what OS this is, it's hard to be sure. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] 2nd R console?
hello all, i'm forwarding this question for a colleague. "Is it possible to open a 2nd R Console?" regards, mark+ -- mark garey ucsf department of epidemiology and biostatistics division of biostatistics 185 berry street, suite 5700 san francisco, ca. 94107-1739 415.514.8147 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
And here is a reworked version that checks if it is RGui, if WSH is started, etc. and that returns invisibly TRUE/FALSE: # An R function to clear the screen on RGui: cls <- function() { if (.Platform$GUI[1] != "Rgui") return(invisible(FALSE)) if (!require(rcom, quietly = TRUE)) # Not shown any way! stop("Package rcom is required for 'cls()'") wsh <- comCreateObject("Wscript.Shell") if (is.null(wsh)) { return(invisible(FALSE)) } else { comInvoke(wsh, "SendKeys", "\014") return(invisible(TRUE)) } } #cls() # test # If you want to make sure that it worked (well, not 100% sure, but...) res <- cls() if (res) cat("Console should be cleared now!\n") Best, Philippe Grosjean P.S.: Gabor, I would like to include this function in the SciViews bundle. Would it be a problem for you? ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Pentagone (3D08) ( ( ( ( (Academie Universitaire Wallonie-Bruxelles ) ) ) ) ) 8, av du Champ de Mars, 7000 Mons, Belgium ( ( ( ( ( ) ) ) ) ) phone: + 32.65.37.34.97, fax: + 32.65.37.30.54 ( ( ( ( (email: [EMAIL PROTECTED] ) ) ) ) ) ( ( ( ( (web: http://www.umh.ac.be/~econum ) ) ) ) ) http://www.sciviews.org ( ( ( ( ( .. Gabor Grothendieck wrote: > Here is a version that uses rcom instead of RDCOMClient. > This has the advantage that rcom is on CRAN. > > cls <- function() { > require(rcom) > wsh <- comCreateObject("Wscript.Shell") > comInvoke(wsh, "SendKeys", "\014") > invisible(wsh) > } > cls() # test > > On 2/17/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > >>Here is a translation of Norm Olsen's vbscript code into pure R. >>This is intended for use with the Windows Rgui interface. >> >>cls <- function() { >> require(RDCOMClient) >> wsh <- COMCreate("Wscript.Shell") >> wsh$SendKeys("\014") >> invisible(wsh) >>} >>cls() # invoke >> >> >> >>On 2/17/06, Marcus Leinweber <[EMAIL PROTECTED]> wrote: >> >>>have already tried this? >>> >>>http://finzi.psych.upenn.edu/R/Rhelp02a/archive/55752.html >>> >>>m. >>> >>> >>> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] >>>>[mailto:[EMAIL PROTECTED] On Behalf Of Michael >>>>Sent: Thursday, February 16, 2006 9:23 PM >>>>To: Henrik Bengtsson >>>>Cc: R-help@stat.math.ethz.ch >>>>Subject: Re: [R] how to clear screen in R-console? >>>> >>>>I am actually using Rgui on Windows... >>>> >>>>What can I do? >>>> >>>>There is no way to programmatically clear screen? >>>> >>> >>>__ >>>R-help@stat.math.ethz.ch mailing list >>>https://stat.ethz.ch/mailman/listinfo/r-help >>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >>> >> > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
On Thu, 16 Feb 2006, Henrik Bengtsson wrote: > On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > > > On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > > > > > >How to clear the screen in R-console? > > > > > > ctrl - e & l > > > > Any funcation that is callable from my program, instead of > > pressing keys? > > depends on what type of terminal you are running. For example, if you > run R in a VT100 terminal, you can try > > cat("The following VT100 escape sequence will clear the screen on a > VT100 terminal\n") > cat("\033[2J") # [2J == Clear Screen > cat("If the screen was cleared you should only see this sentence.\n") > > i.e. > > vt100ClearScreen <- function(...) cat("\033[2J") > On my terminal, this required the addition of cursor homing to replicate the effects of using the OS to clear the screen. system_cls <- function() system("clear") vt100_cls <- function() cat("\033[2J\033[H") -- SIGSIG -- signature too long (core dumped) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
Here is a version that uses rcom instead of RDCOMClient. This has the advantage that rcom is on CRAN. cls <- function() { require(rcom) wsh <- comCreateObject("Wscript.Shell") comInvoke(wsh, "SendKeys", "\014") invisible(wsh) } cls() # test On 2/17/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Here is a translation of Norm Olsen's vbscript code into pure R. > This is intended for use with the Windows Rgui interface. > > cls <- function() { >require(RDCOMClient) >wsh <- COMCreate("Wscript.Shell") >wsh$SendKeys("\014") >invisible(wsh) > } > cls() # invoke > > > > On 2/17/06, Marcus Leinweber <[EMAIL PROTECTED]> wrote: > > have already tried this? > > > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/55752.html > > > > m. > > > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > > > Sent: Thursday, February 16, 2006 9:23 PM > > > To: Henrik Bengtsson > > > Cc: R-help@stat.math.ethz.ch > > > Subject: Re: [R] how to clear screen in R-console? > > > > > > I am actually using Rgui on Windows... > > > > > > What can I do? > > > > > > There is no way to programmatically clear screen? > > > > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
Here is a translation of Norm Olsen's vbscript code into pure R. This is intended for use with the Windows Rgui interface. cls <- function() { require(RDCOMClient) wsh <- COMCreate("Wscript.Shell") wsh$SendKeys("\014") invisible(wsh) } cls() # invoke On 2/17/06, Marcus Leinweber <[EMAIL PROTECTED]> wrote: > have already tried this? > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/55752.html > > m. > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > > Sent: Thursday, February 16, 2006 9:23 PM > > To: Henrik Bengtsson > > Cc: R-help@stat.math.ethz.ch > > Subject: Re: [R] how to clear screen in R-console? > > > > I am actually using Rgui on Windows... > > > > What can I do? > > > > There is no way to programmatically clear screen? > > > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
have already tried this? http://finzi.psych.upenn.edu/R/Rhelp02a/archive/55752.html m. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > Sent: Thursday, February 16, 2006 9:23 PM > To: Henrik Bengtsson > Cc: R-help@stat.math.ethz.ch > Subject: Re: [R] how to clear screen in R-console? > > I am actually using Rgui on Windows... > > What can I do? > > There is no way to programmatically clear screen? > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
On 2/16/2006 3:22 PM, Michael wrote: > I am actually using Rgui on Windows... > > What can I do? > > There is no way to programmatically clear screen? Of course there's a way, or Rgui couldn't do it. The menu item calls the function "menuclear", which is exported from R.dll, currently with definition void menuclear(control m) { consoleclear(RConsole); } You don't have access to a valid value for m, but since it's not used, that shouldn't matter. Write a C function to import this function from R.dll and call it. You shouldn't count on your function working in any newer release; menuclear is not part of the published API. And you shouldn't expect your code to work if you're running in Rterm or on any platform other than Windows. But if you're desperate to call it, you can. Brian Ripley has made many of the menu operations in Rgui available through R functions. Perhaps they all should be; would you like to write the code to do it? If so, please write up the R interface before you go ahead and do all the work. I expect there will be some disagreement there, and it might affect the implementation. Duncan Murdoch > > On 2/16/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> depends on what type of terminal you are running. For example, if you >> run R in a VT100 terminal, you can try >> >> cat("The following VT100 escape sequence will clear the screen on a >> VT100 terminal\n") >> cat("\033[2J") # [2J == Clear Screen >> cat("If the screen was cleared you should only see this sentence.\n") >> >> i.e. >> >> vt100ClearScreen <- function(...) cat("\033[2J") >> >> Some links: >> http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html >> http://en.wikipedia.org/wiki/VT100 >> >> Note, this is not guaranteed to work everywhere. To the best of my >> knowledge, you will not be able to do anything like this in Rgui on >> Windows. >> >> Cheers >> >> Henrik >> >> >> On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: >> > Any funcation that is callable from my program, instead of pressing >> keys? >> > >> > Thanks a lot! >> > >> > >> > On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: >> > > >> > > ctrl - e & l >> > > >> > > >HI all, >> > > > >> > > >How to clear the screen in R-console? >> > > > >> > > >Thanks a [EMAIL PROTECTED] >> > > > >> > > > [[alternative HTML version deleted]] >> > > > >> > > >__ >> > > >R-help@stat.math.ethz.ch mailing list >> > > >https://stat.ethz.ch/mailman/listinfo/r-help >> > > >PLEASE do read the posting guide! >> > > http://www.R-project.org/posting-guide.html >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > [[alternative HTML version deleted]] >> > >> > __ >> > R-help@stat.math.ethz.ch mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-help >> > PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >> > >> > >> >> >> -- >> Henrik Bengtsson >> Mobile: +46 708 909208 (+1h UTC) >> > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > I am actually using Rgui on Windows... > > What can I do? The only way I can think of is to do write a lot of empty lines, e.g. cat(rep("\n",64)) You will not get the prompt at the upper-left corner. Better than nothing. /Henrik > There is no way to programmatically clear screen? > > On 2/16/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > depends on what type of terminal you are running. For example, if you > > run R in a VT100 terminal, you can try > > > > cat("The following VT100 escape sequence will clear the screen on a > > VT100 terminal\n") > > cat("\033[2J") # [2J == Clear Screen > > cat("If the screen was cleared you should only see this sentence.\n") > > > > i.e. > > > > vt100ClearScreen <- function(...) cat("\033[2J") > > > > Some links: > > http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html > > http://en.wikipedia.org/wiki/VT100 > > > > Note, this is not guaranteed to work everywhere. To the best of my > > knowledge, you will not be able to do anything like this in Rgui on > > Windows. > > > > Cheers > > > > Henrik > > > > > > On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > > > Any funcation that is callable from my program, instead of pressing > > keys? > > > > > > Thanks a lot! > > > > > > > > > On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > > > > > > > ctrl - e & l > > > > > > > > >HI all, > > > > > > > > > >How to clear the screen in R-console? > > > > > > > > > >Thanks a [EMAIL PROTECTED] > > > > > > > > > > [[alternative HTML version deleted]] > > > > > > > > > >__ > > > > >R-help@stat.math.ethz.ch mailing list > > > > >https://stat.ethz.ch/mailman/listinfo/r-help > > > > >PLEASE do read the posting guide! > > > > http://www.R-project.org/posting-guide.html > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] > > > > > > __ > > > R-help@stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
I am actually using Rgui on Windows... What can I do? There is no way to programmatically clear screen? On 2/16/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > > Hi, > > depends on what type of terminal you are running. For example, if you > run R in a VT100 terminal, you can try > > cat("The following VT100 escape sequence will clear the screen on a > VT100 terminal\n") > cat("\033[2J") # [2J == Clear Screen > cat("If the screen was cleared you should only see this sentence.\n") > > i.e. > > vt100ClearScreen <- function(...) cat("\033[2J") > > Some links: > http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html > http://en.wikipedia.org/wiki/VT100 > > Note, this is not guaranteed to work everywhere. To the best of my > knowledge, you will not be able to do anything like this in Rgui on > Windows. > > Cheers > > Henrik > > > On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > > Any funcation that is callable from my program, instead of pressing > keys? > > > > Thanks a lot! > > > > > > On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > > > > > ctrl - e & l > > > > > > >HI all, > > > > > > > >How to clear the screen in R-console? > > > > > > > >Thanks a [EMAIL PROTECTED] > > > > > > > > [[alternative HTML version deleted]] > > > > > > > >__ > > > >R-help@stat.math.ethz.ch mailing list > > > >https://stat.ethz.ch/mailman/listinfo/r-help > > > >PLEASE do read the posting guide! > > > http://www.R-project.org/posting-guide.html > > > > > > > > > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > > > > > > -- > Henrik Bengtsson > Mobile: +46 708 909208 (+1h UTC) > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
Hi, depends on what type of terminal you are running. For example, if you run R in a VT100 terminal, you can try cat("The following VT100 escape sequence will clear the screen on a VT100 terminal\n") cat("\033[2J") # [2J == Clear Screen cat("If the screen was cleared you should only see this sentence.\n") i.e. vt100ClearScreen <- function(...) cat("\033[2J") Some links: http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html http://en.wikipedia.org/wiki/VT100 Note, this is not guaranteed to work everywhere. To the best of my knowledge, you will not be able to do anything like this in Rgui on Windows. Cheers Henrik On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > Any funcation that is callable from my program, instead of pressing keys? > > Thanks a lot! > > > On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > > > ctrl - e & l > > > > >HI all, > > > > > >How to clear the screen in R-console? > > > > > >Thanks a [EMAIL PROTECTED] > > > > > > [[alternative HTML version deleted]] > > > > > >__ > > >R-help@stat.math.ethz.ch mailing list > > >https://stat.ethz.ch/mailman/listinfo/r-help > > >PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- Henrik Bengtsson Mobile: +46 708 909208 (+1h UTC) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
Any funcation that is callable from my program, instead of pressing keys? Thanks a lot! On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > ctrl - e & l > > >HI all, > > > >How to clear the screen in R-console? > > > >Thanks a [EMAIL PROTECTED] > > > > [[alternative HTML version deleted]] > > > >__ > >R-help@stat.math.ethz.ch mailing list > >https://stat.ethz.ch/mailman/listinfo/r-help > >PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > > > > > > > > [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
ctrl - e & l >HI all, > >How to clear the screen in R-console? > >Thanks a [EMAIL PROTECTED] > > [[alternative HTML version deleted]] > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to clear screen in R-console?
Ctrl+L should work -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: 16 February 2006 10:33 To: R-help@stat.math.ethz.ch Subject: [R] how to clear screen in R-console? HI all, How to clear the screen in R-console? Thanks a [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to clear screen in R-console?
HI all, How to clear the screen in R-console? Thanks a [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
Le 29.08.2005 13:59, [EMAIL PROTECTED] a écrit : >Hello, >I'm interested in LaTeX notations in R graphics. >For example, i would like to know how to obtain this picture >http://www.r-project.org/screenshots/power.png. > >Thanks > > Hi, Have a look at R> ?plotmath R> demo(plotmath) Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques ~ ~~ Romain FRANCOIS - http://addictedtor.free.fr ~~ Etudiant ISUP - CS3 - Industrie et Services ~~http://www.isup.cicrp.jussieu.fr/ ~~ Stagiaire INRIA Futurs - Equipe SELECT ~~ http://www.inria.fr/recherche/equipes/select.fr.html~~ ~ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
[EMAIL PROTECTED] wrote: > Hello, > I'm interested in LaTeX notations in R graphics. > For example, i would like to know how to obtain this picture > http://www.r-project.org/screenshots/power.png. See ?plotmath Uwe Ligges > Thanks > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
Hello, I'm interested in LaTeX notations in R graphics. For example, i would like to know how to obtain this picture http://www.r-project.org/screenshots/power.png. Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console
Hi Daniela, Are you using the GUI (RGui.exe) or are you using R.exe inside the cmd.exe console? if the latter then you can right click on the blue bar at the top, select properties, and change "Screen Buffer Size" / Height to be something like 9000... then you can just use your mouse to slider back up to stuff you missed... On the number of questions per day... I think if you go through the "Posting Guide" http://www.r-project.org/posting-guide.html, the "Introduction to R", the FAQs (normal and Windows) http://cran.r-project.org/faqs.html and the other ancillary documentation, such asR-Tips http://www.ku.edu/~pauljohn/R/Rtips.html... all of which are mentioned in the Posting Guide... :-) The process of going through the posting guide each time, while a bit tedious is an incredible learning experience... many posts to the list just would never happen if the author went to the trouble of going through the posting guide... admittedly the introductory documentation is not as good as it could be and is a bit terse in places... However, that said, I am also a relative beginner at R, I try to read and understand every post, most of them just go straight over my head as my statistical skills are severely lacking and when people start talking about GLMs all I hear is a whooshing sound over my head :-) One way that I have found useful for learning is to pick on questions which are at my level and try and answer them... and in answering them, I learn with you. Of course sometimes I give sub-optimal answers, but there are plenty of experts around to nudge us in the right direction :-) cheers! Sean On 19/08/05, Daniela Salvini <[EMAIL PROTECTED]> wrote: > Hi Sean! > Thank you so much for replying so soon! Well, I am very bad at these things, > so I suppose my "platform" is Windows XP, is it what you need to know? I hope > so!... And how many questions are we allowed to pose to the mailing > list...per day? I suppose I will have quite a few ... : ) > Thank you so much! > Daniela > > PS Maybe I should read the Posting Guide, I did not notice there was one > > >>> [EMAIL PROTECTED] 08/19/05 8:29 am >>> > Hi Daniela, > > Which platform are you working on? If you're working within a console > on windows-98, then the answer is entirely different to working under > linux or RGui on windows. This is why the Posting Guide says to give > platform details :-) > > cheers! > Sean > > On 18/08/05, Daniela Salvini <[EMAIL PROTECTED]> wrote: > > I am at my first steps with R... and I already notice that the console has > > a quite limited number of lines. Can anyone tell me how to visualise all > > the information, which is actually present? I only see the last part of the > > output, which obviosly exceeds the maximum number of rows in the console. > > Thank you very much for your help! > > Daniela > > > > > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console
Hi Daniela, Which platform are you working on? If you're working within a console on windows-98, then the answer is entirely different to working under linux or RGui on windows. This is why the Posting Guide says to give platform details :-) cheers! Sean On 18/08/05, Daniela Salvini <[EMAIL PROTECTED]> wrote: > I am at my first steps with R... and I already notice that the console has a > quite limited number of lines. Can anyone tell me how to visualise all the > information, which is actually present? I only see the last part of the > output, which obviosly exceeds the maximum number of rows in the console. > Thank you very much for your help! > Daniela > > > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console
Quoting Daniela Salvini <[EMAIL PROTECTED]>: > I am at my first steps with R... and I already notice that the > console has a quite limited number of lines. Can anyone tell me how > to visualise all the information, which is actually present? I only > see the last part of the output, which obviosly exceeds the maximum > number of rows in the console. > Thank you very much for your help! > Daniela > "visualize" suggests plotting. do you mean "how do I look at the whole dataset?" you could print a few lines at a time, say X[1:25,]. With bigger datasets I usually look at the file in a text editor like emacs... albyn __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Console
I am at my first steps with R... and I already notice that the console has a quite limited number of lines. Can anyone tell me how to visualise all the information, which is actually present? I only see the last part of the output, which obviosly exceeds the maximum number of rows in the console. Thank you very much for your help! Daniela [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
On 7/29/2005 8:01 AM, Manuel Schneider wrote: > I played around with memory limits in R 2.1.0 under XP in order to be > able to work with large matrixes (3600x4100). Among several things I > tried was to alter console settings and saving them. > Since then, I can't restart Rgui. It says several times 'Console not > found' with pieces of the text that usually appears in the console and > then crashes. Rterm.exe works fine. > I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still > console is not found. > Any clues on this? You have probably got something bad in your startup files. See appendices B.1 and B.2 of the R-intro manual for all the details. In summary, R looks in Renviron.site, Rprofile.site, .Rprofile, .RData and Rconsole for startup information. (Where it looks is complicated; see the manual.) There are command line options to tell it to skip these; in particular, --vanilla tells it to skip all of them. I'd guess your problem is with Rconsole, because that's where the console settings are normally saved. Rename it to something else and your problems should go away. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
Sounds like you have corrupted your Rconsole file. Fire up rterm and try ?Rconsole and/or read the rw-FAQ to find the file that it is use. It is not removed by uninstalling, and you do need to remove it. (The console settings have nothing whatsoever to do with memory settings.) Your matrices are not particularly large, BTW, provided you have 1GB or more of RAM. If you have much less, adding some RAM is the most effective way of using R. On Fri, 29 Jul 2005, Manuel Schneider wrote: > I played around with memory limits in R 2.1.0 under XP in order to be > able to work with large matrixes (3600x4100). Among several things I > tried was to alter console settings and saving them. > Since then, I can't restart Rgui. It says several times 'Console not > found' with pieces of the text that usually appears in the console and > then crashes. Rterm.exe works fine. > I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still > console is not found. > Any clues on this? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Console not found
I played around with memory limits in R 2.1.0 under XP in order to be able to work with large matrixes (3600x4100). Among several things I tried was to alter console settings and saving them. Since then, I can't restart Rgui. It says several times 'Console not found' with pieces of the text that usually appears in the console and then crashes. Rterm.exe works fine. I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still console is not found. Any clues on this? Best regards Manuel °°° Manuel Schneider Eawag Environmental chemistry Ueberlandstr. 133 8600 Dübendorf Phone +41 44 823 51 18 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Cocoa GUI: pasting in R Console yields syntax error
Thanks David. I'm glad I'm not the only one. I was beginning to wonder if I had really lost it. Anthony On Dec 6, 2004, at 1:23 AM, David Enot wrote: Anthony I faced the same problem and it took me some time to spot the origin: I have no clue where it can come from!( I suspect this happened when I moved from 1.9.0 to 2.0.0, OS X 1.3...). I know that the built in R editor is very handy: what I do is a "more myfile.r" on the terminal to check if there are weird characters and then delete then directly with the R editor. Not very efficient I reckon: OS X gurus may have another solution! David On 6 Dec 2004, at 08:33, Anthony Westerling wrote: I've recently upgraded to R-2.0.1 on a Mac running OS X 10.3+ I am using the new Cocoa-based GUI. Everything was working well for a while. In the middle of an R session, I started "suddenly" to have a problem where code copied from an open editor window and pasted into the R Console gives a syntax error. It doesn't matter what the code is. If the same exact text is typed into the console directly, I get no errors. I tried quitting the R session and restarting. The problem did not go away. I tried using a different editor, instead of the built-in editor. After opening the file with my R code in it in AlphaX instead of the built-in editor, I could see that the text typed most recently ( ie, since the problem started) had a character that looked like an open square or box at the start of most lines. I deleted these and can't see any other extraneous symbols in AlphaX. However, I still get syntax errors when trying to paste code that was originally typed in using the built-in editor. If I retype the same thing in the same file using AlphaX, one line below the original, then copy and paste into the R console, it executes without generating syntax errors. So, it looks like something odd is going on with the built-in editor? Anthony Westerling __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Cocoa GUI: pasting in R Console yields syntax error
Anthony I faced the same problem and it took me some time to spot the origin: I have no clue where it can come from!( I suspect this happened when I moved from 1.9.0 to 2.0.0, OS X 1.3...). I know that the built in R editor is very handy: what I do is a "more myfile.r" on the terminal to check if there are weird characters and then delete then directly with the R editor. Not very efficient I reckon: OS X gurus may have another solution! David On 6 Dec 2004, at 08:33, Anthony Westerling wrote: I've recently upgraded to R-2.0.1 on a Mac running OS X 10.3+ I am using the new Cocoa-based GUI. Everything was working well for a while. In the middle of an R session, I started "suddenly" to have a problem where code copied from an open editor window and pasted into the R Console gives a syntax error. It doesn't matter what the code is. If the same exact text is typed into the console directly, I get no errors. I tried quitting the R session and restarting. The problem did not go away. I tried using a different editor, instead of the built-in editor. After opening the file with my R code in it in AlphaX instead of the built-in editor, I could see that the text typed most recently ( ie, since the problem started) had a character that looked like an open square or box at the start of most lines. I deleted these and can't see any other extraneous symbols in AlphaX. However, I still get syntax errors when trying to paste code that was originally typed in using the built-in editor. If I retype the same thing in the same file using AlphaX, one line below the original, then copy and paste into the R console, it executes without generating syntax errors. So, it looks like something odd is going on with the built-in editor? Anthony Westerling __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Cocoa GUI: pasting in R Console yields syntax error
I've recently upgraded to R-2.0.1 on a Mac running OS X 10.3+ I am using the new Cocoa-based GUI. Everything was working well for a while. In the middle of an R session, I started "suddenly" to have a problem where code copied from an open editor window and pasted into the R Console gives a syntax error. It doesn't matter what the code is. If the same exact text is typed into the console directly, I get no errors. I tried quitting the R session and restarting. The problem did not go away. I tried using a different editor, instead of the built-in editor. After opening the file with my R code in it in AlphaX instead of the built-in editor, I could see that the text typed most recently ( ie, since the problem started) had a character that looked like an open square or box at the start of most lines. I deleted these and can't see any other extraneous symbols in AlphaX. However, I still get syntax errors when trying to paste code that was originally typed in using the built-in editor. If I retype the same thing in the same file using AlphaX, one line below the original, then copy and paste into the R console, it executes without generating syntax errors. So, it looks like something odd is going on with the built-in editor? Anthony Westerling __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Rcmdr -> doItAndPrint -> summary method of S4-class objectnot in Rcmdr window but R Console
Dear Brian, > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Prof > Brian Ripley > Sent: Monday, November 22, 2004 5:57 AM > To: Pfaff, Bernhard > Cc: [EMAIL PROTECTED] > Subject: Re: [R] Rcmdr -> doItAndPrint -> summary method of > S4-class objectnot in Rcmdr window but R Console > > The FAQ Q8.1 does recommend that summary() methods do not > print themselves but returned a classed object to be printed. > > What doItAndPrint does is to capture the result of an > explicit print, so it will only work for summary methods that > follow that recommendation. > So that's it -- I should have seen that. > I do think doItAndPrint should be capturing all the output > from a function via sink(), and not just the print of the > final result. > That would be better, wouldn't it. I'll try to figure out how to make that work. Thanks, John > On Mon, 22 Nov 2004, Pfaff, Bernhard wrote: > > > Dear list member, > > > > John Fox proposed to me posting this problem to R-Help: > > > > I have written a function suited for Rcmdr and included this in a > > R-file located in Rcmdr/etc as well as an augmented > `Rcmdr-menus.txt'. > > > > Now, I am faced with the following problem: > > method show() of a S4-class object works flawlessly, that > is `doItAndPrint' > > works flawlessly and its output is returned correctly into > the Rcmdr-Window. > > However, by using method summary() for the same S4-class > object fails, > > in the sense that the output is *not* printed in the Rcmdr > window, but > > into the R Console. The summary()-method contains cat() and > slots of > > the S4-class objects only. > > > > My question is: How can it be achieved that method summary() of S4 > > objects is printed in the RCmdr window and why, in the > first instance, > > does it fail to do so by using `doItAndPrint'. > > > > Any help or pointer is much appreciated, > > > > Best Regards > > Bernhard > > > > platform i386-pc-mingw32 > > arch i386 > > os mingw32 > > system i386, mingw32 > > status > > major2 > > minor0.1 > > year 2004 > > month11 > > day 15 > > language R > > > > > > > > > > > -- > > -- The information contained herein is confidential and is > > inte...{{dropped}} > > > > __ > > [EMAIL PROTECTED] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Rcmdr -> doItAndPrint -> summary method of S4-class object not in Rcmdr window but R Console
The FAQ Q8.1 does recommend that summary() methods do not print themselves but returned a classed object to be printed. What doItAndPrint does is to capture the result of an explicit print, so it will only work for summary methods that follow that recommendation. I do think doItAndPrint should be capturing all the output from a function via sink(), and not just the print of the final result. On Mon, 22 Nov 2004, Pfaff, Bernhard wrote: Dear list member, John Fox proposed to me posting this problem to R-Help: I have written a function suited for Rcmdr and included this in a R-file located in Rcmdr/etc as well as an augmented `Rcmdr-menus.txt'. Now, I am faced with the following problem: method show() of a S4-class object works flawlessly, that is `doItAndPrint' works flawlessly and its output is returned correctly into the Rcmdr-Window. However, by using method summary() for the same S4-class object fails, in the sense that the output is *not* printed in the Rcmdr window, but into the R Console. The summary()-method contains cat() and slots of the S4-class objects only. My question is: How can it be achieved that method summary() of S4 objects is printed in the RCmdr window and why, in the first instance, does it fail to do so by using `doItAndPrint'. Any help or pointer is much appreciated, Best Regards Bernhard platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor0.1 year 2004 month11 day 15 language R The information contained herein is confidential and is inte...{{dropped}} __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Rcmdr -> doItAndPrint -> summary method of S4-class object not in Rcmdr window but R Console
Dear list member, John Fox proposed to me posting this problem to R-Help: I have written a function suited for Rcmdr and included this in a R-file located in Rcmdr/etc as well as an augmented `Rcmdr-menus.txt'. Now, I am faced with the following problem: method show() of a S4-class object works flawlessly, that is `doItAndPrint' works flawlessly and its output is returned correctly into the Rcmdr-Window. However, by using method summary() for the same S4-class object fails, in the sense that the output is *not* printed in the Rcmdr window, but into the R Console. The summary()-method contains cat() and slots of the S4-class objects only. My question is: How can it be achieved that method summary() of S4 objects is printed in the RCmdr window and why, in the first instance, does it fail to do so by using `doItAndPrint'. Any help or pointer is much appreciated, Best Regards Bernhard platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor0.1 year 2004 month11 day 15 language R The information contained herein is confidential and is inte...{{dropped}} __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] console under Mandrake
Thank you for your both answers, As you might have guessed, I am initiating myself in the Linux wizardry. I have absolutely nothing against command line, I was just heavily used to the Windows console mode; a terminal window is just fine. Actually, I only used the console to install packages from CRAN, anyway; I'm sure I'll find the commands for this. I read the manuals; it probably didn't work for me because I do not use GNOME but KDE. So command line it is... and most probably ESS. Best regards, Adrian -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: 22 octombrie 2004 19:11 To: Adrian Dusa; [EMAIL PROTECTED] Subject: Re: [R] console under Mandrake Prof Brian Ripley <[EMAIL PROTECTED]> writes: > On Fri, 22 Oct 2004, Adrian Dusa wrote: > > > I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a > > terminal; is there a way to run it in a console, like in Windows? > > Yes. Did you read the manual the INSTALL file pointed you to? > See appendix B.6 in the version I am looking at. > > Or see `An Introduction to R' appendix B.1 and look for --gui. > > [To run the GNOME console I think you need R-patched, not 2.0.0 as > distributed.] > > Another approach is to run John Fox's Rcmdr package that provides a > console. Actually, that one is more of a script submission device. (It has nowhere to just type and press Enter, you need to edit, select, and press Submit. Which is a good thing for some modes of operation.) You'll find that the Linux consoles are not nearly as developed as the Windows one and hardly anyone is using --gui. There are two good reasons: 1) It's really not that horrible to use the command line in a terminal window on Linux. 2) Many people like to use ESS (see the FAQ) and run everything from Emacs. and of course the bad reason: That there isn't much there. However, had there been a real need, someone would likely have put in the relevant improvements. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] console under Mandrake
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > On Fri, 22 Oct 2004, Adrian Dusa wrote: > > > I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a > > terminal; is there a way to run it in a console, like in Windows? > > Yes. Did you read the manual the INSTALL file pointed you to? > See appendix B.6 in the version I am looking at. > > Or see `An Introduction to R' appendix B.1 and look for --gui. > > [To run the GNOME console I think you need R-patched, not 2.0.0 as > distributed.] > > Another approach is to run John Fox's Rcmdr package that provides a > console. Actually, that one is more of a script submission device. (It has nowhere to just type and press Enter, you need to edit, select, and press Submit. Which is a good thing for some modes of operation.) You'll find that the Linux consoles are not nearly as developed as the Windows one and hardly anyone is using --gui. There are two good reasons: 1) It's really not that horrible to use the command line in a terminal window on Linux. 2) Many people like to use ESS (see the FAQ) and run everything from Emacs. and of course the bad reason: That there isn't much there. However, had there been a real need, someone would likely have put in the relevant improvements. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] console under Mandrake
On Fri, 22 Oct 2004, Adrian Dusa wrote: > I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a > terminal; is there a way to run it in a console, like in Windows? Yes. Did you read the manual the INSTALL file pointed you to? See appendix B.6 in the version I am looking at. Or see `An Introduction to R' appendix B.1 and look for --gui. [To run the GNOME console I think you need R-patched, not 2.0.0 as distributed.] Another approach is to run John Fox's Rcmdr package that provides a console. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] console under Mandrake
Hello, I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a terminal; is there a way to run it in a console, like in Windows? TIA, Adrian Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel./Fax: +40 (21) 312.66.18\ +40 (21) 312.02.10/ int.101 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console/command line output
> "Ingmar" == Ingmar Visser <[EMAIL PROTECTED]> > on Tue, 30 Mar 2004 14:36:59 +0200 writes: Ingmar> Hi all, I am working on Macos x 10.3 (Panther) to Ingmar> build a package consisting of C/C++ code that is Ingmar> called from R. In the C/C++-sources I use several Ingmar> commands to print info to the console: Ingmar> std::cout << "info" << endl; Ingmar> and: Ingmar> Rprintf("info\n"); Ingmar> Both work fine when R is run on the command line but Ingmar> neither works when running Raqau (I did check the Ingmar> preference boxes for console and error output to be Ingmar> written to the console). Only the Rprintf() one is supposed to work `in all circumstances'; if it doesn't work in Raqua (sic! "aqua" is Latin for "water"), that's a bug in at least one part of your computer environment. Ingmar> Can anyone confirm this behavior of Raqua? Any Ingmar> suggestions welcome, Ingmar Ingmar> platform powerpc-apple-darwin6.8 arch powerpc os Ingmar> darwin6.8 system powerpc, darwin6.8 status major 1 Ingmar> minor 8.1 year 2003 month 11 day 21 language R __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Console/command line output
Hi all, I am working on Macos x 10.3 (Panther) to build a package consisting of C/C++ code that is called from R. In the C/C++-sources I use several commands to print info to the console: std::cout << "info" << endl; and: Rprintf("info\n"); Both work fine when R is run on the command line but neither works when running Raqau (I did check the preference boxes for console and error output to be written to the console). Can anyone confirm this behavior of Raqua? Any suggestions welcome, Ingmar platform powerpc-apple-darwin6.8 arch powerpc os darwin6.8 system powerpc, darwin6.8 status major1 minor8.1 year 2003 month11 day 21 language R __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Console output
Hi all, I am working on Macos x 10.3 (Panther) to build a package consisting of C/C++ code that is called from R. In the C-sources I use several commands to print info to the console: I used two different ways: std::cout << "info\n"; And Rprintf("info\n"); Both work fine when R is run from the command line but neither works when running Raqau (I did check the preference boxes for console and error output to be written to the console). Any suggestions welcome, ingmar __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Resizing R console window (was BSOD with ESS[R]...)
Simon Gatehouse writes: " Like many, I fiddle while thinking. Part of my fiddling has been to rapidly resize the R console window back and forth by dragging with the mouse on the bottom right hand corner. I resize the window by a small amount rapidly and continually . After about 5 seconds of such movement R crashes with the pop up "Rgui.exe has generated errors..." This has happened ever since 1.3, I think. It is unrelated to any other programs I may be running at the time. I currently run W2000 and latest R1.6.2. The 1.7.0 development version has same behaviour." Here I am running R 1.6.2 (binary distribution) under W2000 and have noticed the same behavior. After resizing the window I commonly cannot return control to the R console and have to shut down R. ** Cliff Lunneborg, Professor Emeritus, Statistics & Psychology, University of Washington, Seattle [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] writing several command line in R console
"Petr Pikal" <[EMAIL PROTECTED]> writes: > > I would like to know how to step to the next line in the R console > > editor without breaking the continuity of my code more clearly : if > > for example I write a function, so far i have to write the all code > > inside on the same line wich may become obscure as the function is > > more and more complex. I would like to do like in the example of the > > manuels: > > > > >twosam <- function(y1, y2) { > > n1 <- length(y1); n2 <- length(y2) > > yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- > > var(y2) s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) tst <- (yb1 - > > yb2)/sqrt(s2*(1/n1 + 1/n2))tst } ... > > + is a continuity sign and means you did not finished your imput > and you shall continue typing your command. > > But why you do not use any text ditor for writing functions and > than copy/paste to R command window? I'm not sure if and how it works on Windows, but on Unix one of the better kept secrets of the readline library is that you can embed newlines by typing ctr-V ctr-J, e.g. > x <- matrix(c(1,2,3, 4,5,6, 7,8,9), 3) The nice thing is that it allows you to recall the entire command and edit it (I don't think it survives being saved to the history file though). If you have ever had to correct a typo in an expression that has been split over 8 lines, you'll know what I mean: up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,fix typo,RET, up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,RET, up,up,up,up,up,up,up,up,RET -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] writing several command line in R console
Hallo On 4 Mar 2003 at 2:36, Vincent Stoliaroff wrote: > > Hi R lovers > > I would like to know how to step to the next line in the R console > editor without breaking the continuity of my code more clearly : if > for example I write a function, so far i have to write the all code > inside on the same line wich may become obscure as the function is > more and more complex. I would like to do like in the example of the > manuels: > > >twosam <- function(y1, y2) { > n1 <- length(y1); n2 <- length(y2) > yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- > var(y2) s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) tst <- (yb1 - > yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > > all I can do is something like that: > > >twosam <- function(y1, y2) {n1 <- length(y1); n2 <- length(y2) > > +yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- > +var(y2) s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) > + tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > with the sign "+" in front of each line > What does this sign mean? and how could I solve my problems > Thanks Maybe looking to the manuals will be more precise than my answer. + is a continuity sign and means you did not finished your imput and you shall continue typing your command. But why you do not use any text ditor for writing functions and than copy/paste to R command window? > > __ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help CheersPetr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] writing several command line in R console
Thanks to all 1) OK for the "+" sign and the problem of syntactelly unbreaking when you open a { or a ( 2) Thanks for the advise to use another editor for the functions. And then the source() function. I tried it succesfully Long life to R! From: "Henrik Bengtsson" <[EMAIL PROTECTED]> To: "'Vincent Stoliaroff'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: [R] writing several command line in R console Date: Tue, 4 Mar 2003 14:04:13 +1100 The R prompt should be though of as a one line editor or rather one expression editor. You can not "step" between lines etc while editing an expression. The "+" in front of each row placed there by R indicating that even if you have typed ENTER the expression is not finished and that R expect you to close it (normally by closing brackets, parentesis etc). The "+" is just an indicator and will not be included in your expression. What you really want to do when you create functions etc is to write the up in an external text editor, save them with the extension *.R, e.g. "twosam.R", and the use source to read the function in to R, i.e. > source("twosam.R") Make sure to save your twosam.R file as *text*. If you're using Windows you can use Notepad to do this. Also, you have to save the file in the working directory of R. You can find the current working directory of R by > getwd() Alternatively, you'll have to specify the full path to the file when using source > source("C:/My Documents/hb/twosam.R") Hope this helps! Henrik Bengtsson > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Vincent > Stoliaroff > Sent: den 4 mars 2003 13:36 > To: [EMAIL PROTECTED] > Subject: [R] writing several command line in R console > > > > Hi R lovers > > I would like to know how to step to the next line in the R > console editor > without breaking the continuity of my code > more clearly : if for example I write a function, so far i > have to write the > all code inside on the same line wich may become obscure as > the function is > more and more complex. > I would like to do like in the example of the manuels: > > >twosam <- function(y1, y2) { > n1 <- length(y1); n2 <- length(y2) > yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1); > s2 <- var(y2) > s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) > tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > > all I can do is something like that: > > >twosam <- function(y1, y2) {n1 <- length(y1); n2 <- length(y2) > > +yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1); > s2 <- var(y2) > +s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) > + tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > with the sign "+" in front of each line > What does this sign mean? and how could I solve my problems Thanks > > __ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/> r-help > > __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] writing several command line in R console
The R prompt should be though of as a one line editor or rather one expression editor. You can not "step" between lines etc while editing an expression. The "+" in front of each row placed there by R indicating that even if you have typed ENTER the expression is not finished and that R expect you to close it (normally by closing brackets, parentesis etc). The "+" is just an indicator and will not be included in your expression. What you really want to do when you create functions etc is to write the up in an external text editor, save them with the extension *.R, e.g. "twosam.R", and the use source to read the function in to R, i.e. > source("twosam.R") Make sure to save your twosam.R file as *text*. If you're using Windows you can use Notepad to do this. Also, you have to save the file in the working directory of R. You can find the current working directory of R by > getwd() Alternatively, you'll have to specify the full path to the file when using source > source("C:/My Documents/hb/twosam.R") Hope this helps! Henrik Bengtsson > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Vincent > Stoliaroff > Sent: den 4 mars 2003 13:36 > To: [EMAIL PROTECTED] > Subject: [R] writing several command line in R console > > > > Hi R lovers > > I would like to know how to step to the next line in the R > console editor > without breaking the continuity of my code > more clearly : if for example I write a function, so far i > have to write the > all code inside on the same line wich may become obscure as > the function is > more and more complex. > I would like to do like in the example of the manuels: > > >twosam <- function(y1, y2) { > n1 <- length(y1); n2 <- length(y2) > yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1); > s2 <- var(y2) > s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) > tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > > all I can do is something like that: > > >twosam <- function(y1, y2) {n1 <- length(y1); n2 <- length(y2) > > +yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1); > s2 <- var(y2) > +s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) > + tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } > > with the sign "+" in front of each line > What does this sign mean? and how could I solve my problems Thanks > > __ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/> r-help > > __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] writing several command line in R console
You can start the first line with "(". Then everything you write will NOT be syntactically complelte until you issue the closing ")". I learned this from Venables and Ripley, Modern Applied Statistics with S. The "+" sign in front of each line is NOT something you should enter: R changes its prompt to tell you that the previous line was not syntactically complete. I prefer to keep my code someplace else and then transfer a complete function into R at one time. See "http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/ESS/index.html"; Does this answer your questions? Best Wishes, Spencer Graves Vincent Stoliaroff wrote: Hi R lovers I would like to know how to step to the next line in the R console editor without breaking the continuity of my code more clearly : if for example I write a function, so far i have to write the all code inside on the same line wich may become obscure as the function is more and more complex. I would like to do like in the example of the manuels: twosam <- function(y1, y2) { n1 <- length(y1); n2 <- length(y2) yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- var(y2) s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } all I can do is something like that: twosam <- function(y1, y2) {n1 <- length(y1); n2 <- length(y2) +yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- var(y2) +s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) + tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } with the sign "+" in front of each line What does this sign mean? and how could I solve my problems Thanks __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] writing several command line in R console
Hi R lovers I would like to know how to step to the next line in the R console editor without breaking the continuity of my code more clearly : if for example I write a function, so far i have to write the all code inside on the same line wich may become obscure as the function is more and more complex. I would like to do like in the example of the manuels: twosam <- function(y1, y2) { n1 <- length(y1); n2 <- length(y2) yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- var(y2) s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } all I can do is something like that: twosam <- function(y1, y2) {n1 <- length(y1); n2 <- length(y2) +yb1 <- mean(y1); yb2 <- mean(y2)s1 <- var(y1);s2 <- var(y2) +s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2) + tst <- (yb1 - yb2)/sqrt(s2*(1/n1 + 1/n2))tst } with the sign "+" in front of each line What does this sign mean? and how could I solve my problems Thanks __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help