?saveRDS On Sun, Jun 7, 2015 at 5:58 PM, Rosa Oliveira <rosit...@gmail.com> wrote:
> Dear Mark, > > > I’ll try to explain better. > > Imagine I write: > > library(foreign) > library(nlme) > > set.seed(1000) > n.sample<-10000 #sample size > M <- 5 > DP_x <- 2 > x <- rnorm(n.sample,M,DP_x) > p <- pnorm(-3+x) > y <- rbinom(n.sample,1,p) > dp_erro <- 0.01 > erro <- rnorm(n.sample,0,dp_erro) > x.erro <- x+erro > > but with a function, with 2000 simulations. > I save my “output” and I get X.erro in a .txt file. (text edit file). > > I do another setting with DP_x=3 and save, and so on. > > For some reason I realize I’ve done my simulation the wrong way and I have > to apply a correction, for example: > > x.erro = 1.4X+erro, i.e. in the truth I could use my first X and erro > values in each setting, but as it is in a .txt file I can’t use them any > more. Is there a way to save the results in a format that I can use the > values? Just apply my corrections and don’t have to do the 2000 simulations > for each setting again? > > My problem is that the function I use takes 3 days running, and just 500 > simulations :( > > Best, > RO > > > Atenciosamente, > Rosa Oliveira > > -- > > ____________________________________________________________________________ > > > Rosa Celeste dos Santos Oliveira, > > E-mail: rosit...@gmail.com > Tlm: +351 939355143 > Linkedin: https://pt.linkedin.com/in/rosacsoliveira > > ____________________________________________________________________________ > "Many admire, few know" > Hippocrates > > > On 07 Jun 2015, at 23:03, Mark Sharp <msh...@txbiomed.org> wrote: > > > > I cannot understand your request as stated. Can you provide a small > example? > > > > Mark > > > > R. Mark Sharp, Ph.D. > > msh...@txbiomed.org > > > >> On Jun 7, 2015, at 2:49 PM, Rosa Oliveira <rosit...@gmail.com> wrote: > >> > >> Dear all, > >> > >> I’m doing simulations on R, and as my code is being changed and > improved I need to, sometimes, work in finished simulations, i.e, > >> > >> After my simulation is over I need to settle another setting. > >> The problem is that I need to get back to the previous result. > >> > >> When I save the result it saves as txt, so I can’t edit that result any > more. > >> > >> Imagine I save a setting and save the mean, nonetheless, in another > setting the mean as problems, so I have to ask the median. > >> > >> As I have to have the same statistics to all settings, nowadays I have > to run my first setting again. > >> > >> My advisor told me that I could save another way so I can “edit” my > first result. Is it possible? > >> > >> I tried to save as "save my workplace", … but after I don’t know what > to do with it. > >> > >> Can you please help me? > >> I know is a naive question, but I have to go through this every 3 days > (time each simulation takes long). And my work is being delayed :( > >> > >> > >> Best, > >> RO > >> > >> > >> > >> Atenciosamente, > >> Rosa Oliveira > >> > >> -- > >> > ____________________________________________________________________________ > >> > >> > >> Rosa Celeste dos Santos Oliveira, > >> > >> E-mail: rosit...@gmail.com > >> Tlm: +351 939355143 > >> Linkedin: https://pt.linkedin.com/in/rosacsoliveira > >> > ____________________________________________________________________________ > >> "Many admire, few know" > >> Hippocrates > >> > >> ______________________________________________ > >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > >> 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. > -- Stephen Sefick ************************************************** Auburn University Biological Sciences 331 Funchess Hall Auburn, Alabama 36849 ************************************************** sas0...@auburn.edu http://www.auburn.edu/~sas0025 ************************************************** Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis "A big computer, a complex algorithm and a long time does not equal science." -Robert Gentleman [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.