I downloaded TRTH library for R (THAPI.ZIP) updated on Thursday, July 14, 2016 from
When I run in R:
install.packages("path/toTHAPI.ZIP", repos=NULL, type="win.library")
I get the error:
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\n\0\0\0\0\0`{D\0\0\0\0\0\0\0\0\0\0\0\0\006\0\034\0THAPI/UT\t\0\003#qS9qSux\v\0\001\004ù\001\0\0\004\024\0\0\0PK\003\004\024\0\0\0\b\0]{DæÔ\025¸õ\0\0\0c\001\0\0\021\0\034\0THAPI/'
I use R version 3.3.1 (2016-06-21) under Windows.
You have to manually unzipped and manually zipped it back. However from description file,it build with R 3.1.0 and I guess that it's not compatible with 3.3.1. Answer from the following post may help.
Thanks, I did unzip and zip, but I install some other packages, must I uninstall R and install a version 3.1.0?
I'm not R expert. But from my test, I have installed multiple version of R on my windows and it allows me to select specific version of R to run. Also if you are using free version of R Studio, you can select R version to run with your library.
May be the zip file is corrupted.
After downloading it again to be sure it was not an network problem, I manually unzipped and manually zipped it back.
Now I can install the the package, but when I load it I get:
> library(THAPI)
Error in .mergeMethodsTable(generic, mtable, tt, attach) :
trying to get slot "defined" from an object of a basic class ("list") with no slots
Error: package or namespace load failed for ‘THAPI’
Looks like it is high time for TR to wake up and update the zip
I have tried to install from current version (3.3.2 in my case) and from 3.1.0, both original zip and rezipped document (both with THAPI.zip/THAPI structure and having the package in THAPI.zip directly). Whatever I do I get 'THAPI.ZIP/DESCRIPTION' cannot be read (I can open it and it is there).
If I do "type="binary" instead, I get the "embedded nul" error.
Also, if RCurl, XML, and base64 packages are indeed required, they are no longer available for 3.1.0. So if we were all succeeding with installs for 3.1.0, I am not sure that the package would work anyway.