I have been given a 'code' file and a 'data' file which is designed for use in R. I have successfully installed the program onto my pc, but am struggling to actaully use the code. How do i prompt R to read the code file and run? Any ideas? Many thanks Mark ____________ Mark Edwards mark at miic.org.uk ******************************************** DISCLAIMER: The information in this e-mail and any attachment is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please contact the sender if you have received this e-mail in error. ******************************************** -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 21 Aug 2002, Mark Edwards wrote: %I have been given a 'code' file and a 'data' file which is designed for use %in R. % %I have successfully installed the program onto my pc, but am struggling to %actaully use the code. How do i prompt R to read the code file and run? % %Any ideas? source("/path/to/sourcefile/file") % %Many thanks % %Mark % %____________ %Mark Edwards %mark at miic.org.uk % % % % % % %******************************************** %DISCLAIMER: %The information in this e-mail and any attachment is confidential and %may be legally privileged. It is intended solely for the addressee. %Access to this e-mail by anyone else is unauthorised. % %If you are not the intended recipient, any disclosure, copying, %distribution or any action taken or omitted to be taken in reliance %on it, is prohibited and may be unlawful. Please contact the sender %if you have received this e-mail in error. %******************************************** %-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- %r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html %Send "info", "help", or "[un]subscribe" %(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch %_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ % *********************************************************************** Jens Nieschulze Institute for Forest Biometrics & Phone: ++49-551-39-12107 Applied Computer Science Fax : ++49-551-39-3465 Buesgenweg 4 37077 Goettingen E-mail: jniesch at uni-forst.gwdg.de GERMANY http://www.uni-forst.gwdg.de/~jniesch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 08/21/02 10:41, Mark Edwards wrote:>I have been given a 'code' file and a 'data' file which is designed for use >in R. > >I have successfully installed the program onto my pc, but am struggling to >actaully use the code. How do i prompt R to read the code file and run? > >Any ideas?At the R prompt, say source("codefile") where codefile is the name of it. You need the quotes. When you're done, q() exits the program. Now that you've gotten this far, you might look at the manual that came with R, run the examples, etc. Jon -- Jonathan Baron, Professor of Psychology, University of Pennsylvania R page: http://finzi.psych.upenn.edu/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Uwe Ligges
2002-Aug-21 10:07 UTC
[R] sourcing code and importing data; was: A layman seeks help!
Mark Edwards wrote:> > I have been given a 'code' file and a 'data' file which is designed for use > in R. > > I have successfully installed the program onto my pc, but am struggling to > actaully use the code. How do i prompt R to read the code file and run? > > Any ideas?Yes. At first you should get an idea what R is and how to use it. For a "layman" a point to start is reading "An Introduction to R". If you feel comfortable with the manuals and cannot figure out how to solve a problem, you can ask the mailing list, but put an appropriate subject into the header, please. Well, you can use source() to source the code. How to import the data is described in the "R Data Import/Export" manual - it depends on the format of your "data". Since your questions is not very explicit, I cannot give an explicit answer. Please, tell us your OS and version of R in case of forthcoming questions. Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You haven't given enough information, but from what I understand, your code file is a file with extension .R? If so, then you can either open the file in any text editor, copy and paste everything into R. Alternatively, you can use the source() command to source it in. Cheers, Kevin ------------------------------------------------ Ko-Kang Kevin Wang Post Graduate PGDipSci Student Department of Statistics University of Auckland New Zealand www.stat.auckand.ac.nz/~kwan022 ----- Original Message ----- From: "Mark Edwards" <mark at miic.org.uk> To: "'R-help at lists.R-project.org'" <R-help at stat.math.ethz.ch> Sent: Wednesday, August 21, 2002 9:41 PM Subject: [R] A layman seeks help!> I have been given a 'code' file and a 'data' file which is designed foruse> in R. > > I have successfully installed the program onto my pc, but am struggling to > actaully use the code. How do i prompt R to read the code file and run? > > Any ideas? > > Many thanks > > Mark > > ____________ > Mark Edwards > mark at miic.org.uk > > > > > > > ******************************************** > DISCLAIMER: > The information in this e-mail and any attachment is confidential and > may be legally privileged. It is intended solely for the addressee. > Access to this e-mail by anyone else is unauthorised. > > If you are not the intended recipient, any disclosure, copying, > distribution or any action taken or omitted to be taken in reliance > on it, is prohibited and may be unlawful. Please contact the sender > if you have received this e-mail in error. > ******************************************** > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Readhttp://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html> Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._