R Install and Restart fails - r

I have been working on an R package for work for sometime and have been making updates and installing it to my machine for over a year. For some reason, last month, I can no longer build to source, binary and hence I cannot install and restart.
When I choose the document option:
==> devtools::document(roclets = c('rd', 'collate', 'namespace'))
i Updating LICHospitalR documentation
i Loading LICHospitalR
Writing NAMESPACE
Writing NAMESPACE
Documentation completed
It runs successfully.
Now when I click Install and Restart
==> Rcmd.exe INSTALL --no-multiarch --with-keep.source LICHospitalR
* installing to library 'C:/Users/bha485/Documents/R/win-library/4.1'
* installing *binary* package 'LICHospitalR' ...
cp: unknown option -- )
Try '/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Users/bha485/Documents/R/win-library/4.1/LICHospitalR'
* restoring previous 'C:/Users/bha485/Documents/R/win-library/4.1/LICHospitalR'
Exited with status 1.
Also when I do a check:
==> devtools::check()
i Updating LICHospitalR documentation
i Loading LICHospitalR
Registered S3 method overwritten by 'tune':
method from
required_pkgs.model_spec parsnip
Registered S3 methods overwritten by 'stars':
method from
st_bbox.SpatRaster sf
st_crs.SpatRaster sf
Writing NAMESPACE
Writing NAMESPACE
-- Building ------------------------------------- LICHospitalR --
Setting env vars:
* CFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
-----------------------------------------------------------------
v checking for file 'C:\Users\bha485\Desktop\LICHospitalR/DESCRIPTION' ...
- preparing 'LICHospitalR': (3.3s)
v checking DESCRIPTION meta-information ...
v checking whether 'INDEX' is up-to-date (929ms)
- installing the package to build vignettes
-----------------------------------
- installing *binary* package 'LICHospitalR' ...
cp: unknown option -- )
Try '/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
- removing 'C:/Users/bha485/AppData/Local/Temp/RtmpQX3Cq3/Rinst1e246e7f3ee6/LICHospitalR'
-----------------------------------
ERROR: package installation failed
Error: System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr:
E> * checking for file 'C:\Users\bha485\Desktop\LICHospitalR/DESCRIPTION' ... OK
E> * preparing 'LICHospitalR':
E> * checking DESCRIPTION meta-information ... OK
E> * checking whether 'INDEX' is up-to-date ... OK
E> * installing the package to build vignettes
E> -----------------------------------
E> * installing *binary* package 'LICHospitalR' ...
E> cp: unknown option -- )
E> Try '/usr/bin/cp --help' for more information.
E> ERROR: installing binary package failed
E> * removing 'C:/Users/bha485/AppData/Local/Temp/RtmpQX3Cq3/Rinst1e246e7f3ee6/LICHospitalR'
E> -----------------------------------
E> ERROR: package installation failed
Stack trace:
1. devtools::check(, check_dir = dirname(getwd()))
2. withr::with_envvar(pkgbuild::compiler_flags(FALSE), action = "pre ...
3. base:::force(code)
4. pkgbuild::build(pkg$path, tempdir(), args = build_args, quiet = q ...
5. withr::with_temp_libpaths(rcmd_build_tools(options$cmd, c(options ...
6. base:::force(code)
7. pkgbuild:::rcmd_build_tools(options$cmd, c(options$path, options$ ...
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::r ...
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 ...
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, ...
x System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr:
E> * checking for file 'C:\Users\bha485\Desktop\LICHospitalR/DESCRIPTION' ... OK
E> * preparing 'LICHospitalR':
E> * checking DESCRIPTION meta-information ... OK
E> * checking whether 'INDEX' is up-to-date ... OK
E> * installing the package to build vignettes
E> -----------------------------------
E> * installing *binary* package 'LICHospitalR' ...
E> cp: unknown option -- )
E> Try '/usr/bin/cp --help' for more information.
E> ERROR: installing binary package failed
E> * removing 'C:/Users/bha485/AppData/Local/Temp/RtmpQX3Cq3/Rinst1e246e7f3ee6/LICHospitalR'
E> -----------------------------------
E> ERROR: package installation failed
Execution halted
Exited with status 1.
Session Info:
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0
>
I really do not know where to go from here, should I file this as an issue on the github rstudio/rstudio? Or is there another avenue I can take.
UPDATE
GitHub of Project

Related

How to build a package with RcppArmadillo?

I wish to build a package, but I write part of it using RcppArmadillo and now I am suffering the consequences. I am using roxygen2 and devtools to help me with DESCRIPTION and NAMESPACE. I am coding in R / Ubuntu. In the DESCRIPTION I include two lines to load the packages:
Depends: R (>= 3.4.4), MASS (>= 7.3-49), Rcpp (>= 1.0.5), RcppArmadillo (>= 0.9.900.2.0)
LinkingTo: Rcpp, RcppArmadillo
and in the folder /src I write a script name loss_function.cpp, inside it there is:
> // [[Rcpp::depends(RcppArmadillo)]]
>
> #include <RcppArmadillo.h>
>
> using namespace Rcpp;
>
> //' Check function.
> //'
> //' #param x vector
> //' #param tau percentile
> //' #return y new vector
> // [[Rcpp::export(rho_koenker)]]
> arma::vec rho_koenker(arma::vec x, double tau){
> int n = x.n_elem;
> arma::vec y(n);
> for(int i = 0; i < n; ++i){
> if(x(i)<0){
> y(i) = x(i)*(tau-1);
> } else {
> y(i) = x(i)*tau;
> }
> }
> return(y);
> }
>
> //' Quantile regression loss function
> //'
> //' #param beta parameter
> //' #param x matrix
> //' #param y vector
> //' #param tau percentile
> //' #param N total number of observations
> //' #param d beta's length
> //' #return eta numeric
> // [[Rcpp::export(loss_qr)]]
> double loss_qr(arma::vec beta, arma::mat x, arma::vec y, double tau, int N, int d){
> double eta = 0;
> arma::vec res(N);
> arma::vec rho(N);
> res = y - (x * beta);
> rho = rho_koenker(res,tau);
> eta = accu(rho);
> return(eta);
> }
When I check the package (build -> check package) there comes an error msg:
Error in .Call("_pqfe_loss_qr", PACKAGE = "pqfe", beta, x, y, tau, N, :
"_pqfe_loss_qr" not available for .Call() for package "pqfe"
Calls: qr ... optim_qr -> <Anonymous> -> <Anonymous> -> fn -> .Call
Execution halted
Warning message:
Can't find generic `sew` in package knitr to register S3 method.
This message is only shown to developers using devtools.
Do you need to update knitr to the latest version?
As alluded in the comment above, it is not clear where you error would lie here with RcppArmadillo. So I
invoked RcppArmadillo.package.skeleton() (via the helper command kitten.r from littler relying on pkgKitten but those are details)
added in src/loss_function.cpp based on what you had
added one missing #export tag to you doxygen/roxygen to also have the R documentation created
called Rcpp::compileAttributes() (via helper compAttr.r from `littler) to have the interal glue code generated / updated
called roxygenize() (via helper roxy.r from littler) to have help files created
called R CMD build (directly, or via helper build.r from littler)
ran R CMD check (directly, or via helper rcc.r from littler)
and it all works:
edd#rob:~/git/stackoverflow/73405262(master)$ R CMD build soDemo
* checking for file ‘soDemo/DESCRIPTION’ ... OK
* preparing ‘soDemo’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to process help pages
* saving partial Rd database
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘soDemo_1.0.tar.gz’
edd#rob:~/git/stackoverflow/73405262(master)$
and checks nicely too
edd#rob:~/git/stackoverflow/73405262(master)$ R CMD check soDemo_1.0.tar.gz
* using log directory ‘/home/edd/git/stackoverflow/73405262/soDemo.Rcheck’
* using R version 4.2.1 (2022-06-23)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘soDemo/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘soDemo’ version ‘1.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘soDemo’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compilation flags used ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘tinytest.R’
OK
* checking PDF version of manual ... OK
* DONE
Status: OK
edd#rob:~/git/stackoverflow/73405262(master)$
I put the tarball here if you want to take it from there.

How to use a user-defined data C structure into an R package

This minimal example compiles when I "source" the file:
/*
read_header.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <RcppCommon.h>
typedef struct {
int my_data;
} MY_HEADER_INFO;
namespace Rcpp {
template <> SEXP wrap(const MY_HEADER_INFO& x);
}
#include <Rcpp.h>
namespace Rcpp {
template <>
SEXP wrap(const MY_HEADER_INFO& x) {
std::vector<std::string> names;
std::vector<SEXP> elements(1);
// do something with the elements and names
names.push_back("my_data");
elements[0] = Rcpp::wrap( x.my_data );
};
}
//' #export
// [[Rcpp::export]]
MY_HEADER_INFO read_header() {
MY_HEADER_INFO *header;
header = (MY_HEADER_INFO*)malloc(sizeof(MY_HEADER_INFO));
memset(header, 0, sizeof(MY_HEADER_INFO));
return *header;
}
When I try to build it in RStudio into a package (CMD + SHIFT + B), I get the following, long, error message, that clearly lists the problem is my user-defined return structure, MY_HEADER_INFO:
DESCRIPTION
Package: myPackage
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Depends: R (>= 4.0.0)
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.0
Imports:
Rcpp
Suggests:
knitr,
rmarkdown,
testthat
VignetteBuilder: knitr
LinkingTo:
Rcpp
NAMESPACE
# Generated by roxygen2: do not edit by hand
export(read_header)
I receive the following error:
==> Rcpp::compileAttributes()
* Updated src/RcppExports.cpp
* Updated R/RcppExports.R
==> devtools::document(roclets = c('rd', 'collate', 'namespace'))
Updating myPackage documentation
Loading myPackage
Re-compiling myPackage
─ installing *source* package ‘myPackage’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
MY_HEADER_INFO read_header();
^
1 error generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘myPackage’
─ removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Error: System command 'R' failed, exit status: 1, stdout + stderr:
E> * installing *source* package ‘myPackage’ ...
E> ** using staged installation
E> ** libs
E> clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
E> RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
E> MY_HEADER_INFO read_header();
E> ^
E> 1 error generated.
E> make: *** [RcppExports.o] Error 1
E> ERROR: compilation failed for package ‘myPackage’
E> * removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Stack trace:
1. base:::suppressPackageStartupMessages({ ...
2. base:::withCallingHandlers(expr, packageStartupMessage = function(c) tryInv ...
3. devtools::document(roclets = c("rd", "collate", "namespace"))
4. withr::with_envvar(r_env_vars(), roxygen2::roxygenise(pkg$path, ...
5. base:::force(code)
6. roxygen2::roxygenise(pkg$path, roclets, load_code = load_code)
7. roxygen2:::load_code(base_path)
8. pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
9. pkgbuild::compile_dll(path, quiet = quiet)
10. withr::with_makevars(compiler_flags(TRUE), assignment = "+=", ...
11. withr:::with_envvar(c(R_MAKEVARS_USER = makevars_file), { ...
12. base:::force(code)
13. base:::force(code)
14. pkgbuild:::install_min(path, dest = install_dir, components = "libs", ...
15. pkgbuild:::rcmd_build_tools("INSTALL", c(path, paste("--library=", ...
16. pkgbuild:::with_build_tools(callr::rcmd_safe(..., env = env, ...
17. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, ...
18. callr:::run_r(options)
19. base:::with(options, with_envvar(env, do.call(processx::run, ...
20. base:::with.default(options, with_envvar(env, do.call(processx::run, ...
21. base:::eval(substitute(expr), data, enclos = parent.frame())
22. base:::eval(substitute(expr), data, enclos = parent.frame())
23. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmd ...
24. base:::force(code)
25. base:::do.call(processx::run, c(list(bin, args = real_cmdargs, ...
26. (function (command = NULL, args = character(), error_on_status = TRUE, ...
27. throw(new_process_error(res, call = sys.call(), echo = echo, ...
x System command 'R' failed, exit status: 1, stdout + stderr:
E> * installing *source* package ‘myPackage’ ...
E> ** using staged installation
E> ** libs
E> clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
E> RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
E> MY_HEADER_INFO read_header();
E> ^
E> 1 error generated.
E> make: *** [RcppExports.o] Error 1
E> ERROR: compilation failed for package ‘myPackage’
E> * removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Execution halted
Exited with status 1.
The following is written to Rcpp_exports:
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// read_header
MY_HEADER_INFO read_header();
RcppExport SEXP _myPackage_read_header() {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = Rcpp::wrap(read_header());
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_myPackage_read_header", (DL_FUNC) &_myPackage_read_header, 0},
{NULL, NULL, 0}
};
RcppExport void R_init_myPackage(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
If I try to modify this file, however, it all gets written over when I call CMD+SHIFT+B.
Other C programs I've written for this same package that return standard data types (e.g., "std::vector") compile without a problem, both when I "source" the code in the Console and when I build them into a package.
I have read through the Rcpp documentation and related vignettes (and even bought Dirk's book!), but I cannot find how to tell the package builder where the definition of MY_HEADER_INFO is located. How do I tell the package compiler where the definition of this file is located?
Thanks!
That look like another instance of a not-entirely-uncommon problem for which we do have a wonderfully simple answer that is somewho less known than it should be.
In short, for a package <pkg> (where <pkg> is an alias for your package name, with lower or undercase as you please. and obviously no < or >) please such struct (or in the C++ case class) or typedef or ... definitions into a file inst/include/<pkg>_types.h (replacing <pkg> with your package name).
If such a file exists, it is automagically included by RcppExports.cpp and you are good to go.
Details are in the Rcpp Attributes vignette, and a few related forms are allowed as well:
src/<pkg>_types.h
src/<pkg>_types.hpp
inst/include/<pkg>_types.h
inst/include/<pkg>_types.hpp
inst/include/<pkg>.h
but inst/include/<pkg>_types.h may be the most commonly used one. One example of using it via src/ is src/RSQLite_types.h. On the other hand, an example of using it in inst/include/ is inst/include/RcppQuantuccia_types.h and another, much larger one in inst/include/RcppGSL_types.h.

Compiling error while installing a package after updating R

I have recently updated my R to the latest version, 4, and I am getting an error while installing a certain package that I had before. So the error I get is as follow:
> devtools::install_github("ShirinG/exprAnalysis", build_vignettes=F, ref = "master")
√ checking for file 'C:\Users\a\AppData\Local\Temp\RtmpIj39So\remotes10447cb078e0\ShirinG-exprAnalysis-f615bcf/DESCRIPTION' ...
- preparing 'exprAnalysis': √ checking DESCRIPTION meta-information ... Warning in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
PCRE pattern compilation error
'unrecognized character follows \'
at 'inst\extdata\*' Error in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
invalid regular expression '^\inst\extdata\*' Execution halted Error: Failed to install 'exprAnalysis' from GitHub: System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr: E> * checking for file 'C:\Users\a\AppData\Local\Temp\RtmpIj39So\remotes10447cb078e0\ShirinG-exprAnalysis-f615bcf/DESCRIPTION' ... OK
E> * preparing 'exprAnalysis':
E> * checking DESCRIPTION meta-information ... OK
E> Warning in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
E> PCRE pattern compilation error E> 'unrecognized character follows \'
E> at 'inst\extdata\*' E> Error in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
E> invalid regular expression '^\inst\extdata\*' E> Execution halted
Does any one have any suggestion or solution? I am using rtools4 also.

R namespace problems with 'logging' package

I'm writing an R package that uses the logging package from CRAN. In my code, I initialize logging when my package is loaded:
#' #importFrom logging basicConfig
.onAttach <- function(libname, pkgname) {
logging::basicConfig()
}
#' #importFrom logging setLevel
#' #export
setLogLevel <- function(level) {
setLevel(level)
}
And in my DESCRIPTION file I declare the dependency:
Depends:
R (>= 3.0.2),
Rcpp (>= 0.11.2)
Imports:
FNN,
plyr,
geosphere,
logging
However, it looks like R CMD check (which I invoke via "Check Package" in RStudio) doesn't like something about the namespaces:
* checking whether the package can be loaded with stated dependencies ... WARNING
Loading required package: Rcpp
Error : .onAttach failed in attachNamespace() for ‘ABC’, details:
call: UseMethod("updateOptions")
error: no applicable method for ‘updateOptions’ applied to an object of class "Logger"
Error: package or namespace load failed for ‘ABC’
Execution halted
It looks like this package (or one of its dependent packages) has an
unstated dependence on a standard package. All dependencies must be
declared in DESCRIPTION.
See the information on DESCRIPTION files in the chapter ‘Creating R
packages’ of the ‘Writing R Extensions’ manual.
...
* checking for missing documentation entries ... ERROR
Error: package or namespace load failed for ‘ABC’
Call sequence:
2: stop(gettextf("package or namespace load failed for %s", sQuote(package)),
call. = FALSE, domain = NA)
1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE)
Execution halted
Exited with status 1.
The updateOptions() method it's complaining about is part of the logging::basicConfig() function I call in my initialization:
> logging::basicConfig
function (level = 20)
{
rootLogger <- getLogger()
updateOptions(rootLogger, level = namedLevel(level))
rootLogger$addHandler("basic.stdout", writeToConsole, level = namedLevel(level))
invisible()
}
<environment: namespace:logging>
d> logging::updateOptions
function (container, ...)
UseMethod("updateOptions")
<environment: namespace:logging>
Thanks for any insight anyone can provide.

igraph 0.7.1 failing to install on R 3.1.0

I am trying to install igraph 0.7.1 on a macbook pro with mavericks. I have installed R 3.1.0 using macports and keep getting the following warnings / errors when installing igraph using install.packages("igraph"):
/usr/bin/clang -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include -DUSING_R -I. -Ics -Iglpk -Iglpk/amd -Iglpk/colamd -Iplfit -pipe -Os -flax-vector-conversions -arch x86_64 -I/opt/local/include/libxml2 -pipe -Os -flax-vector-conversions -arch x86_64 -I/opt/local/include/libxml2 -DNDEBUG -DPACKAGE_VERSION=\"#VERSION#\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fPIC -pipe -Os -flax-vector-conversions -arch x86_64 -c colamd.c -o colamd.o
colamd.c:1979:27: warning: implicitly declaring library function 'sqrt' with type 'double (double)'
dense_row_count = DENSE_DEGREE (knobs [COLAMD_DENSE_ROW], n_col) ;
^
colamd.c:792:33: note: expanded from macro 'DENSE_DEGREE'
((Int) MAX (16.0, (alpha) * sqrt ((double) (n))))
^
colamd.c:794:27: note: expanded from macro 'MAX'
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
^
colamd.c:1979:27: note: please include the header <math.h> or explicitly provide a declaration for 'sqrt'
colamd.c:792:33: note: expanded from macro 'DENSE_DEGREE'
((Int) MAX (16.0, (alpha) * sqrt ((double) (n))))
^
colamd.c:794:27: note: expanded from macro 'MAX'
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
^
1 warning generated.
The install then completes with the following error:
Error : .onLoad failed in loadNamespace() for 'igraph', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/igraph/libs/igraph.so':
dlopen(/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/igraph/libs/igraph.so, 10): Symbol not found: _colamd_printf
Referenced from: /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/igraph/libs/igraph.so
Expected in: flat namespace
in /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/igraph/libs/igraph.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/igraph’
I have Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) installed on my machine. I would be very grateful for some help.
Thanks in advance.

Resources