Re: [R] Function to save results

2017-11-01 Thread Rui Barradas
--- David L Carlson Department of Anthropology Texas A&M 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 Berge

Re: [R] Function to save results

2017-11-01 Thread Priya Arasu via R-help
n, 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 Cc: r-help@r-project.org Subject: Re: [R] Function to save results Hi Eric,Thanks for the explanation. Is

Re: [R] Function to save results

2017-11-01 Thread David L Carlson
al 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 mailto:ericjber...@gmail.com>> Cc: r-help@r-project.org<mailto:r-help@r-proje

Re: [R] Function to save results

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

Re: [R] Function to save results

2017-11-01 Thread David L Carlson
ave to File. --- David L Carlson Department of Anthropology Texas A&M 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

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 fil

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 analysis

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 genes//synaptogenes

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( "fi

[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 genes//synaptogenes