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

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.

Related

R plot doesn't work on my Windows, but plot.default does

I'm taking a course in R and I've hit a road block on day one.
Typing:
demo(graphics)
...should start a series of graphs being displayed on screen. On my Windows 10 (64 bit) new Dell laptop, I get a persistent error:
The execution is stopped after the red lines, seemingly because the demo(graphics) call is being made with incompatible parameters. In blue I make the same call but use the default function and an empty plot is displayed.
I have tried uninstalling and reinstalling everything, installing through Anaconda and from the CRAN website. The same error persists. I've even tried with mro instead of basic R.
I don't see any similar error messages in my class or on Google. My guess is that I need to install a particular version of R and RStudio make it work but I'm guessing.
Can anybody offer some expertise?
I'm running R version 3.6.1 (2019-07-05) (which is executing code correct, just not the demo call) and RStudio Version
Running the basic Rgui software from the command line with the --vanilla parameter like so:
Rgui --vanilla
Opened Rgui and the
demo(graphics)
...call worked.
This meant that the issue was in the .Rprofile file. This is found in the etc folder of the basic R installation and when I checked, it looked absolutely fine (entirely commented out actually).
I wanted to use RStudio though, so I investigated the RStudio docs and saw that each project is given its own .Rprofile style initialization file when a new project is created.
So I created a new project with RStudio and by creating a new project whatever configuration issue was causing the error was completely fixed.
Credits to G. Grothendieck for the answer in the comments.

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.

Rterm.,exe and tcl86.dll

Godd morning!
On friday while I was doing some tests using parallel processing (with doParallel, compiler and foreach packages) suddenly I began to have repeteadly the following message
Message error
which traduced says:
"It was not possible to find the access point (or point of entry) to the proccedure deflateSetHeader in the dynamic link library C:PROGRA~1\R\R-3.4~1.2\Tcl\bin64\tcl86.dll "
The R version I was using when it started was the prior 3.3.3
I thought that, may be I didn't realize any inconsistency with that version and the packages I mentioned.
I reinstalled everything (R - the most recent version and RStudio, also, the most recent version) and the problem continues even in its most basic installation state (with no extra package installed). And now the message appears even when I just open RStudio but I'm not running anything.
Is anyone having this trouble? how can I solve it?
If any other info is needed I'll be glad to give you. I appreciate any help sice it's been a long weekend trying to solve it.
The issue got resolved by reinstalling R and R studio latest update. Currently using this version
RStudio-1.1.383
R-3.4.2-win
enter image description here

RExcel in R 3.0.x

RAndFriends, which includes all the items needed to run RExcel, includes just R 2.15.2.
I am currently using the latest version of R but rcom 2.3.1 and rscproxy 2.0.5, which I am currently using, do not allow me to start an R server within Excel.
Setting foreground R server whithin Excel returns a fatal error and R rejects any connection with Excel via rcom.
I get two error messages:
R Server not available
There seems to be no R process connected to Excel
The main difference with a running RExcel session is that in the latter you may see rscproxy and rcom to be loaded when you start a RExcel session.
Is there anyone who is currently using RExcel with R 3.0.1 who can explain me how he succeeded in running it (step by step)?
Found it on statconn's Wiki section.
Assuming you have a suitable version of R installed, the following steps are necessary to install RExcel and the infrastructure. You need to be logged into Windows with administrator privileges to do this!
You also need to follow these instructions if you upgrade R, i.e. you install a new release of R after you have installed RExcel.
Download the statconn DCOM server and execute the program you downloaded.
Start R as administrator (on Windows 7 you need to right-click the R icon and click the corresponding item).
In R, run the following commands (you must start R as administrator to do this).
Commands:
install.packages(c("rscproxy", "rcom"), repos = "http://rcom.univie.ac.at/download", lib = .Library)
library(rcom)
comRegisterRegistry()
Now you have rcom installed, but RExcel is not installed yet.
To install RExcel: download the RExcel installer and run this installation program. Installing RExcel this way will set the background server of R as the default R server for RExcel. You can change this in the configuration settings in R. If you want to set the foreground server as the default site wide server, there is an appropriate option in one of the dialogs of the installation.
The RExcel installer modifies one of the configuration files of R, the file Rprofile.site, usually found at a location like C:\Program Files\R\R-2.13.1\etc\Rprofile.site.
If you do not install RExcel and want the package rcom to be loaded into R each time you start it, you have to add the line
library(rcom)
to Rprofile.site. You have to start your editor as administrator to be able to modify this file.
I thint that focus of those instuctions are on "Assuming you have a suitable version of R installed". R 3.0.1 do not work with RExcel.
I have noticed all development of Rmetrics products have ceased development since Diethelm Wuertz untimely passing, some of his associates on the team maintain it, but further development stopped abruptly after Diethelm Wuertz the project leader and main inspiration behind the team, died in a car accident in 2015, that is how long it has been since any serious development has occurred on Rexcel and all the range of Rmetric products, it is a real tragedy they are still cutting edge 6 years after Diethelm's passing, he would be sad to see his legacy slowly die. I am looking at xlwings and converting not too difficult code to python for speed and power, as far as many great R libraries go, I have not the time to reinvent the wheel within python, it is not a labour of love for me.

R 3.0.0 crashes on startup

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

Resources