Re: [R] Function to save results

2017-11-01 Thread Rui Barradas
- David L Carlson Department of Anthropology Texas A University College Station, TX 77843-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Priya Arasu via R-help Sent: Wednesday, November 1, 2017 9:57 AM To: Eric Berger <eric

Re: [R] Function to save results

2017-11-01 Thread Priya Arasu via R-help
-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Priya Arasu via R-help Sent: Wednesday, November 1, 2017 9:57 AM To: Eric Berger <ericjber...@gmail.com> Cc: r-help@r-project.org Subject: Re: [R] Function to save results Hi Eric,Thanks for t

Re: [R] Function to save results

2017-11-01 Thread David L Carlson
X 77843-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org>] On Behalf Of Priya Arasu via R-help Sent: Wednesday, November 1, 2017 9:57 AM To: Eric Berger <ericjber...@gmail.com<mailto:ericjber...@gmail.com>>

Re: [R] Function to save results

2017-11-01 Thread Eric Berger
the > output with File | Save to File. > > --- > David L Carlson > Department of Anthropology > Texas A University > College Station, TX 77843-4352 > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org]

Re: [R] Function to save results

2017-11-01 Thread David L Carlson
File. --- David L Carlson Department of Anthropology Texas A University College Station, TX 77843-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Priya Arasu via R-help Sent: Wednesday, November 1, 2017 9:

Re: [R] Function to save results

2017-11-01 Thread Priya Arasu via R-help
Hi Eric,Thanks for the explanation. Is there a way to save the results automatically after the analysis gets over?. As I recently lost the results, because I didn't save the results. I don't want to run the sink or save command after the analysis is over rather run the command for saving the

Re: [R] Function to save results

2017-11-01 Thread Priya Arasu via R-help
Hi Eric,I tried as you suggested but I could not find the output in the text file I created (attr.txt) net <- loadNetwork("C://Users//Priya//Desktop//Attractor analysis_all genes//synaptogenesis//regulationof_dopamine_signaling_submodule3.txt")sink("C://Users//Priya//Desktop//Attractor

Re: [R] Function to save results

2017-11-01 Thread Eric Berger
Hi Priya, You did not follow the logic of the pseudo-code. The sink("filename"), sink() pair captures whatever output is generated between the first sink statement and the second sink statement. You need (possibly) to do: sink("C://Users//Priya//Desktop//Attractor analysis_all

Re: [R] Function to save results

2017-11-01 Thread Eric Berger
Some comments: 1. sink() does not return a value. There is on point to set attr <- sink(...). Just give the command sink("C://etc") 2. to complete the saving to the file you must give a second sink command with no argument: sink() So your code would be (pseudo-code, not actual code) sink(

[R] Function to save results

2017-11-01 Thread Priya Arasu via R-help
Hi,I want the results to be saved automatically in a output text file after the script has finished running. I used the sink function in the following example, but the results file (output.txt) was empty. net <- loadNetwork("C://Users//Priya//Desktop//Attractor analysis_all