cran

installing ggplot2 package on ubuntu

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm on ubuntu precise pangolin running inside a VM, using R 3.1 and Rstudio 0.98.507 and I'm unable to install ggplot2 Here is the output : install . packages ( 'ggplot2' ) Installing package into ‘/ home / uwhpsc / R / i686 - pc - linux - gnu - library / 3.1 ’ ( as ‘ lib ’ is unspecified ) also installing the dependencies ‘ colorspace ’, ‘ Rcpp ’, ‘ stringr ’, ‘ RColorBrewer ’, ‘ dichromat ’, ‘ munsell ’, ‘ labeling ’, ‘ plyr ’, ‘ digest ’, ‘ gtable ’, ‘ reshape2 ’, ‘ scales ’, ‘ proto ’ trying URL 'http://cran.rstudio.com/src

installing ggplot2 package on ubuntu

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm on ubuntu precise pangolin running inside a VM, using R 3.1 and Rstudio 0.98.507 and I'm unable to install ggplot2 Here is the output : install.packages('ggplot2') Installing package into ‘/home/uwhpsc/R/i686-pc-linux-gnu-library/3.1’ (as ‘lib’ is unspecified) also installing the dependencies ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’ trying URL 'http://cran.rstudio.com/src/contrib/colorspace_1.2-4.tar.gz' Content type 'application/x-gzip'

Detecting geographic clusters

给你一囗甜甜゛ 提交于 2019-12-02 18:39:54
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? I was able to combine Joran's answer along with Dan H's comment. This is an example ouput: The python code emits functions for R: map() and rect().

Error installing R package Rmpfr - Error in rematchDefinition

心已入冬 提交于 2019-12-02 08:16:45
问题 I'm running RStudio 1.1.419 on linux mint, and trying to install the CRAN package Rmpfr for arbitrary precision number support. As per other questions I've installed: sudo apt-get install libmpfr-dev Then I've restarted RStudio, and tried installing the Rmpfr package again. The installation fails with the following error which I don't see on stack overflow or google. ** preparing package for lazy loading Creating a generic function for ‘factorial’ from package ‘base’ in package ‘Rmpfr’

Deploying a Shiny app using a self-written package

别来无恙 提交于 2019-12-02 00:56:53
问题 I have a working shiny app which uses library(coral), where coral is a package I wrote myself, installed in the directory of the shiny app. When I attempt to deploy my app onto shinyapps.io, I receive the following message: Error: Unable to retrieve package records for the following packages: - "coral" Execution halted From what I can gather online, the issue is probably that coral is not on CRAN, so shinyapps.io cannot get the records for that package from there. Is that a correct

Using install.packages with custom temp dir

僤鯓⒐⒋嵵緔 提交于 2019-12-02 00:12:11
I would like to install a package with a security profile that does not have access to /tmp , but has its own temporary directory, for example /tmp/jeroen . However even though I try to pass the TMPDIR environment variable, it still fails because it tries to use /tmp . Below a toy example using RAppArmor and unixtools (see here for the test profile) > library(RAppArmor) > library(unixtools) > dir.create("/tmp/jeroen") > set.tempdir("/tmp/jeroen") > setwd(tempdir()); > aa_change_profile("r-test") Switching profiles... > print(tempdir()); [1] "/tmp/jeroen" > install.packages("plyr", lib="/tmp

Using install.packages with custom temp dir

时光怂恿深爱的人放手 提交于 2019-12-01 22:11:31
问题 I would like to install a package with a security profile that does not have access to /tmp , but has its own temporary directory, for example /tmp/jeroen . However even though I try to pass the TMPDIR environment variable, it still fails because it tries to use /tmp . Below a toy example using RAppArmor and unixtools (see here for the test profile) > library(RAppArmor) > library(unixtools) > dir.create("/tmp/jeroen") > set.tempdir("/tmp/jeroen") > setwd(tempdir()); > aa_change_profile("r

How to distinguish package namespace environment from other environment objects

南笙酒味 提交于 2019-12-01 21:45:56
Is there any way to programmatically distinguish between package environments and non-package environment objects? For example, the objects x and y below are both environments, with the same class and attributes. x <- as.environment(cars) y <- getNamespace("graphics") However judging from the print method there is a difference: > print(x) <environment: 0x1d38118> > print(y) <environment: namespace:graphics> Now suppose I have an arbitrary object, how can I determine which of the two it is (without looking at the output of print )? I would like to know this to determine how to store the object

Redirect system2 stdout to a file on windows

两盒软妹~` 提交于 2019-12-01 20:51:22
According to the manual , the stdout argument of the system2 function can redirect output to a file. This seems to work on unix, however I can't get it to work on windows. The toy example below, no out.txt or err.txt files are created. I tried sending it to an existing file, or expand the full file path, but with no success: setwd(tempdir()) system2("whoami", stdout="out.txt", stderr="err.txt") file.exists("out.txt") Am I doing something wrong or is this a limitation in system2 ? I'm quite convinced now this is a bug in RGui.exe in windows. I filed a bug report here: https://bugs.r-project.org

Include non-CRAN package in CRAN package

心不动则不痛 提交于 2019-12-01 15:18:47
The question is pretty simple. First: Is it possible to include a non-CRAN (or bioconductor, or omega hat) package in a CRAN package and actually use tools from that package in examples. If yes how does one set up the DESCRIPTION file etc. to make it legit and pass CRAN checks? Specifically I'm asking about openNLPmodels.en that used to be a CRAN package. It's pretty useful and want to include functionality from it. I could do a work around and not actual use openNLPmodels.en in the examples or create unit tests for it, and have it install when a function gets use (similar to how the gender