Rstudio outputs an error into the console while editing script - r

I am working on a project on Rstudio and something wired has become to happen: each time I write something into a script Rstudio automatically writes the following error into the console:
Error in rep.int(vectorNames[i], length(vector[[i]])) :
unimplemented type 'NULL' in 'rep3'
and a label appears under the cursor: "R code execution error".
Appart form this visual bug, everything is working properly. Does anyone have the same issue ?

I've just experienced this issue. In my case, I guess it must be related to the NAMESPACE file from the package.
I can see a discussion about this subject here on R Studio support site.
Citation from the source mentioned above:
There are two times when we run the code that could be emitting this error:
When attempting to retrieve completions from the package's NAMESPACE file,
When attempting to retrieve completions for native routines (e.g. for within a '.Call()' call).
Can you recall if you had been editing the package's NAMESPACE file before seeing this error? Alternatively, have you been using 'devtools::load_all()' or other similar machinery?
And to clearly answer your question:
Yes! I am having the same issue! (Damn it! :) )
LATER EDIT:
I've got rid of the problem by closing the project and reopening it again.

Related

code_prettify not working for Julia in Jupyter Notebook

I am using Julia 1.8.4 in Jupyter, however, I get the following error message when I start it up.
[code_prettify] Sorry, can't use kernel language julia.
Configurations are currently only defined for the following languages: python, r, javascript
See readme for more details.
If I click "Ok", I am able to run the code in the cells but Jupyter does not highlight Julia code. It continues highlighting Python code and syntax. Is there a way I can fix this?
Or could someone refer me to the documentation?
Like the error message indicates, code_prettify only has configurations inbuilt for Python, Javascript, and R. From the docs:
Example implementations are provided for prettifiers for ipython, ir and ijavascript kernels which should work out of the box ...
Other languages may be added as defaults in the future
Support for Julia is yet to be added, hence the error message.
That said, code_prettify is only needed if you want to reformat your code (semi-)automatically. Syntax highlighting should work regardless, without any extension, and based on my testing, it does. Loading a notebook with a Julia kernel, the error message appears in the console, but the code is syntax-highlighted as usual.
So, if the syntax highlighting problem persists across notebook restarts, the issue must be with some other part of your notebook setup.

Get "Error: Access denied" when I click on commit on RStudio

I'm pretty new to using Github and Git in general. But this error is driving me crazy because I can't find anyone with a similar problem..
In short. Whenever I try to commit a saved file to a repository in Github I get the following error:
enter image description here
I tried reinstalling RStudio and changing the project to a different folder because I thought maybe there was an issue with writing rights, so I don't think that is the problem. I find it interesting that the message inside the Error warning is in Spanish. I remember that RStudio was initially like with Colombian formatting or something like that, that I had to change to install and use packages. But I don't really remember that well what that was. However, I don't think it has anything to do with this.
Thanks in advance for your help.

Error when running an app using the runApp('App.R')

I have a problem running my Shiny App using the runApp() button in R. I recieve the error message:
Error in ..stacktraceon..({ : object '.' not found
I can run the app if I just use ctrl+A and then ctrl+enter which uses the shinyApp(ui, server) function instead. Every function in the application works fine when I run it this way.
The problem with running the app this way is that I can't publish the application.
This problem only occurs when running a specific app.
I've found someone with a similar problem here:
https://github.com/Coorsaa/shinyMlr/issues/126
Puy the post ends by Coorsaa saying that the problem should be fixed now. Anyone know how to fix this?
Do you need me to post the code for the app here? -or does the problem have something to do with R or Shiny?
YBS had the answer.
"Most likely you have a "." in front of a comment or executable line in your code. You need to remove that "." in your code. It would be best to post your code, if you need someone to help you."
This was exactly what I found infront of one of my comments.
Thanks! I didn't notice that at all.

Object Reference error on build but... no location?

It's an aspx web site. It's Huuuge. Oftentimes, we won't see errors until building the entire site. But it's always told us where the error is.
This time, I'm getting an Object reference not set to instance of an object. error with file, no line, no location. Double clicking on the error just does... nothing.
Error 3 Object reference not set to an instance of an object.
I've tried a few things that I've found here and elsewhere but nothing seems to be helping out or giving me more information. I've tried change the verbosity of compiler/build messages but those goggles don't seem to help.
Edit: Very specifically, the first time I try to build the site after opening the project, it says it builds just fine. Trying to build it again causes the error. Closing VS (2013) and reopening the project allows a first time build success and subsequent builds are failures. It should also be noted that it's not actually building anything because it completes far far too quickly - almost instantly.
Can anyone give me some ideas on how to track this down?
It turns out that the VS installation is completely broken. Banging on the keyboard like a monkey and then trying to build succeeds when it should not.

Julia - workspace()

I've been using Win7 to develop in Julia, and I've got a method called loadAll() which runs an include(x) on all relevant files (I'm simultaneously working on a bunch of scripts and I cant be bothered to write the full path for every specific file that I update
When I try running this method using a Linux mint computer it returns the error "ERROR: invalid redefinition of constant Model", where Model is a type which I've re-written on the win7 machine
I attempted to work around this by adding workspace() (crude, I know) but it returned "ERROR: workspace not defined"
Additionally, if I exclude the script that loads the Model type (and all the other types) I get the error "ERROR: #doc not defined"
I would have posted this in the Julia forum but this seems like possibly something that might have to do with the OS rather than the Julia language itself, as I'm sure that if stuff like workspace() and #doc were malfunctioning it would already been solved
Has anybody had this experience that might understand what the problem is? Any help is greatly appreciated, as I would deeply prefer to be able to use Linux instead of windows
EDIT:
Further removing stuff, I removed all the #doc occurrences, and another error came along "ERROR: AbstractString not defined"

Resources