cran

checking CRAN incoming feasibility … NOTE Maintainer

丶灬走出姿态 提交于 2019-12-03 09:19:29
When I run R CMD check --as-cran on my package, the one note I still get is: checking CRAN incoming feasibility ... NOTE Maintainer:[my name] <my email> I can't seem to find a good explanation of this note, although I haven't read anything that tells my I should be concerned about it. As anyone else run into this? Is there anything I can do that will clear the note? According to CRAN Maintainer Uwe Ligges, This is just a note that reminds CRAN maintainers to check that the submission comes actually from his maintainer and not anybody else. Thus, it is safe to ignore such a message. These

Rcpp::compileAttributes() Error

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to compile a small package that I've made. This package uses Rcpp and RcppArmadillo. Everything was working well until I updated my mac to Sierra (version 10.12.5). I have now the following error message when building the package from Rstudio (version 1.0.143): Error in Rcpp::compileAttributes() : Evaluation error: no native symbols were extracted. Calls: source ... withVisible -> eval -> eval -> <Anonymous> -> .Call Execution halted Any idea what this is and how it can be fixed? Thank you very much! 回答1: I have the same error

Skip tests on CRAN, but run locally

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 08:50:20
It there an easy way to skip the execution of some tests in a package if the package is tested by CRAN? The background is, I like to have a lot of tests and in sum they are time consuming (not good for CRAN). I know there is testthat::skip_on_cran() but I do not want to use package testthat to avoid another dependency. I am looking for an el-cheapo way to mimic testthat::skip_on_cran . Ideally, I would like to have a testfile in directory pkg/tests that calls the tests (testfiles) and distuingishes if we are on cran or not: if (!on_cran) { ## these tests are run only locally/when not on CRAN #

How can I speed up spatial operations in `dplyr::mutate()`?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a spatial problem using the sf package in conjunction with dplyr and purrr . I would prefer to perform spatial operations inside a mutate call, like so: simple_feature %>% mutate(geometry_area = map_dbl(geometry, ~ as.double(st_area(.x)))) I like that this approach allows me to run a series of spatial operations using %>% and mutate . I dislike that this approach seems to significantly increase the run-time of the sf functions (sometimes prohibitively) and I would appreciate hearing suggestions about how to overcome this

How to install and manage many versions of R packages

那年仲夏 提交于 2019-12-03 04:56:22
问题 I am developing a framework for reproducible computing with R. One problem that I am struggling with is that some R code might run perfectly in version X.Y-Z of a package, but then why you try to reproduce it 3 years later, the packages have updated, some functions are changed, and the code doesn't run anymore. This problem affects also for example Sweave documents that use packages. The only way to confidently reproduce the results is by installing the R version and version of the packages

R 2.14 - detect packages without namespace

微笑、不失礼 提交于 2019-12-03 04:51:36
According to the R News for v2.14: All packages must have a namespace, and one is created on installation if not supplied in the sources. This means that any package without a namespace must be re-installed under this version of R (but data-only packages without R code can still be used). How do I programatically detect which packages installed under 2.13.x don't have a namespace so I know what needs to be updated? The function packageHasNamespace holds the key. Use it together with installed.packages : The following code loops through all of the library locations in .libPaths : pkgNS <- NULL

Detecting geographic clusters

断了今生、忘了曾经 提交于 2019-12-03 04:19:38
问题 I have a R data.frame containing longitude, latitude which spans over the entire USA map. When X number of entries are all within a small geographic region of say a few degrees longitude & a few degrees latitude, I want to be able to detect this and then have my program then return the coordinates for the geographic bounding box. Is there a Python or R CRAN package that already does this? If not, how would I go about ascertaining this information? 回答1: I was able to combine Joran's answer

R CMD check options for “more rigorous testing” - 2.15.0

↘锁芯ラ 提交于 2019-12-03 04:11:22
According to the release notes for 2.15: There are new options for more rigorous testing by R CMD check selected by environment variables – see the ‘Writing R Extensions’ manual. Is "more rigorous" relative to the default set of checks? I can't find the supporting text in the manual. I'm sure I'm just missing it What options do I specify to perform the MOST rigorous testing? Try R CMD check --as-cran foo_1.2-3.tar.gz The new --as-cran option gathers a few of these together; this was discussed on r-devel. Also, a few weeks before R 2.15.0 came out, I added this to ~/.R/check.Renviron . These

How to select a CRAN mirror in R

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to install a package through the R prompt by doing the following: install.packages('RMySQL') But the output is as follows: --- Please select a CRAN mirror for use in this session --- And nothing else! I can't find a solution to this very basic problem. What am I supposed to type in order to select a CRAN mirror? EDIT: OS: Mac-OS X 10.6.8 R Version: 2.15.0 回答1: You should either get a window with a list of repositories or a text menu with some options. But if that is not appearing, you can always specify the mirror from where to

How do I center a JDialog on screen?

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How do I go about positioning a JDialog at the center of the screen? 回答1: In Java 1.4+ you can do: final JDialog d = new JDialog (); d . setSize ( 200 , 200 ); d . setLocationRelativeTo ( null ); d . setVisible ( true ); Or perhaps (pre 1.4): final JDialog d = new JDialog (); d . setSize ( 200 , 200 ); final Toolkit toolkit = Toolkit . getDefaultToolkit (); final Dimension screenSize = toolkit . getScreenSize (); final int x = ( screenSize . width - d . getWidth ()) / 2 ; final int y = ( screenSize . height - d . getHeight ()) / 2