Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I need get the File size while it is being generated.
I've tried using QThread and QFileInfo::size and a while with a flag that signals when the finished file, but the value never changes.
So was wondering if you can take the file size while it is being generated.
From the Qt docs:
Note: To speed up performance, QFileInfo caches information about the file. Because files can be changed by other users or programs, or even by other parts of the same program, there is a function that refreshes the file information: refresh(). If you want to switch off a QFileInfo's caching and force it to access the file system every time you request information from it call setCaching(false).
So try the QFileInfo::refresh() function before (re-)checking the file size.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I'm interested in locally removing these two dependencies in the "regr.svm" learner code:
Dependency 1: Cost
Dependency 2: Epsilon
I have tried without success with the trace() function:
trace(LearnerRegrSVM.R, edit = TRUE)
I opened a related issue on Gitgub a few days ago, but I have not received a response.
{mlr3} learners are wrappers around the original implementations and are not editable by the user.
If something is wrong, you are always welcome to submit a PR in the respective GitHub repo and we'll have a look.
IF you want to modify code quickly, you can always fork the repo, make adjustments yourself and use your own fork.
(Asking on Stackoverflow should usually include some code, otherwise people will flag to close the question.)
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I tried to debug a loop, and while I was able to set a breakpoint, when I ran the code block it did not get into the debugging mode.
Everything is also grayed out under the Debug menu. Was my set up not correct?
(My console)
I tried to follow this article but was lost halfway through https://support.rstudio.com/hc/en-us/articles/200713843.
Thank you!
It looks like you set a breakpoint in a script, not in a function. There are limits to doing that, because R only records locations from a source file when the source() function is used. In RStudio, this means you need to click on Source, not Run in the source pane.
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
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I've searched the forum but can't find anything on this. I have the following line in a file by itself:
FormState = new ReactiveState();
Other files in the package can't reference FormState. How do I make it package-scoped instead of file-scoped?
Make sure the files referencing your global variable are added after the file with the declaration. For example:
api.addFiles('file-with-global-var.js');
api.addFiles('file-using-global-var.js');
If these were reversed, you'd probably see an error. Also make sure to check they are both accessible from the same environment. For example:
api.addFiles('file-with-global-var.js', 'client');
api.addFiles('file-using-global-var.js', 'server');
would obviously be a problem, as the server code couldn't read a variable declared only on the client.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
The community is reviewing whether to reopen this question as of 18 days ago.
Improve this question
I'm trying to create a bunch of directories which is pretty straightforward in Python and R. Does anyone know how to do this in Julia? I looking at the Julia manual and nothing jumped out at me. Thanks.
Chase CB
Try mkdir. From the Julia Language documentation:
Make a new directory with name path and permissions mode. mode defaults to 0o777, modified by the current file creation mask. This function never creates more than one directory. If the directory already exists, or some intermediate directories do not exist, this function throws an error. See mkpath for a function which creates all required intermediate directories. Return path.