Re: [R] load function to R GUI
On Tue, 15 Jun 2004, Evgueni Parilov wrote: > Yep, shame on me. But on the other hand, this is a good example of a > vague menu > item. I think that instead of "Source R code...", it should be "Load > source R code..." > unless it can do more than just loading a source from R file. It is `source' not `load', as you will find if you actually read the R documentation. DO do as the posting guide asks before casting aspersions on the work of others! > Prof Brian Ripley wrote: > > >The first menu item on the `File' menu is called `Source R code' and calls > >source(). Did you look through the menus? If not, it would be worth > >familiarizing yourself with them. > > > >On Mon, 14 Jun 2004, Evgueni Parilov wrote: > > > > > > > >>Thanks! > >>That was exactly what I wanted. > >>Evgueni > >> > >> > >>Ko-Kang Kevin Wang wrote: > >> > >> > >> > >>>Hi, > >>> > >>> > >>> > >>> > -Original Message- > From: [EMAIL PROTECTED] > > > > > >>> > >>> > >>> > >>> > Hi all! > I looked through the manual and FAQ, and did not find any > > > > > >>>information > >>> > >>> > >>> > >>> > on how to load functions from files (with .R extension) to run them > > > > > >>>in > >>> > >>> > >>> > >>> > R GUI under Windows. The only way I know is to create and edit a > function inside GUI. But what if I want to edit it in Emacs (do not > want to use ESS) and then load into GUI? > Any suggestions... > > > > > >>>Do you mean ?source? > >>> > >>>i.e. save your function in, say, foo.R then use the source() function > >>>to get it in. > >>> > >>>HTH > >>> > >>>Kevin > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>__ > >>[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 > >> > >> > >> > >> > > > > > > > > -- 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://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] load function to R GUI
Thanks Uwe! Now I understand how it works and why it was called "Source R code" rather than "Load source R code". I did not really intend to confuse anybody. I just wanted to have full information on a subject. I agree that most of the menu items are self-explained. But some of them may not! Especially, if you are novice for R, like in my case. In future, I will try to check for answer 10 times before posting it to this group. Thanks again, Evgueni Uwe Ligges wrote: Evgueni Parilov wrote: Yep, shame on me. But on the other hand, this is a good example of a vague menu item. I think that instead of "Source R code...", it should be "Load source R code..." unless it can do more than just loading a source from R file. No. source() does not only "load", but also parse()s the code! Also note that load() is completely different from source(). So why do you want to confuse the users? Uwe Ligges Evgueni Prof Brian Ripley wrote: The first menu item on the `File' menu is called `Source R code' and calls source(). Did you look through the menus? If not, it would be worth familiarizing yourself with them. On Mon, 14 Jun 2004, Evgueni Parilov wrote: Thanks! That was exactly what I wanted. Evgueni Ko-Kang Kevin Wang wrote: Hi, -Original Message- From: [EMAIL PROTECTED] Hi all! I looked through the manual and FAQ, and did not find any information on how to load functions from files (with .R extension) to run them in R GUI under Windows. The only way I know is to create and edit a function inside GUI. But what if I want to edit it in Emacs (do not want to use ESS) and then load into GUI? Any suggestions... Do you mean ?source? i.e. save your function in, say, foo.R then use the source() function to get it in. HTH Kevin __ [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] load function to R GUI
On Tue, 15 Jun 2004 12:50:04 -0400, Evgueni Parilov <[EMAIL PROTECTED]> wrote : >Yep, shame on me. But on the other hand, this is a good example of a >vague menu >item. I think that instead of "Source R code...", it should be "Load >source R code..." >unless it can do more than just loading a source from R file. The name will make more sense as you learn more about R: it refers to the source() function, which reads and executes a file full of R code. The load() function doesn't work on source code, it works on saved binary images, so your suggestion isn't really clearer. Duncan Murdoch __ [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] load function to R GUI
Evgueni Parilov wrote: Yep, shame on me. But on the other hand, this is a good example of a vague menu item. I think that instead of "Source R code...", it should be "Load source R code..." unless it can do more than just loading a source from R file. No. source() does not only "load", but also parse()s the code! Also note that load() is completely different from source(). So why do you want to confuse the users? Uwe Ligges Evgueni Prof Brian Ripley wrote: The first menu item on the `File' menu is called `Source R code' and calls source(). Did you look through the menus? If not, it would be worth familiarizing yourself with them. On Mon, 14 Jun 2004, Evgueni Parilov wrote: Thanks! That was exactly what I wanted. Evgueni Ko-Kang Kevin Wang wrote: Hi, -Original Message- From: [EMAIL PROTECTED] Hi all! I looked through the manual and FAQ, and did not find any information on how to load functions from files (with .R extension) to run them in R GUI under Windows. The only way I know is to create and edit a function inside GUI. But what if I want to edit it in Emacs (do not want to use ESS) and then load into GUI? Any suggestions... Do you mean ?source? i.e. save your function in, say, foo.R then use the source() function to get it in. HTH Kevin __ [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] load function to R GUI
Yep, shame on me. But on the other hand, this is a good example of a vague menu item. I think that instead of "Source R code...", it should be "Load source R code..." unless it can do more than just loading a source from R file. Evgueni Prof Brian Ripley wrote: The first menu item on the `File' menu is called `Source R code' and calls source(). Did you look through the menus? If not, it would be worth familiarizing yourself with them. On Mon, 14 Jun 2004, Evgueni Parilov wrote: Thanks! That was exactly what I wanted. Evgueni Ko-Kang Kevin Wang wrote: Hi, -Original Message- From: [EMAIL PROTECTED] Hi all! I looked through the manual and FAQ, and did not find any information on how to load functions from files (with .R extension) to run them in R GUI under Windows. The only way I know is to create and edit a function inside GUI. But what if I want to edit it in Emacs (do not want to use ESS) and then load into GUI? Any suggestions... Do you mean ?source? i.e. save your function in, say, foo.R then use the source() function to get it in. HTH Kevin __ [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 __ [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] load function to R GUI
The first menu item on the `File' menu is called `Source R code' and calls source(). Did you look through the menus? If not, it would be worth familiarizing yourself with them. On Mon, 14 Jun 2004, Evgueni Parilov wrote: > Thanks! > That was exactly what I wanted. > Evgueni > > > Ko-Kang Kevin Wang wrote: > > >Hi, > > > > > >>-Original Message- > >>From: [EMAIL PROTECTED] > >> > >> > > > > > > > >>Hi all! > >>I looked through the manual and FAQ, and did not find any > >> > >> > >information > > > > > >>on how to load functions from files (with .R extension) to run them > >> > >> > >in > > > > > >>R GUI under Windows. The only way I know is to create and edit a > >>function inside GUI. But what if I want to edit it in Emacs (do not > >>want to use ESS) and then load into GUI? > >>Any suggestions... > >> > >> > > > >Do you mean ?source? > > > >i.e. save your function in, say, foo.R then use the source() function > >to get it in. > > > >HTH > > > >Kevin > > > > > > > > > > > > > > __ > [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 > > -- 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://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] load function to R GUI
Thanks! That was exactly what I wanted. Evgueni Ko-Kang Kevin Wang wrote: Hi, -Original Message- From: [EMAIL PROTECTED] Hi all! I looked through the manual and FAQ, and did not find any information on how to load functions from files (with .R extension) to run them in R GUI under Windows. The only way I know is to create and edit a function inside GUI. But what if I want to edit it in Emacs (do not want to use ESS) and then load into GUI? Any suggestions... Do you mean ?source? i.e. save your function in, say, foo.R then use the source() function to get it in. HTH Kevin __ [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] load function to R GUI
Hi, > -Original Message- > From: [EMAIL PROTECTED] > Hi all! > I looked through the manual and FAQ, and did not find any information > on how to load functions from files (with .R extension) to run them in > R GUI under Windows. The only way I know is to create and edit a > function inside GUI. But what if I want to edit it in Emacs (do not > want to use ESS) and then load into GUI? > Any suggestions... Do you mean ?source? i.e. save your function in, say, foo.R then use the source() function to get it in. HTH Kevin __ [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] load function to R GUI
Hi all! I looked through the manual and FAQ, and did not find any information on how to load functions from files (with .R extension) to run them in R GUI under Windows. The only way I know is to create and edit a function inside GUI. But what if I want to edit it in Emacs (do not want to use ESS) and then load into GUI? Any suggestions... Evgueni __ [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