Mac OS 11.2.1 Big sur- git version control Rstudio path -unable to edit . Not able to link - r

I am new to Version control and this is my first attempt. I am also a novice in R. just did an online course. I have installed Git and was trying to add the Version control through Rstudio Global options. The Git executable file path shows "user/bin/git" But when I go to create a Project>version control>Git- I get an error "Git was not detected on the path" I dug deeper and ran cmd in the mac terminal- which git and got the location as "/usr/local/bin/git", I also did a $ git --exec-path and got the location as "/usr/local/Cellar/git/2.30.0/libexec/git-core" I understand the executable path is somewhere else. I understand that I need to change the path but Rstudio is not allowing the changing of the path, and I am unable to edit the path to "/usr/local/Cellar/git/2.30.0/libexec/git-core" from "user/bin/git". I tried manually entering but that doesnt work, I browsed through the file s and sub folders and selected the executable file location , but it still doesnt change. Please help.

Welcome to stackoverflow: You can find a step by step support on the official support site of rstudio. Here you get detailed instructions on how to use version control with RStudio: https://support.rstudio.com/hc/en-us/articles/200532077-Version-Control-with-Git-and-SVN

Related

R Global Options Git/SVN Location Problem

As the previous version of this question was profoundly vague due to my lack of knowledge of Git, let me revise it so that I can be more clear about the problem I am encountering. 
Today, I opened a new GitHub repository by cloning its link from Github to R Studio version control so that I could paste the new repository’s link to Git and therefore start to make a new website. However, when I tried this, I received this error, which opened a new page. It was saying that
"Git was not detected on the system path. To create projects from Git repositories, you should install Git and then restart R Studio. Note that if Git is installed and not on the path, then you can specify its location using the Preferences dialog". 
As Git was installed on my PC, I am using MacOS, I thought the problem was with the path. To solve it, I tried to change the Git's location from the R Studio -> Preferences -> Git/SVN panel. While I am not sure what its initial location was, I changed it to ~/Desktop/GitHub Desktop.app. After I did this, and as the problem was not solved, I searched the web and saw that the location should be something like usr/bin/git. I tried to reformat the location as usr/bin/git but I could not since I could not find usr file in the location. When I later posted the question in this forum, one of the users kindly asked me to check the version of my Git. To this end, I wrote the git --version in the mac's terminal and I received this error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I searched this error on the web and I looked at several solutions.
One of them was advising to run xcode-select -switch /Library/Developer/CommandLineTools but when I did this, I received this error
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
By editing this post, I tried to be specific as much as I could, but as previously stated, since I do not know Git very much, the question might still be vague. 

Can't find a way to get graphic tablet drivers working on mint

So i was trying to install the XP Pen Driver for my Deco 01 v2 graphics tablet on my Linux Mint 19.2 Tina when i came to encounter the following error:
./Pentablet_Driver: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10' not found (required by ./Pentablet_Driver)
I went on to install qt 5.10, still the same error. Others suggested to just change the path wth sudo gedit /etc/ld.so.conf.d/randomLibs.conf which didn't change a thing.
Link to drivers:
https://www.xp-pen.com/download-440.html
The manufacturer has a page describing how to set up their software on Linux with pictures. However, when following them, you end up with a folder name somewhere along the line that has spaces in it, which causes issues.
So a modified set of instructions might look like this:
Connect your XP-Pen product to the computer.
Download the Linux Beta driver from XP-Pen official website.
When the download is complete, extract the compressed folder.
Rename the extracted folder to something without spaces.
Inside the renamed folder is another compressed folder which should be extracted.
Inside the final extracted folder, ensure "Pentablet_Driver.sh" has execution permissions by right clicking on it and going to "Properties->Permissions" and verifying that "Allow executing file as program" is checked.
Open the terminal. (CTRL+ALT+T)
Type "sudo ", then drag Pentablet_Driver.sh from the file browser onto the terminal.
Type the password to complete.
Make sure that you write exactly
sudo ./Pentablet_Driver.sh
instead
sudo ./Pentablet_Driver
I had the same error until I noticed that I forgot to add .sh at the end.

RStudio gives "Incorrect function" when setting git as Version control

When I create a new project and select to create a new Git repository, or when I try to change the version control system in project options I receive a RStudio error stating "Incorrect function" with a big X and no extra information.
The below link has a similar issue, but their solution of changing the path for git.exe has not helped (i have tried all three paths)
https://support.rstudio.com/hc/en-us/community/posts/200632528-Git-Error-Incorrect-Function
Some extra notes:
RStudio allows me to clone repository to set new working directory
Also git works in bash, so i feel this is an RStudio issue.
I encountered the same error. For me it also had to do with using a network path not a local directory for the project location (as for lewis1211).
Workaround: Map the network drive. E.g. Map your //server/share to some drive, say Z: (using map network drive, if you are using windows). If you set your project up under Z: then, it works.
If you have already chosen "git.exe" in RStudio --> Tools --> Global Options --> Git/SVN, then try to open Rstudio shell and type git init. In my case it showed "Permission denied", and after running as administrator the problem has gone.
This is only a partial answer if it fixes your problem: I reproduced this when trying to use a network path for a project location. When using a local directory no error occurs. Could indeed be an RStudio issue.
Run you R studio as Project administration.
This solves my issue.
SOLVED.
I had the same problem. The Git-RStudio-Connection fails but git is working perfectly in the CMD. When running the git init command in CMD it works and creates a .git folder. But running the git init command in the RStudio terminal fails with a message Warning: unable to access 'C:/Users/%username%/.gitconfig': Permission denied ... fatal: unknown error occured while reading the configuration files.
The Version Control Sytem (VCS) or git-Panel does not appear in RStudio and selecting it in the projects options leads to the same message Error: Unzulässige Function (eng. Error: Incorrect function).
A closer look into the .gitconfig file should give you a new solution approach hopefully without having administration rights. Comparing the installation on the integration worksation with a productive workstation shows, that on the Test-Machine an incomplete .gitconfig file is on C:/Users/%username%/.gitconfig and on the Productive-Machine a complete gitconfig file is on Z:/.gitconfig. By the way, Z is a mapped drive which is linking to the company's user-profile settings (see CMD > echo %HOMEDRIVE%).
According to this analysis there should be multiple possible solution approaches:
(1) delete the corrupt .gitconfig and hope the the system is correctly looking into your profiles directory
(2) complete the .gitconfig file that all necessary information are there. The message fatal: unknown error occured while reading the configuration files could actually be a hint, that the first message access... permission denied is false and the problem lies in the incomplete file.
(3) Be aware that there can be a confusion between ".gitconfig" as FILE and ".gitconfig" as FOLDER. Check this with changing directory with cd to folder and cat to show the file content. It will tell you that you cannot display a folder as file-content.
(4) Change the location of the config file with git config --file FullnameToGitconfig. e.g. git config --file %USERPROFILE%/.gitconfig or git config --file %USERPROFILE%/.gitconfig/gitconfig or git config --file %HOMEDRIVE%/.gitconfig etc.
[user]
name = DOE John
email = john.doe#acme.com
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/kdiff3.exe
[diff]
guitool = kdiff3
[difftool "kdiff3"]
path = C:/Program Files/KDiff3/kdiff3.exe
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor

Cannot implement git version control on R-Studio (Version Control System: NONE)

I'm trying to put a project under version control in R-Studio. I have installed git and everything is working from the git bash command-line. However, when I go to Tools >> Version Control in R-Studio, it says "None" under "Version Control System."
I have attached a screenshot here: http://i.imgur.com/Arc12GG.png
Does anybody know how to fix this?
Even after setting the path to the git executable on my Mac at "Macintosh HD/usr/bin", RStudio still showed "None" for the version control option. In Terminal, I entered "config git" and was greeted by the message that I had to agree to the new Xcode/iOS license. I was able to do that in Terminal by typing "sudo xcodebuild", entering my admin password, then scrolling to the end of the agreement text and entering "agree". Then git showed up as an option for version control. I mention this in case others are stymied even after setting the path to the git executable.
For Windows 10 users, even if you had git lovingly installed at:
C:/Program Files (x86)/Git/bin/git.exe
At some stage the update install moves it into your AppData directory. Thanks Redmond. (I think around Git 2.6.4)
TO FIX:
Make sure like #arvi1000 says above "Did you specify the path to the git executable in Global Options (not project options)? " - set path first in Global options in Rstudio under Tools
Change path under Git/SVN the Git Executable path from Program files to new location of git.exe now in Appdata. e.g. for my userprofile Info:
C:\Users[Your user profile "Info"]\AppData\Local\Programs\Git\bin
Now look in RStudio Project Options under Git/SVN to set Version Control System.
MORE HELP
See these answers in this thread for more and if you cannot find git.exe this is a helpful search tip.

What happened to the TOC extension for ipython notebook?

I'm trying to install the great table of contents extension in a new computer. but I cant find it anymore. the only page I do find does not explain how to install the extension on windows.
So.. How can I install it, and why is it not a part of the official Ipython notebook? I simply can't understand how people are getting along without it.
I've installed toc nbextension successfully with Jupyter 4 (ie. ipython notebook 4) recently.
In fact installing extension is easier than before :)
I post my solution here, may it help.
## download
mkdir toc
cd toc
wget https://raw.githubusercontent.com/minrk/ipython_extensions/master/nbextensions/toc.js
wget https://raw.githubusercontent.com/minrk/ipython_extensions/master/nbextensions/toc.css
## install and enable
cd ..
jupyter-nbextension install --user toc
jupyter-nbextension enable toc/toc
A bit more explain:
install will copy toc to ~/.local/share/jupyter/nbextensions/
enable will modify ~/.jupyter/nbconfig/notebook.json.
You can check these two place to see what happened.
Note: we use enable toc/toc here is because toc.js is in ~/.local/share/jupyter/nbextensions/toc/.
If you put toc.js and toc.css directly in ~/.local/share/jupyter/nbextensions/ then you should use enable toc here.
Edit
Sorry, I didn't notice the orginal problem is on windows. I'm not sure if it's same for windows jupyter, any report is welcome.
Update
Now the toc nbextension has been added into this project which provide a collection of kinds of nbextensions. It's very easy to install and manage, worth to try!
I cannot tell you specific Windows advice, but think the key points should be platform independent:
Create a profile (either a default profile or a named one - you'll probably want default to start).
Locate where the profile is.
Add the custom.js file into the profile.
Edit the custom.js file to point to the notebook extension code.
In a bit more detail, setting up a profile is covered in detail here but for a default profile just go to the command line and enter
ipython profile
Next, locate where your profile is stored by typing at the command line
ipython locate
Call that <profile_dir>.
The rest follows the (Windows equivalent of!) the instructions on the link you have: underneath <profile_dir> navigate to (creating any directories that do not already exist)
<profile_dir>/static/custom/
and add the custom.js file as shown. Then edit the first line, where it has "nbextensions/toc" to point to the location where you have placed the toc.js file you have downloaded. This location is relative to the <profile_dir>; for me I have
<profile_dir>/static/custom/custom.js
<profile_dir>/static/custom/nbextensions/toc.js
<profile_dir>/static/custom/nbextensions/toc.css
and the first line of custom.js reads
require(["/static/custom/nbextensions/toc.js"], function (toc) {
Finally, note that this is with version 1.1.0 of the notebook - if you're using an earlier version I strongly suggest you upgrade before trying this.
You'll also find the official installation instructions at:
https://github.com/minrk/ipython_extensions
These instructions include curl commands for retrieving the toc.js and toc.css files from GitHub, which worked fine for me in a bash shell on linux Mint.
For Windows 7, I used a Git Shell (see http://msysgit.github.io/) to execute the curl commands
This IPython Notebook semi-automatically generates the files for minrk's table of contents in Windows. It does not use the 'curl'-commands or links, but writes the *.js and *.css files directly into your IPython Notebook-profile-directory.
There is a section in the notebook called 'What you need to do' - follow it and have a nice floating table of contents : )
Here is an html version which already shows it:
http://htmlpreview.github.io/?https://github.com/ahambi/140824-TOC/blob/master/A%20floating%20table%20of%20contents.htm

Resources