简体   繁体   中英

working with package without Namespace in R

I have got betaversion from website. The only available is windows installation as mybetapackage.zip file. When I installed the package, it does not work when I load it.

> utils:::menuInstallLocal()
> require(mypackage)
Loading required package: mypackage
Failed with error:  ‘package ‘mypackage’ does not have a NAMESPACE and should be re-installed’

Is it possible to use this beta package someway ?

Edits:

I tried the following instructions to create own namespace. Namespace file contains the following:

exportPattern("^[^\\.]")

Now I am getting following warning.

Warning message:
In readLines(file) :
  incomplete final line found on 'C:/Users/user/Documents/R/win-library/2.14/RCropStat/NAMESPACE

Based on the discussion above I am answering my own questions. All credit goes to who discussed this issue.

Create a file with the following text and put an extra line to avoid an error. Same in the directory for the package where you have description file.

exportPattern("^[^\\.]")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM