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

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.

Related

R Studio Fatal error: 'R_TempDir'contains space

I tried to download the latest version (4.2.0) of R on my windows computer and received this error message upon trying to open the program. "Fatal error: 'R_TempDir' contains space". Has anyone ever had this issue or have any ideas on how to resolve it? I have tried reinstalling the program and moving where the program is stored but no luck.
I also experienced this issue with 4.2.0 of R on Windows 10 but not prior versions of R.
In my case, the reason was the default temporary file folder was within my user directory and my user ID has a space in it. Apparently this causes an issue.
I was able to work around it by setting the global environment variable TMPDIR in windows:
Go to the search box next to the start button and type "environment"
Click on the choice which says "Edit the system environment variables"
Click the button that says "Environment Variables" near the bottom of the window
Click "New" and enter TMPDIR for variable name and some suitable directory without spaces under variable value (I chose C:\Temp)
As an aside, I do not believe this is an RStudio specific issue (and 4.2.0 isn't a version for RStudio anyway).
Thank you Venk for your post. It didn't work for me, but it pointed me in the direction of a solution that did.
I changed the values of my TEMP and TMP variables to a folder that had no spaces in it or in any folder name in the path (as you note).
I'm working on a Windows 10 machine.
Rob
P.S. My first solution was to revert to an earlier version of R, which initially worked. Recently though, I got the same error, even using a previous version. I'm no expert, but the whole thing is very weird IMO.
Had the same issue, and the other proposed solutions didn't resolve it for me. (R 4.2.2 and Windows 10.)
Solution found here worked for me:
create a file named renviron.site that contains the following text, and save it to the Desktop, using a text-editing program.
TMP=C:/Temp TEMP=C:/Temp TMPDIR=C:/Temp
if a copy already exists, may need to handle that case-by-case
move the file to C:\Program Files\R\R-4.2.x\etc
I wasn't able to save directly to this folder, despite being in the admin account.
I tried the other solutions and none worked. I came across this post that suggested to not install R in the /Program Files/ folder, to instead modify the installation to the folder C:\R\ which worked.
I didn't go back and undo the work done based on previous suggestions, so I'm not sure if they too are needed.

Rstudio - cannot save files or open Rscripts 'The system cannot find the path specified'

Error when saving Rscripts
Error when opening Rscripts
Hi guys,
Have been stuck on this problem for the past year or so and would really appreciate any help. I am unable to save any Rscripts in Rstudio, as I keep getting the first error above. The one exception is, when running Rstudio with administrative permissions, - when saving into C:/Users, which is apparently the default working directory. I am also able to open Rscripts from C:/Users, but not from anywhere else. When I change my working directory using setwd(), Rstudio accepts the change but I am unable to save or open files in the new directory (or anywhere else).
I have tried fully uninstalling and reinstalling Rstudio and R, as well as adding the folder R and Rstudio are in, and my desired working directory folder into the 'PATH' variable in windows (through 'edit the system environmental variables'). But nothing seems to be working. Have also searched online pretty extensively but haven't managed to find a working solution so far.
I am using the latest 2021.09.1 Build 372 of Rstudio, and R 4.0.4. However, I have also faced the same problem on the last few versions of Rstudio and R over the past year as I have tried to update hoping that it would fix the problem but to no avail. I downloaded R and Rstudio from CRAN and the Rstudio website respectively.
Thanks a lot!
This exact thing happened to me. It turned out for me that when I updated my Window's environment variables, I added an extra slash for my HOME variable. This screwed things up with RStudio.
Search for "Edit the system environment variables" after pressing the Windows button and edit the HOME variable to make sure there is no trailing slash.
Good
C:\Users\leune006
Bad
C:\Users\leune006\
I hope that helps you and whoever else comes across this frustrating "bug"!

How to install different Swirl courses in R

I am able to successfully load the SwirlDev/swirl_courses. However, I cannot figure out how to load a course from a different repository.
The repository I am trying to use is:
https://github.com/DataScienceUWL/UW_Stat_Methods
I've cloned it into local desktop GitHub, and have tried both:
install_course(course_name = "UW_Stat_Methods") - error is no internet connection
install_from_swirl("UW_Stat_Methods") - error is course not found (which makes sense)
I've tried setting the work directly to the local GitHub repo, but makes no difference.
I've googled this for over an hour, but nothing seems to help.
Any tips?
The answer is
install_course_github('DataScienceUWL','UW_Stat_Methods')
Thanks for the assist!

Atom white window. How can I solve it?

I installed the Atom Software when I opened it I saw only white windows :((
Somebody can help me !?
When you see Atom looking like this, it's usually because something went wrong with Atom loading the stored data from last session. If you click on the Console tab, you'll see an error message.
You should take a look at the Debugging section of the Flight Manual. The most likely solution to your problem is to open Atom while clearing the stored data. From the command line, you can use atom --clear-window-state, which will wipe out all unsaved files and state data from your previous session.
If you share the error message with us, I will revise this answer to address the specific problem if it's something that I know about.

Rstudio opens all files in package after build

Every time I build my package after a modification, R studio will display every file in the package as untitled, and I have to close them and reopen them in order to modify files before another build. To be honest, it doesn't affect functionality that much, but is annoying and can sometimes cause Rstudio to crash.
Has anyone seen this before, and can suggest a fix?
I would post a screenshot, but I am new to stackoverflow and don't have enough reputation (10).
I haven't figured out what caused the problem, but I was able to solve it by deleting all the project files produced by Rstudio (.RProj.user, packagename.Rproj, .Rhistory, .Rbuildignore), and then creating a new project in the existing directory.

Resources