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.
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 does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
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.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
I have an image stored on my hard drive and I want to import it into an R-Markdown document I have.
I have 2 copies in both PNG and JPEG format, but for the life of me I cannot figure out how the read functions work in the "png" and "jpg" packages.
Can someone please help?
The easiest way is to use the
![name](path)
format, here name does not matter, is just a name that you want to give to a figure, as an example you can use an internet image such as:
![Phyllogeny of bats](http://currents.plos.org/treeoflife/files/2011/02/figure1final.jpg)
that will translate in your knitted documento to
for an image in the same folder as your working directory you can just put the name of the image:
![myyu](MYYU.png)
if not you have to add the path to the folder that depends on your OS on how to specify it, I recommend you to just put your image in the folder of your working directory. And just one last thing, I usually have less problems with PNG files than JPG for some reason
If you need more help with that just let me know
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.
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.