R file opening in Spyder but not opening in RStudio - anaconda

I have downloaded 'data_preprocessing_template.r' file from internet for learning purpose. When I opening the file in Rstudio it opens but code not visible, I am pasting screen-shot below for reference->
But the code is visible when I open the same file in Spyder, screen-shot is attached for reference.
Why it is happening? Thanks in advance for any helpful suggestion.

You can install Cran for windows
below steps will be useful.
1.Open website link https://cran.r-project.org
2. Download R 3.6.1 for windows
3. Then Install it . (optional :- restart your system )
Hope this will helpful.

Related

RStudio Desktop: r is taking longer to start than usual

I have been running rstudio desktop for several months but recently I went to start it and it says "r is taking longer to start than usual" and the loading wheel just spins and spins but it never opens.trys to load but never opens I am running the latest versions of R and Rstudio as of this post. I am running windows 10 as my operating system.
I have tried deleting .Rdata, Rprofile.site, .Rprofile and .Renviron files. I have uninstalled and reinstalled both R and Rstudio to the default locations. I have tried clearing the global environment and the DNS cache. When I try to start R with an OS command it says "R is not recognized as an internal or external command, operable program or batch file." Yet if I use the short cut I am able to open base R.
Any suggestions on how to resolve this issue would be much appreciated I have been trying to fix this for days but have found nothing but dead ends. Please let me know if there is more data I can provide that would be useful in resolving this issue.
Thank you.
I am answering this for posterity, the OP of this question reported being able to resolve their issue in another forum. Their solution was:
I had to uninstall R and Rstudio
Launch "run" enter %localappdata% and delete all files pertaining to R or Rstudio
Launch "run" enter %appdata% go to roaming and delete the Rstudio files there
Got to where I had my R packages installed and delete those
Then I had to reinstall R and RStudio
I ran into this same strange error and I was able to resolve it without touching R or my packages:
Uninstall RStudio
Launch "run" enter %localappdata% and delete all files pertaining to Rstudio
Launch "run" enter %appdata% go to roaming and delete the Rstudio files there
Reinstall RStudio
Try to remove remove all config files like .Rprofile, .Renviron, and .Rdata from your working directory, this worked for my case.
More details

change Rstudio R version from outside Rstudio

I changed Rstudio's R version to a non-default one from Tools-options. Now when I reopen Rstudio, it fails to start. Just a blank window with Rstudio title. Uninstall and reinstall didn't help.
Is there a way to change Rstudio's R version from outside Rstudio, say a config file?
OK, found the config in the file
AppData\Roaming\RStudio\desktop.ini

Gnome Shell extensions not loading, no error message available

I have two gnome-shell extensions that don't appear to be loading after upgrading to 3.24. In gnome-tweak-tool they have a warning sign icon with "Error loading extension", and nothing else. I tried using looking glass (lg), and it just says "Error", and that the extension "has not reported any errors".
How can I debug the extension to find out why exactly it's not loading?
I found the error in the systemd journal:
$ sudo journalctl /usr/bin/gnome-shell
Just simply run this on terminal:
gnome-extensions-app
and enable it to make the extensions work.
Works perfectly with GNOME 40
As mentioned on the Github page.
A Shell reload is required. Press Alt+F2 r Enter and the extension has to be enabled with gnome-tweak-tool or with dconf.
As mentioned on Dash to Dock's User reviews. Make sure you disable Ubuntu Dock if you are using this in Ubuntu, otherwise you are going to have conflicts.
To disable Ubuntu Dock type the following in terminal:
gnome-extensions disable ubuntu-dock#ubuntu.com
I also experienced the same error. I think I will like to state the procedures that I took to make mine to work, and then you can check to see if you got it wrong somewhere.
Here are the steps
First install the Gnome shell extensions package from the terminal
sudo apt install gnome-shell-extensions
And then reboot your system. After that, start GNOME Tweaks and you’ll find a few extensions installed. You can just toggle the button to start using an installed extension.
Next, go to GNOME Extensions website (GNOME User Themes Extensions) and download the extension with the latest version (Although, I often prefer to download the version next to the latest version, since it may be more stable).
Extract the downloaded file to the ~/.local/share/gnome-shell/extensions (home/.local/share/gnome-shell/extensions) directory. You can press Ctrl + H to show hidden folders. Create the extensions folder if you don't have it yet.
Now restart GNOME Shell. Press Alt+F2 and enter r to restart GNOME Shell.
Restart GNOME Tweaks tool as well. You should see the manually installed GNOME extension in the Tweak tool now. You can configure or enable the newly installed extension here.
That's all
I hope this helps
Loging in without wayland works for me.
My extension was not enabling. I just log out and log in back and ran this command.
gnome-extensions enable example#hammad.example.com
It worked in my case.

Issue with Installing Go in Windows

I download GO compiler for windows from http://code.google.com/p/gomingw/downloads/list. However, in Read Me file, it stated that for installation information, check http://golang.org/doc/install.html#install. But, in golang.org, there is only information about Linux installation, not for windows. Can anybody help me by specifying how to install it or giving a source where can I found the steps of installation. Thanks in advance.
Download the gowin386_release.r60.3_installer.exe file and run it.

Set up Vim to work with R and Sweave in Windows

I have installed vim in windows and would like to configure it so i can send code to R. I want to also use Sweave with it. However, i have Googled and failed to find clear step-by-step instructions on how to set this up.
my attempts so far:
installed Vim using executable from ftp://ftp.vim.org/pub/vim/pc/gvim73_46.exe
downloaded R-plugin from https://github.com/jcfaria/Vim-R-plugin/zipball/master and extracted it to a folder on my pc. following instructions in the r-plugin.txt file, i installed python-3.2.msi and pywin32-216.1.win32-py3.2exe. I extracted the plugin zip-file to C:\Program Files (x86)\Vim\vimfiles\ merging like-named folders together. then i opened Vim and typed :helptags C:\Program Files (x86)\Vim\vimfiles\doc. I closed Vim then I started R and reopened Vim. I typed :new anewfile.R and got the error message
"Python interface must be enabled to run Vim-R-Plugin. Please do ':h r-plugin-installation details
and when i type this i get
error149, no help for r-plugin-installation
I also did not see the buttons that send code to R.
I failed to understand the instruction that , "You may have to
adjust the value of |vimrplugin_sleeptime|."
What should i do?
-I already have Miktex 2.9 on my PC. will Vim see it? How do I set up Vim to see Latex?
Will appreciate any help.
Note: I have used rstudio with Sweave and also eclipse but there are some issues i need to resolve and hence need to try vim and see how it will work out.
I suppose that this solution will not satisfying you completely but Rstudio IDE features a basic VIm editing mode: Global Option > Code Editing > Enable vim editing mode.
I think the windows binaries of Vim 7.3 need Python 2.7 or 3.1. You can check the information that you get via :version; the linked Python version is somewhere in it.
So my solution would be installing Python 2.7 (+pywin32 for python 2.7). Also, check if Python is working in Vim before trying to use the R plugin.

Resources