Is there autosave for RStudio? [closed] - r

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I've had instances where RStudio gets aborted and I lose my progress.
Is there autosave, at least for the R Scripts?
I think there might be something comparable on Windows. I am using RStudio on Mac.

Autosave for scripts exists. To enable autosave, go to “Preferences” › “Code” › “Saving” › “Auto-save”.
Regardless of the existence of autosave you should get in the habit of saving your script all the time. Case in point, when programming it’s not uncommon for me to save the current file several times per line typed. This takes up no time at all, thanks to shortcuts. It happens completely automatically.
Autosave for session data would kill reproducibility. It would be the ultimate anti-feature. Therefore not only does this feature not exist (per se), it’s actively undesirable.
To avoid losing your progress, write a script instead of executing code directly in the R shell. To save the results of expensive computations, decompose your logic into small blocks, and cache intermediate results.
RMarkdown allows you to do this out of the box; for other scripts, you can approximate the same using readRDS and loadRDS, or using a proper reproducibility framework such as Makefiles, or drake.

Yes, there is.
1) Autosaves are stored in %LOCALAPPDATA%\RStudio-Desktop.
2) [they are generated] Almost instantaneously (about every half second)
https://support.rstudio.com/hc/en-us/community/posts/208611187-Missing-Autosave

Related

What is currently the best workflow for statistical analysis and report writing? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Workflow for statistical analysis and report writing
This question had a lot of good answers, but as pointed out, they are outdated.
I mostly work on scripts that will probably never be re-run after a paper has been published. Are packages worth the trouble in cases where I don't need to redistribute the codes to the world for easy access? What about the organization of data? How can makefiles be used?
I think if you use the basics laid out by Josh Reichs in that post you provided, making sure that you create a directory to save everything in, then you are good to go.
My added step for the modern world would be to product a markdown report in one of the available formats.
rMarkdown- which you can run right out of rStudio
rNotebooks - which
you can run right out of rStudio
Jupyter Notebooks - which you can
run out of Anaconda or Jupyter with some easy tweaking.
The beauty of these three report systems is that you get to integrate the thought process, code, data, graphs and visualizations in a single spot.
So, if as you say no one will ever re-run your code, then they will at least see it to appease suspicions. Also, if they do choose to repeat your process, they just follow your logic and process in a duplicate document (especially easy with the notebooks)
As for using packages. That is a more complex question. If the packages are well orchestrated and save you a ton of time cleaning, sorting and structuring data, USE THEM! Time is money. If the things you are using them for are simple, straight forward, just as easy to program yourself and recognizable by those who would jury your paper, it probably does not matter either way.
The one place where I feel it matters is complex processes that are difficult (read that as easy to do wrong yourself) and have been implemented, tested and vetted by prior researchers.
Using those packages garners credibility and makes it easier for peers to accept your methods at face value. But if you are on the cutting edge..you should feel free to slice away. Maybe make a package of your own!

How R Language works [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I was kind of wondering,how R language works internally when we type some command..
Say License()
As per my understanding,R language is made of packages,When we execute some command,it invokes the Right package,i was not able to find some documentation supporting this..
Research done from side:
1.closest i could get is below link
https://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf
2.I searched using "How R Language works internally",but i could not get any relevant results..
Below is how SQLServer executes a query from starting to end ,i am looking to see similar kind of documentation/any pointers for R
please let me know if you have any pointers
The notion that the R language is "made of packages" is inaccurate. It is made of commands, operators and functions, like other programming languages. Those commands are grouped into namespaces which comprise commands that belong to the same topic. A package provides a set of specific commands (and sometimes other objects, like sample data) grouped into a namespace. By loading a library (there are subtle semantic differences between a library and a package) the namespace of the package becomes available in the global environment, thereby making these commands directly accessible.
On the suggestion of #CapelliC here is a fully typed answer.
The internals of R are included in the document: https://cran.r-project.org/doc/manuals/r-release/R-ints.html
It is not an easy read, but covers all of the detail. My advice would be search the document if you have a specific query...

Minimal most lightweight Qt build [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is there a way to remove some uneeded locale to reduce the size of Qt Core ?
You'll need to be more specific about what your application requires. Regardless, I'd recommend reading through this thread on the interest mailing list, as it has some interesting information regarding slimming Qt Core. In particular, you can reduce the size of ICU:
I'll leave it for others to pass comment on the standard configure
options and size, but if you're really desperate for every last saving
then removing the locales you don't need can save you 230 KB (on Linux
64bit it reduces my default release build from 5.5MB to 5.2MB), but
it's a manual process:
Download http://unicode.org/Public/cldr/24/core.zip and unzip
Run "../path/to/qt5/qtbase/util/local_database/cldr2qlocalexml.py
core/common/main >> qlocale.xml"
Edit qlocale.xml to remove all the locales you don't need: only
remove groups from inside and nothing else, I
suggest you always keep C and en_US in addition to the locales you
require.
Run "../path/to/qt5/qtbase/util/local_database/qlocalexml2cpp.py
qlocale.xml ../path/to/qt5/qtbase/"

Can I write go library to be used from another languages? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm writing relatively small, but not simple networking library which is going to be used at least from C,java,python,ruby and C#. Is there a way to make go bindings to the other languages the way in can be done form C? If not is there other way?
Right now, you can't write libraries in Go that can be used in other languages. Go has a runtime environment that does a lot of things (like sheduling go-routines, collecting garbage) for you. This runtime environment is written under the assumption that it controls the whole program. This assumption does not hold if Go code would be used from inside another language, as the Go library cannot influence the binary that uses it.
I imagine that a JSON service would do what you describe.
Have a look at the json test for a simple example
It wouldnt matter what languages you used to set and get data from your app

Optimizing an SBCL Application Program for Speed [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I've just finished and tested the core of a common lisp application and want to optimize it for speed now. It works with SBCL and makes use of CLOS.
Could someone outline the way to optimize my code for speed?
Where will I have to start? Will I just have to provide some global declaration or will I have to blow up my code with type information for each binding? Is there a way to find out which parts of my code could be compiled better with further type information?
The programm makes heavy use of a single 1-dimensional array 0..119 where it shifts CLOS-Instances around.
Thank you you Advance!
It's not great to optimize in a vacuum, because there's no limit to the ugliness you can introduce to make things some fraction of a percent faster.
If it's not fast enough, it's helpful to define what success means so you know when to stop.
With that in mind, a good first pass is to run your project under the profiler (sb-sprof) to get an idea of where the time is spent. If it's in generic arithmetic, it can help to judiciously use modular arithmetic in inner loops. If it's in CLOS stuff, it might possibly help to switch to structures for key bits of data. Whatever's the most wasteful will direct where to spend your effort in optimization.
I think it could be helpful if, after profiling, you post a followup question along the lines of "A lot of my program's time is spent in <foo>, how do I make it faster?"

Resources