R 3.0.0 crashes on startup - r

I just updated R from version 2.15.1 to version 3.0.0 on my MAC running 10.6.8 and now R crashes on startup.
I get the error:
Error in getLoadedDLLs() : there is no .Internal function 'getLoadedDLLs'
Error in checkConflicts(value) :
".isMethodsDispatchOn" is not a BUILTIN function
Any ideas on how to go about?

The most common cause of this is having a corrupted ".Rdata" file in your working directory. Using the Mac Finder.app you will not by default be able to see files that begin with a ".", so-called dotfiles. Those files can be "seen" if you execute a change to the plist controlling the behavior of Finder.app. Open a Terminal.app window and run this bit of code:
defaults write com.apple.Finder AppleShowAllFiles YES
Then /point/-/click/-/hold/ on Dock-Finder-icon, and choose "Relaunch"
If you to do so, you can then change it back with the obvious modfication to that procedure. I happen to like seeing the hidden files so that's the way I run my Mac all the time, but some people may feel it is too dangerous to expose the "hidden secrets" to their own bumbling.
Paul raises a good point: I run the following R function in the R console after updating:
update.packages(checkBuilt=TRUE, ask=FALSE)
I have a lot of installed packages and paging through the entire list has gotten too tiresome so I bypass the ask-messages. Sometimes you will get errors because there may be dependencies on r-forge or Omegahat packages or on packages that need to be compiled from source. These may need to be updated "by hand". And you may need more than one pass through such an effort. Take notes of which packages are missing and fill them in.

I had the same problem running RKWard on ubuntu 12.04.
Check your r-base-core, like Paul suggested, to make sure the version is also at the latest version. Mine didn't update automatically. I had a platform dependent version, but RKWard was calling the new version. To solve this problem, I simply marked r-base-core for removal and reinstalled the latest version or r-base-core. poof problem fixed, bippity boppity boo!
I suspect that your error is similar to mine because I had also JUST updated RKWard. Start at updating r-base-core or try to get all of the dependencies to match up the versions.
I hope that you can translate this into what to do on a MAC,
SU

Related

Cannot configure rgee R package properly with ee_install()

I've searched for tutorials to help configure the package in my PC, and I've found this one: https://www.youtube.com/watch?v=_fDhRL_LBdQ
I executed every part of the code interactively with the tutorial, but when I run ee_install() (after installing miniconda with py_discover_config() and other packages previously, such as reticulate), but it keeps me returning an error saying that anaconda is mandatory for the package since I'm a windows user.
Here is the error I get:
Error in ee_install_set_pyenv_env(py_env = py_env, py_path = python_path, : Windows users must install miniconda/anaconda to use rgee. The use of a Python environment is mandatory.
I've just installed Anaconda (full version with navigator) and I set a new python environment called "py2r" and tried to use the function ee_install_set_pyenv(), passing the path to the environment created through Anaconda Navigator (which has a python.exe) as paremeter to py_path and the name "py2r" as paremeter for py_env arg. And yet, it didn't work.
What am I missing?
In case you want to take a look at the code, I can provide it, but I don't think it's necessary because is a simple test script that follows as I described.
Thanks for your attention and congratulations for the library, it will be very usefull for me at work!
I fixed the ee_install() problems bypassing them and doing every passage manually. It will require no more then 10 mins and you will probably fix the installation problems. You can find and follow the manual installation with this tutorial:
https://www.youtube.com/watch?v=1-k6wNL2hlo

How to update to Julia 0.7 on MacOs without installing packages again

I am a user of Julia v0.6, no issues to report. I am trying to update to Julia v0.7. I already have the CMD line version installed.
I copied the packages over from the v0.6 folder into my packages folder that came with v0.7.
Here is an image of my file structure in finder.
I see the packages in the "Packages" folder you see above. However, when I try "using SHERPA" for example(SHERPA is a package in the "Packages" folder), it says it's not installed. I thought maybe Pkg.init() would fix the problem but that command is deprecated on v0.7 so I don't know what to do.
I have already looked at the other StackOverflow questions and those didn't resolve my issue. I also already tried Pkg.resolve() and Pkg.Update() to no avail.
I appreciate your support.
Edit W/Solution:
At the time of this writing, I am running MacOs Mojave on my Mac and would suggest at least MacOs High Sierra since the file structure was changed in there.
Install Julia 0.7: https://julialang.org/downloads/ Note: if you don't see v0.7 on the link above, go here: https://julialang.org/downloads/oldreleases.html
Once v0.7 is installed, make sure it dragged into your application folder.
Run the program. Type "Pkg.resolve()" and "Pkg.Update()" in the Julia Terminal window that appears.
Then Run:
Pkg.add("JSON")
in order to get your packages file to show up...
This should make it so the new package management system is enabled. You can confirm that by checking your ".julia" folder(which can be accessed but going to finder - clicking Command-Shift-H and then Command-Shift-.)
You should see an "environments", "packages" and "registries" folder(in addition to probably a few others). Note as of now, due to the new package manager, you either cannot or I don't know how to, clone a project from GitHub desktop to your packages folder.
To add a custom-made package: open command line version v0.7
Type "]". You should see "(v0.7) pkg> " in blue text. Note use "Control"-"c" to exit Pkg mode in terminal.
Type " add https://github.com/xxxxxxx/xxxxxxx.git"
Type " add https://github.com/xxxxxx/xxxxxxx.git" Note: follow any on-screen prompts(i.e. "Type PKg.resolve() or Pkg.update()")
Note: you will probably see many depreciation warning when you run your old code.
How to use the new Pkg manager in Julia v0.7: https://docs.julialang.org/en/v1/stdlib/Pkg/index.html
This is not possible and/or not recommended for the following reasons:
The package manager is completely new in Julia v0.7/v1.0 compared to the one in Julia v0.6. In particular, the new package manager does not understand the old package managers folder structure and method of installation (git cloning). As a sidenote, the packages folder is not supposed to be modified by users, it is controlled by Pkg, and, in particular, putting something in the packages folder does not mean it is installed.
Since there have been very many changes between Julia v0.6 and v0.7/v1.0 is is unlikely that the same package versions that you use on Julia v0.6 works on newer Julia versions, so you don't really gain anything from copying, since you need to "reinstall" new versions anyway.
I would also like to point out that the new package manager is much faster compared to the old one, so
pkg> add PackageA PackageB ...
to add all the packages you use should not take more than a minute.

Building Tools are missing in RStudio

First of all, I am working on a Mac. I am trying to install Blotter from GitHub. I found several descriptions of how to do that but my RStudio tells me that I am missing Building tools and gives me a link (https://www.cnet.com/how-to/install-command-line-developer-tools-in-os-x/) where it is described to do that. So far so good. I downloaded Xcode and the command line tools for Mac and installed those. Nothing changed even after restarting R. Then I found this https://cran.r-project.org/bin/macosx/tools/. I installed it and during that, it told me that I had to do the following
"This package will install clang 6.0.0 for OS X 10.11 (El Capitan) or higher with OpenMP support in /usr/local/clang6
In order to use this compiler you have to add /usr/local/clang6/bin to the PATH environment variable such as
export PATH=/usr/local/clang6/bin:$PATH"
So I changed the environmental variable path as follows http://blog.tonytsai.name/blog/2018-05-07-setting-path-variable-for-gs-command-in-rstudio/.
How I changed the PATH variable.
Again I restarted R but still, nothing changed. I still get the notice that the building tool is missing.
Somehow it seems to me that I installed everything correctly but R doesn't recognize the Programmes. Does anyone have an idea? I tried to search for settings to tell R that I installed the command line tool but couldn't really find anything helpful.
Ok, a bit of an update.
Best I can see it that Blotter is built and stored on R-Forge packages under a package called RStrategist
In R console type/cut & paste this.
install.packages('RStrategist',repos='http://R-Forge.r-project.org')
See R forR-Forge for more details. Once this has been installed run instead.
library(RStrategist)
Unfortunately, I am not willing to install this package and see if it works mainly because 1) don't need it nor know how to use it, 2) not sure how good packages are from R-forge, though it seems legit, but, this brings me back to point one.
So before i read the updated answer of Conrad Thiele i was trying around bit. Basically i deleted R, R Studio, Xcode and Command Line tools. Then i installed Xcode, Command Line tools, R and RStudio. Then i followed the notice on https://cran.r-project.org about the tools and installed both stated tools. As mentioned in the original question the Clang package tells you to change the Environmental Variable. And there was the mistake i believe. I originally simply pasted "PATH=/usr/local/clang6/bin:$PATH" into the the ".Renviron" file. With reading up online i noticed that "export PATH=/usr/local/clang6/bin:$PATH" is actually a Command for the Mac Terminal. After executing it, it sill didn't work but then i remembered that i still had the Path "PATH=/usr/local/clang6/bin:$PATH" in the the ".Renviron" file. Once i deleted that it worked. So i guess the key was that with changing the Environmental Variable correctly R found the connection with the right tool. Patients paid off.

'Malformed' Error on R package check with --as-cran. Package built with Rstudio

A few months ago I launched the 'table1xls' package, built using Rstudio. Since then some revisions have naturally accumulated. I wanted to share the revisions on CRAN in time for the R 3.1.0 rollout.
The problem is, for a couple of months now the --as-cran check option is giving me this annoying error:
* checking CRAN incoming feasibility ...Error: Line starting '<HTML><HEAD><TITLE>C ...' is malformed!
Now, I have no HTML in my package, nor any files that compile into HTML format. My work desktop (where this error occurs) is behind a firewall that requires the --internet2 flag when launching R, but Rstudio seems generally unfazed by that.
I saw this question pop up here and there, including on Rstudio's support pages where it remains unanswered. Any insight will be gratefully accepted.
Btw, my package is available on GitHub, user name "AssafOron". I wonder whether users can install it directly via devtools::install_github.
Oh, forgot to add: I'm using Windows (it's still XP over here) and this error is on the 3.1.0 alpha. But the same error was present with 3.0.2 as well. My top 2 suspects are something with Rstudio, or the firewall.
That looks very much like a proxy issue.
A simple fix: upload the package to win-builder where you can test against the released version of R as well as the development version. If they do not flag anything ... then you know you;re good.
Else, go to a local Starbucks or public library and use different connectivity.

compilation error building an old version of R

In order to use a specific library that has not been updated for some time, I want to use an older version of R (2.3.1), under linux Mint 14.
I got the source file, installed the required library; checking with :
apt-cache showsrc r-base | grep Build-Depends
and issued, as indicated in the R-admin help page, the command:
./configue
that ended without error; then
make
that terminated with the following error message:
In file included from datetime.c:95:0:
Rstrptime.h:201:12: erreur: conflicting types for ‘wcsncasecmp’
In file included from ../../src/include/Defn.h:928:0,
from datetime.c:58:
/usr/include/wchar.h:172:12: note: previous declaration of ‘wcsncasecmp’ was here
Does anyone know what trigered that error (conflicting type between files datetime.c and wchar.h, if I understand well), and how I could keep compiling past this error.
Thanks in advance for your help.
The problem is that R 2.3.1 is very old, and was developed with the old C libraries in mind. With a recent linux install, you have the new C libraries which might not work well with your old R version. What you could do:
Install an old version of linux from around the time of the R version, for example in a virtual machine.
Port the package to the new version of R yourself.
The second option takes more time, but will make the work you base on the package more future proof.

Resources