Building my unaltered package suddenly fails: for Vignettes and 'arch = x64' - r

Context
I've been developing a proprietary package (call it "my_pkg") with vignettes, in RStudio with the latest version (4.1.1) of R. I'm working on a Lenovo ThinkPad with the following software
sysname release version machine
"Windows" "10 x64" "build 19043" "x86-64"
as provided by Sys.info().
Until recently, my devtools workflow has been reasonably smooth (with one occasional exception). However, I've begun to encounter a very puzzling error, which occurs under conditions virtually identical to those beforehand, when the workflow proceeded without issue.
Despite the fact that my vignettes always built successfully before, and I have not edited them in the meantime, the build now fails for architecturally specific reasons...
Error : package 'my_pkg' is not installed for 'arch = x64'
...when and only when I include the vignettes in the build.
I have reinstalled R (and Rtools and RStudio) from scratch, reinstalled devtools (and its dependencies), and "rewound" my project to the last Git commit at which devtools::check() succeeded. I have also walked through extensive troubleshooting with responders like #SteffenMoritz and #Alexis, for whom I have appended further information in the section Info by Request.
Unfortunately, nothing has worked.
Failure With devtools::check()
When I run devtools::check(), everything starts promisingly...
i Updating my_pkg documentation
i Loading my_pkg
Writing NAMESPACE
Writing NAMESPACE
-- Building --------------------------------------------------------------------------------- my_pkg --
Setting env vars:
* CFLAGS : -Wall -pedantic
* CXXFLAGS : -Wall -pedantic
* CXX11FLAGS: -Wall -pedantic
-------------------------------------------------------------------------------------------------------
√ checking for file 'C:\Users\greg\Workspace\R\Packages\my_pkg/DESCRIPTION' ...
- preparing 'my_pkg': (733ms)
√ checking DESCRIPTION meta-information ...
- installing the package to build vignettes
-----------------------------------
- installing *source* package 'my_pkg' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'my_pkg'
finding HTML links ... done
foo html
my_pkg-package html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
...until the step testing if installed package can be loaded from temporary location. Here an error occurs:
Error : package 'my_pkg' is not installed for 'arch = x64'
Error: loading failed
Execution halted
ERROR: loading failed
- removing 'C:/Users/greg/AppData/Local/Temp/RtmpSaabgx/Rinst332419517258/my_pkg'
-----------------------------------
ERROR: package installation failed
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> ** building package indices
E> ** installing vignettes
E> ** testing if installed package can be loaded from temporary location
E> Error : package 'my_pkg' is not installed for 'arch = x64'
E> Error: loading failed
E> Execution halted
E> ERROR: loading failed
E> * removing 'C:/Users/greg/AppData/Local/Temp/RtmpSaabgx/Rinst332419517258/my_pkg'
E> -----------------------------------
E> ERROR: package installation failed
Type .Last.error.trace to see where the error occurred
The .Last.error.trace suggests an issue with pkgbuild specifically:
> .Last.error.trace
Stack trace:
1. devtools::check()
2. withr::with_envvar(pkgbuild::compiler_flags(FALSE), action = "prefix", ...
3. base:::force(code)
4. pkgbuild::build(pkg$path, tempdir(), args = build_args, quiet = quiet, ...
5. withr::with_temp_libpaths(rcmd_build_tools(options$cmd, c(options$path, ...
6. base:::force(code)
7. pkgbuild:::rcmd_build_tools(options$cmd, c(options$path, options$args), ...
8. pkgbuild:::with_build_tools(callr::rcmd_safe(..., env = env, ...
9. withr::with_path(rtools_path(), code)
10. base:::force(code)
11. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, ...
12. callr:::run_r(options)
13. base:::with(options, with_envvar(env, do.call(processx::run, ...
14. base:::with.default(options, with_envvar(env, do.call(processx::run, ...
15. base:::eval(substitute(expr), data, enclos = parent.frame())
16. base:::eval(substitute(expr), data, enclos = parent.frame())
17. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, ...
18. base:::force(code)
19. base:::do.call(processx::run, c(list(bin, args = real_cmdargs, ...
20. (function (command = NULL, args = character(), error_on_status = TRUE, ...
21. throw(new_process_error(res, call = sys.call(), echo = echo, ...
I have no clue as to why the architecture
Error : package 'my_pkg' is not installed for 'arch = x64'
should be an issue only now. There have been no substantive changes to my computer.
Despite the message package installation failed, and despite the fact that I've run devtools::check() rather than devtools::install(), the package acts as if it were "halfway" installed! I can type my_p in the console, and RStudio will autocomplete my_pkg; and I can then type my_pkg:: and RStudio will supply the standard autocompletion list of the functions in my_pkg, which are all available.
However, typing my_pkg:: not only summons the #exported functions but also exposes my internal functions and data, as if I had typed my_pkg:::!
Success With devtools::install() or devtools::build(vignettes = FALSE)
Oddly, when I actually run devtools::install(), or comparably devtools::build_vignettes(vignettes = FALSE), the process completes without a hitch!
√ checking for file 'C:\Users\greg\Workspace\R\Packages\my_pkg/DESCRIPTION' ...
- preparing 'my_pkg': (640ms)
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts (384ms)
- checking for empty or unneeded directories
Removed empty directory 'my_pkg/inst/libs'
Omitted 'LazyData' from DESCRIPTION
- building 'my_pkg_0.0.0.9000.tar.gz'
Running "C:/Users/greg/R/bin/x64/Rcmd.exe" INSTALL \
"C:\Users\greg\AppData\Local\Temp\Rtmpozvh26/my_pkg_0.0.0.9000.tar.gz" --install-tests
* installing to library 'C:/Users/greg/R/library'
* installing *source* package 'my_pkg' ...
** using staged installation
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'my_pkg'
finding HTML links ... done
foo html
my_pkg-package html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (my_pkg)
Making 'packages.html' ... done
Now, the autocompletion works entirely as expected, and only the appropriate functions are exposed by my_pkg:: and my_pkg::: respectively.
Failure With devtools::install(build_vignettes = TRUE) or devtools::build()
Yet there is one further plot twist. When I use devtools::install(build_vignettes = TRUE), or comparably devtools::build(), I get a similar error to that with devtools::check():
√ checking for file 'C:\Users\greg\Workspace\R\Packages\my_pkg/DESCRIPTION' ...
- preparing 'my_pkg': (672ms)
√ checking DESCRIPTION meta-information ...
- installing the package to build vignettes
-----------------------------------
- installing *source* package 'my_pkg' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'my_pkg'
finding HTML links ... done
foo html
my_pkg-package html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error : package 'my_pkg' is not installed for 'arch = x64'
Error: loading failed
Execution halted
ERROR: loading failed
- removing 'C:/Users/greg/AppData/Local/Temp/RtmpM7RbHr/Rinst504119422cd/my_pkg'
-----------------------------------
ERROR: package installation failed
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> ** building package indices
E> ** installing vignettes
E> ** testing if installed package can be loaded from temporary location
E> Error : package 'my_pkg' is not installed for 'arch = x64'
E> Error: loading failed
E> Execution halted
E> ERROR: loading failed
E> * removing 'C:/Users/greg/AppData/Local/Temp/RtmpM7RbHr/Rinst504119422cd/my_pkg'
E> -----------------------------------
E> ERROR: package installation failed
Type .Last.error.trace to see where the error occurred
Success With devtools::build_vignettes()
Bizarrely, despite the issues above with building vignettes, everything somehow runs smoothly when I call devtools::build_vignettes() sans arguments or with dependencies = TRUE:
i Building my_pkg vignettes
√ Creating 'doc/'
√ Adding '^doc$' to '.Rbuildignore'
√ Setting active project to '<no active project>'
√ Adding '/doc/' to '.gitignore'
√ Setting active project to '<no active project>'
i Moving backstory.html, intro.html, library.html, template.html, usage.html, backstory.R, intro.R, library.R, template.R, and usage.R to doc/
i Copying backstory.Rmd, intro.Rmd, library.Rmd, template.Rmd, and usage.Rmd to doc/
√ Creating 'Meta/'
√ Adding '^Meta$' to '.Rbuildignore'
√ Setting active project to '<no active project>'
√ Adding '/Meta/' to '.gitignore'
√ Setting active project to '<no active project>'
i Building vignette index
Note
Assuming that the fault was mine, and that I had unwittingly introduced an issue somewhere within my R project, I switched to an entirely different Git branch. The most recent commit to this branch had passed devtools::check() with flying colors. However, even after switching over to this "safe" branch, those same issues continued!
Between that last successful check and when the issues began, I made no updates to:
R itself
RStudio
Any R packages
My computer's software (with the exception of a minor anti-malware update from Microsoft).
My computer's hardware
Likewise, the vignettes have been present since far earlier in the project.
Conclusion
I'm hoping to roll out a proof of concept for my_pkg in the rather near future, and the vignettes are quite essential to its usability.
Info by Request
Since "my_pkg" is proprietary, I here anonymize my personal and organizational information (names, filepaths, etc.) as above.
For #SteffenMoritz
Would you mind sharing your DESCRIPTION file and the vignette header/meta information?
The DESCRIPTION file:
Package: my_pkg
Title: Proprietary Package for My Org
Version: 0.0.0.9000
Authors#R:
person(given = "Greg",
family = "Lastname",
role = c("aut", "cre"),
email = c("glastname#myorg.com"))
Description: The `my_pkg` package is a proprietary project for My Org,
and as such I have changed the names to project the innocent.
License: file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
URL: https://github.com/myorg/my_pkg
BugReports: https://github.com/my_org/my_pkg/issues
Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
Depends:
R (>= 2.10)
The vignette headers:
intro.Rmd:
---
title: "A Catchphrase!"
author: "Gregory Lastname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{A Catchphrase!}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
# Show no output.
eval = FALSE, results = "hide",
# Show no dialog.
message = FALSE, warning = FALSE,
# Show no errors.
error = TRUE, purl = FALSE,
# Default format.
collapse = TRUE, comment = "#>"
)
```
backstory.Rmd:
---
title: "A Reference, to Science Fiction"
author: "Gregory Lastname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{A Reference, to Science Fiction}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
# Show no output.
eval = FALSE, results = "hide",
# Show no dialog.
message = FALSE, warning = FALSE,
# Show no errors.
error = TRUE, purl = FALSE,
# Default format.
collapse = TRUE, comment = "#>"
)
```
library.Rmd
---
title: "A Generic One-Liner"
author: "Gregory Lastname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{A Generic One-Liner}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
# Show no output.
eval = FALSE, results = "hide",
# Show no dialog.
message = FALSE, warning = FALSE,
# Show no errors.
error = TRUE, purl = FALSE,
# Default format.
collapse = TRUE, comment = "#>"
)
```
template.Rmd
---
title: "A Well-Written Description"
author: "Gregory Lastname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{A Well-Written Description}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
# Show no output.
eval = FALSE, results = "hide",
# Show no dialog.
message = FALSE, warning = FALSE,
# Show no errors.
error = TRUE, purl = FALSE,
# Default format.
collapse = TRUE, comment = "#>"
)
```
usage.Rmd
---
title: "An Exhortation!"
author: "Gregory Lastname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{An Exhortation!}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
# Show no output.
eval = FALSE, results = "hide",
# Show no dialog.
message = FALSE, warning = FALSE,
# Show no errors.
error = TRUE, purl = FALSE,
# Default format.
collapse = TRUE, comment = "#>"
)
```
For #Alexis
What do you see if you open the .Rproj file with a text editor?
The my_pkg.Rproj file, as opened in MS Notepad. NOTE: This file has not been modified since the very initial commit.
Version: 1.0
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
LineEndingConversion: Posix
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
By request
Does it work if you run R CMD build/INSTALL ... from the command line?
I also built from the command line
greg#CO-GLASTNAME MINGW64 ~/Workspace/R
$ R CMD build C:/Users/greg/Workspace/R/Packages/my_pkg
but I got the same output echoed above:
* checking for file 'C:/Users/greg/Workspace/R/Packages/my_pkg/DESCRIPTION' ... OK
* preparing 'my_pkg':
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
-----------------------------------
* installing *source* package 'my_pkg' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'my_pkg'
finding HTML links ... done
foo html
my_pkg-package html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error : package 'my_pkg' is not installed for 'arch = x64'
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/greg/AppData/Local/Temp/RtmpgFIc2r/Rinst1cc0231a6b37/my_pkg'
-----------------------------------
ERROR: package installation failed

You are probably right and it is a problem with the vignette.
(but of course I can't be 100% sure, as I don't know your files)
About your confusion about the check() and install() runs:
RStudio’s “build and reload doesn’t build vignettes
That is why you probably have to run devtools::install() to get the error.
I'll post you some most likely issues with the vignette (here is also a good longer tutorial):
First check the following things:
The directory is called vignettes/ and not vignette/.
Check that vignettes are not covered by .Rbuildignore
Ensure you have the necessary vignette metadata (your seemed good from the first look)
Most likely these thing will be alright for you (but just to check).
In my opinion the most likely issue is, that your DESCRIPTION file does not contain all the necessary dependencies for your .Rmd vignettes
Also better write:
VignetteBuilder: knitr, rmarkdown
Still keep rmarkdown additionally in the Suggests. Also knitr to both, Suggests and VignetteBuilder.
Even more important(!) you also need the packages, that are used in your .Rmd files in Suggests. Since you are using RMarkdown I am assuming, there is some code in your vignettes.
Go through your code and look which packages you are using. Any packages used by the vignette should be declared in the DESCRIPTION.
I could imagine this might also be the reason, why it seemingly worked once and then after changing nothing (in your opinion) it fails.
Could be you still had all the required packages loaded in the background when it worked. So that it did not have an impact, that the packages were missing in Suggests.
This would be my first guess, what the problem could be.
If this does not work, I would try removing vignettes, to see if it is a certain vignette that causes the problem.

What solved it in my case was switching from %\VignetteEngine{knitr::rmarkdown} to %\VignetteEngine{knitr::knitr}. I have no idea why, but it stopped the error and putting back rmarkdown instead of knitr reproduced the error.

Unresolved
As of now, no answer has been posted that solves the titular error. I am posting this by way of clarification, to any users encountering the same error, that the error remains undiagnosed and unresolved. Indeed, the error has persisted even after resetting my project via Git and reinstalling R (and Rtools and RStudio) from scratch.
My thanks to #SteffenMoritz and #Alexis for their tenacious debugging sessions. While our efforts were unsuccessful*, I appreciate their time, effort, and friendliness. Anyone struggling with similar issues would do well to follow their advice, found in an answer and in the comments.
I will update this post with any true solution I might encounter in the future.
* Hence, the bounty has been left to the default mechanism (and so halved) upon expiration.

Related

R package not compatible with 3.5.3

I am attempting to install a package that was made on my computer, but I am having issues. Installing seemed to work fine, but I got a warning:
Warning in install.packages :
package ‘abcmlr’ is not available (for R version 3.5.3)
This naturally throws the error when calling library
Error in library(abcmlr) : 'abcmlr' Not a valid package that has already been installed
Using .libPaths() returns "C:/Users/amlut/Documents/R/win-library/3.5" "C:/Program Files/R/R-3.5.3/library". So I presume this is why library() is giving me an error.
Why does installing my package not work for version 3.5.3 (Does this question require additional information about my package)? Is it possible to make my package work for 3.5.3? What steps would be required to achieve this?
Thank you.
Edit: this is a package I made, and I am using devtools::install
DESCRIPTION:
Package: abcmlr
Type: Package
Title: Analysis of Bone Counts by Maximum Likelihood
Version: 0.1.0
Author:
Maintainer:
Description: See Rogers ABCML for details
License:
Encoding: UTF-8
LazyData: true
NeedsCompilation: no
Packaged: 2019-06-14 21:17:42 UTC; amlut
Built: R 3.5.3; ; 2019-06-14 21:17:43 UTC; windows
Output from devtools::install:
devtools::install("C:/Users/amlut/Documents/R/win-library/3.5/abcmlr")
WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/Rtools has been deleted.
Please download and install Rtools 3.5 from http://cran.r-project.org/bin/windows/Rtools/.
√ checking for file 'C:\Users\amlut\Documents\R\win-library\3.5\abcmlr/DESCRIPTION' ...
- preparing 'abcmlr':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
Removed empty directory 'abcmlr/man'
- building 'abcmlr_0.1.0.tar.gz'
Running "C:/PROGRA~1/R/R-35~1.3/bin/x64/Rcmd.exe" INSTALL "C:\Users\amlut\AppData\Local\Temp\RtmpGySaDj/abcmlr_0.1.0.tar.gz" --install-tests
* installing to library 'C:/Users/amlut/Documents/R/win-library/3.5'
* installing *source* package 'abcmlr' ...
** R
** byte-compile and prepare package for lazy loading
No man pages found in package ** help
'abcmlr'
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (abcmlr)
In R CMD INSTALL
library(abcmlr)

R: package vignette not built

Problem
I created a small internal package for my company. To describe hot to use it, I wrote a vignette. But for some reason, the vignette is not built when I hit Install and Restart in RStudio.
Further Information
I use roxygen for the package documentation
Interestingly, the output from Install and Restart says that it is installed:
==> devtools::document(roclets=c('rd', 'collate', 'namespace'))
Updating DataReportR documentation
Loading DataReportR
Documentation completed
==> Rcmd.exe INSTALL --no-multiarch --with-keep.source DataReportR
* installing to library 'C:/Program Files/R/library'
* installing *source* package 'DataReportR' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (DataReportR)
devtools::build_vignettes() returns NULL even though the lines
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
are included in the DESCRIPTION.
The YAML header of the vignette looks like this:
---
title: "My title"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Generate LaTeX tables for Data Reports}
%\VignetteEngine{rmarkdown::render}
%\usepackage[utf8]{inputenc}
---
I also tried to force building the vignette by devtools::build(vignettes = TRUE) but nothing changed.
EDIT (changed YAML header):
When I change %\VignetteEngine{rmarkdown::render} to %\VignetteEngine{knitr::rmarkdown} in the vignette's YAML header, devtools::build_vignettes() works and places the built vignette in /inst/doc/.
However, when I Check the package in RStudio, the check fails at this position:
** installing vignettes
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) :
undefined exports: create_var_details, create_var_overview
Error: loading failed
Execution halted
ERROR: loading failed
Both create_var_details and create_var_overview are exported functions. Here an example:
...
#' #export
#'
create_var_details <- function(...
...
With the old header, the checks were fine.
I figured out that R did not find pandoc. Thus, I added the pandoc path to the PATH environment variable. I also changed the vignette enginge to %\VignetteEngine{knitr::rmarkdown} as suggested in the comments by #R18.
Now the vignette is properly built when I click on Install and Restart in RStudio.
However, checking the package still does not work. See my EDIT to the question. But this in another question: R package: Adding a vignette causes 'undefined exports'

No library trees found in 'lib.loc' when installing custom package

I am making a package for functions that I developed for a specific application at work. I was using a guide to make the package using devtools and roxygen2. see guide here https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/
When finished following the steps I used the install() feature and I get this error.
* installing *source* package 'subOpti' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE,
logical.return = TRUE) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE,
logical.return = TRUE) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing '\\server/users/lgallaway/My Documents/R/win-
library/3.3/subOpti'
My lib location is on a server and I choose my package location in a different section of a fileserver. I thought that maybe the server locations were an issue, so I moved the package locally but that just generated a separate error.
Well I took the files home and followed the same process that was highlighted in the guide above and it worked no issue. I am assuming the issue is that I don't have write permissions to the network lib location.

Building R package from github: how to disable building vignettes?

I try to build fork of R package from github (this fork has a fresh bugfix). Unfortunatelly, the compilation fails on TeX being missed on my system when trying to build vignettes. I don't want to install loads of SW just to build vignettes I don't need. How can I disable building them?
This is how my compilation went:
> require(devtools)
> install_github("patcpsc/rredis")
Installing github repo rredis/master from patcpsc
Downloading master.zip from https://github.com/patcpsc/rredis/archive/master.zip
Installing package from C:\DOCUME~1\Tomas\LOCALS~1\Temp\Rtmpolel1d/master.zip
Installing rredis
Installing dependencies for rredis:
RUnit
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://www.freestatistics.org/cran/bin/windows/contrib/3.1/RUnit_0.4.26.zip'
Content type 'application/zip' length 194763 bytes (190 Kb)
opened URL
downloaded 190 Kb
package ‘RUnit’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Documents and Settings\Tomas\Local Settings\Temp\Rtmpolel1d\downloaded_packages
"C:/PROGRA~1/R/R-31~1.0/bin/i386/R" --vanilla CMD build "C:\Documents and Settings\Tomas\Local \
Settings\Temp\Rtmpolel1d\devtools42062762938\rredis-master" --no-manual --no-resave-data
* checking for file 'C:\Documents and Settings\Tomas\Local Settings\Temp\Rtmpolel1d\devtools42062762938\rredis-master/DESCRIPTION' ... OK
* preparing 'rredis':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-31~1.0/bin/i386/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1
ERROR
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
pdflatex is not available
Calls: <Anonymous> -> texi2pdf -> texi2dvi
Execution halted
Error: Command failed (1)
Thanks in advance.
Wow, found it! I missed it as it is not listed in options of install_github function, but it accepts all the other options of install and build functions!
install_github("patcpsc/rredis", build_vignettes = FALSE)

R-package missing functions, but has documentation

My problem is when i build a package using devtools, or R CMD INSTALL -build the package builds, but when I install the resulting .zip (when I've tried binary builds) or .tar.gz
the functions in the package don't show up. I can SEE the functions in the .tar.gz when I unzip and the files are sufficiently large so as not to empty. ANY help appreciated.
what I'm using: Rstudio, R v 3.1.0
>install.packages("E:/R/Rpackage_meadq/meadq_1.0.4.tar.gz", repos = NULL, type = "source")
'\\AA.AD.EPA.GOV\ORD\RTP\USERS\A-D\dhall05\Net MyDocuments'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'meadq' ...
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (meadq)
>installed.packages()
...
meadq "3.1.0"
> library('meadq')
>ls('package:meadq')
character(0)
## to take an example function within package
> create_ont_csv()
Error: could not find function "create_ont_csv"
>?create_ont_csv
this pulls up the function documentation for create_ont_csv that's in the package
when I look at the "meadq_1.0.4.tar.gz" using winzip, I can see all the functions.
I've tried building in binary and the same thing happens where the functions are missing, but the documentation is there.
I've tried re-building a lot with this code and also R CMD INSTALL -build ... :
> library('devtools')
Attaching package: ‘devtools’
The following objects are masked from ‘package:utils’:
?, help
The following object is masked from ‘package:base’:
system.file
> build("E:/R/Rpackage_meadq/meadq")
"C:/PROGRA~1/R/R-31~1.0/bin/x64/R" --vanilla CMD build "E:\R\Rpackage_meadq\meadq" \
--no-manual --no-resave-data
* checking for file 'E:\R\Rpackage_meadq\meadq/DESCRIPTION' ... OK
* preparing 'meadq':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'meadq_1.0.4.tar.gz'
[1] "E:/R/Rpackage_meadq/meadq_1.0.4.tar.gz"

Resources