New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing quotes in requireNamespace call #5

Merged
merged 1 commit into from Sep 23, 2015

Conversation

Projects
None yet
2 participants
@agrueneberg
Contributor

agrueneberg commented Sep 23, 2015

The following happens if the Rcpp argument is TRUE in cfunction:

Loading required namespace: TRUE
Failed with error:  ‘there is no package called ‘TRUE’’
@eddelbuettel

This comment has been minimized.

Owner

eddelbuettel commented Sep 23, 2015

Ooops. Good catch. Thanks. And it probbaly want , quietly=TRUE as well.

Package probably needs a refresher anyway. [ But everybody should use Rcpp Attributes these days... ]

eddelbuettel added a commit that referenced this pull request Sep 23, 2015

Merge pull request #5 from agrueneberg/patch-1
Add missing quotes in requireNamespace call

@eddelbuettel eddelbuettel merged commit 56d0bf3 into eddelbuettel:master Sep 23, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@agrueneberg

This comment has been minimized.

Contributor

agrueneberg commented Sep 23, 2015

Thanks! I only used the package because I needed to link Boost's iostreams for an inline benchmark and couldn't figure out how to do it with cppFunction and the likes.

@agrueneberg agrueneberg deleted the agrueneberg:patch-1 branch Sep 23, 2015

@eddelbuettel

This comment has been minimized.

Owner

eddelbuettel commented Sep 23, 2015

Does iostream require a library for linking? Some of these can be used with and without linking, eg Boost Date_time can be used without parsers and formatters, in which case headers-only is good enough. And then you can get by with a plugin .... but that is maybe a discussion to be had on rcpp-devel.

@agrueneberg

This comment has been minimized.

Contributor

agrueneberg commented Sep 23, 2015

Yes, it looks like IOStreams is not header-only. I need it for parsing gzipped files without giving up on the convenience of using std::getline :P After some more tinkering I actually got it working with cppFunction: I forgot to set rebuild = TRUE after setting Sys.setenv("PKG_LIBS"="-lboost_iostreams"). Thanks for the pointer to rcpp-devel, will make sure to stop by!

@eddelbuettel

This comment has been minimized.

Owner

eddelbuettel commented Sep 23, 2015

Nice. You may be able to cheat as we get the compression library from R. See what I do in RcppCNpy to open compressed files. You could then go over the file pointer with std::getline, no?

@agrueneberg

This comment has been minimized.

Contributor

agrueneberg commented Sep 27, 2015

Thanks, I didn't know that zlib is bundled with R. I was looking at RcppCNpy and was wondering how you manage that dependency, so now I have my answer. I found a small library called Gzstream that provides an ifstream that can be used in std::getline, but then again, I also need regular expressions, so maybe Boost isn't so bad. Unless I switch to C++11, I guess. Anyway, I really appreciate the help! Rcpp has been a pleasure so far!

@eddelbuettel

This comment has been minimized.

Owner

eddelbuettel commented Sep 27, 2015

Yes, for some smaller packages where I didn't care that I might loose some users on really old systems I just turned C++11 on -- it even kinda sorta somewhat works on Windows with g++ 4.6.3, and gets rid of some issues (ie the stupid long long warnings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment