diff --git a/R/.goldi.R.swp b/R/.goldi.R.swp new file mode 100644 index 0000000..32d020c Binary files /dev/null and b/R/.goldi.R.swp differ diff --git a/R/RcppExports.R b/R/RcppExports.R index 8ceb11b..99f4ef5 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -1,4 +1,4 @@ -# This file was generated by Rcpp::compileAttributes +# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' @title Match terms diff --git a/R/goldi.R b/R/goldi.R index 02e3427..d96f5ad 100644 --- a/R/goldi.R +++ b/R/goldi.R @@ -5,7 +5,7 @@ #' #' @keywords Text Mining, Gene Ontology, Databases #' -#' @author Christopher B. Cole +#' @author Christopher B. Cole #' #' @references See ArXiv prepubliation. #' @@ -151,7 +151,7 @@ Note that any interactively created lists may be saved and inputed. lims <- as.list(lims) - flog.warn("Trying to coerce limits to list format.") + flog.debug("Trying to coerce limits to list format.") flog.info("Printing your lims to log file. You can use this to recreate your list later:") flog.info("%s", capture.output(dput(lims))) @@ -460,12 +460,12 @@ Note that any interactively created lists may be saved and inputed. # Clean this up after, it's really messy right now - out %>% as.data.frame %>% data.matrix -> input_pdf_tdm + suppressWarnings( out %>% as.data.frame %>% data.matrix ) -> input_pdf_tdm colnames(input_pdf_tdm) <- NULL row.names(input_pdf_tdm) <- NULL input_term_tdm <- as.matrix(TDM.go.df) - input_term_tdm %<>% as.data.frame %>% data.matrix + input_term_tdm %<>% as.data.frame %>% data.matrix %>% suppressWarnings() colnames(input_term_tdm) <- NULL row.names(input_term_tdm) <- NULL @@ -511,6 +511,8 @@ Note that any interactively created lists may be saved and inputed. flog.info("Everything was successful. Ending logging now. Have a nice day.") + colnames(terms) <- c("Identified Terms", "Context") + if(!object){ flog.info("Returning as List, either for internal use or for testing.") diff --git a/cran-comments.md b/cran-comments.md index 0853118..58c1f57 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,7 @@ ## Test environments -* Local OS X Install, R 3.3.1 -* Linux Ubuntu 12.04 LTS Server Edition 64 bit (through Travis-CI), R 3.3.1 -* Windows through Appveyor, R R.3.3.1 +* Local OS X Install, R 3.3.1 + R Devel +* Linux Ubuntu 12.04 LTS Server Edition 64 bit (through Travis-CI), R 3.3.1 + R Devel +* Windows through Appveyor, R 3.3.1 + R Devel ## R CMD check results There were no ERRORs or WARNINGs. diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 4b8e9d6..5d9eaf2 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -1,4 +1,4 @@ -// This file was generated by Rcpp::compileAttributes +// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include @@ -10,8 +10,8 @@ using namespace Rcpp; Rcpp::CharacterMatrix match(arma::uvec term_vector, arma::mat pdf_tdm, arma::mat term_tdm, arma::vec thresholds, arma::uvec pdf_index, std::vector terms, std::vector sentences); RcppExport SEXP goldi_match(SEXP term_vectorSEXP, SEXP pdf_tdmSEXP, SEXP term_tdmSEXP, SEXP thresholdsSEXP, SEXP pdf_indexSEXP, SEXP termsSEXP, SEXP sentencesSEXP) { BEGIN_RCPP - Rcpp::RObject __result; - Rcpp::RNGScope __rngScope; + Rcpp::RObject rcpp_result_gen; + Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< arma::uvec >::type term_vector(term_vectorSEXP); Rcpp::traits::input_parameter< arma::mat >::type pdf_tdm(pdf_tdmSEXP); Rcpp::traits::input_parameter< arma::mat >::type term_tdm(term_tdmSEXP); @@ -19,7 +19,7 @@ BEGIN_RCPP Rcpp::traits::input_parameter< arma::uvec >::type pdf_index(pdf_indexSEXP); Rcpp::traits::input_parameter< std::vector >::type terms(termsSEXP); Rcpp::traits::input_parameter< std::vector >::type sentences(sentencesSEXP); - __result = Rcpp::wrap(match(term_vector, pdf_tdm, term_tdm, thresholds, pdf_index, terms, sentences)); - return __result; + rcpp_result_gen = Rcpp::wrap(match(term_vector, pdf_tdm, term_tdm, thresholds, pdf_index, terms, sentences)); + return rcpp_result_gen; END_RCPP } diff --git a/tests/testthat/test-goldi.R b/tests/testthat/test-goldi.R index 953b4b5..f924dac 100644 --- a/tests/testthat/test-goldi.R +++ b/tests/testthat/test-goldi.R @@ -12,9 +12,11 @@ log = "/dev/null" ouput = "/dev/null" os <- .Platform$OS.type -out <- structure(c("ribosomal_chaperone_activity", "Ribosomal chaperone activity"), .Dim = 1:2) - +#out <- structure(c("ribosomal_chaperone_activity", "Ribosomal chaperone activity"), .Dim = 1:2) +out <- structure(c("ribosomal_chaperone_activity", "Ribosomal chaperone activity" + ), .Dim = 1:2, .Dimnames = list(NULL, c("Identified Terms", "Context" + ))) test_that("testing main function", { if(os != "unix") skip("Tests are not currently performed on windows.")