小编akh*_*h22的帖子

R: 无法更新包 clang 找不到头文件

我有几个 R 包未能从源代码更新/遵守。以下是错误消息的片段;

clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include" -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -g -O2 -c RcppExports.cpp -o RcppExports.o
    In file included from RcppExports.cpp:4:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadillo.h:31:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadilloForward.h:26:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/RcppCommon.h:29:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/r/headers.h:59:
    In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /usr/local/Cellar/llvm/7.0.1/include/c++/v1/cmath:305:
    /usr/local/Cellar/llvm/7.0.1/include/c++/v1/math.h:301:15: **fatal error: 'math.h' file not found**
Run Code Online (Sandbox Code Playgroud)

另一个;

> ** libs clang -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Matrix/include"
> -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -g -O2  -c irlb.c -o irlb.o …
Run Code Online (Sandbox Code Playgroud)

macos r llvm-clang

4
推荐指数
1
解决办法
1180
查看次数

通过ggplot2抑制小提琴图中的散乱抖动点

以下用于在ggplot2中生成小提琴图:

ggplot(violin,aes(x=variable,y=log(value+0.5),color=Group)) + 
  geom_violin(scale="width") + 
  geom_jitter(aes(group=Group), position=position_jitterdodge()) + 
  stat_summary(fun.y="mean",geom="crossbar", mapping=aes(ymin=..y.., ymax=..y..), 
     width=1, position=position_dodge(),show.legend = FALSE) + 
  theme(axis.text.x = element_text(angle = 45, margin=margin(0.5, unit="cm")))
Run Code Online (Sandbox Code Playgroud)

得到的情节看起来如下;

在此输入图像描述

正如你所看到的,有些点在小提琴形状的边界外抖动,我需要把这些点放在小提琴里面.我玩过不同程度的抖动,但都取得了成功.我很欣赏任何能够实现这一目标的指示.

r ggplot2 violin-plot

3
推荐指数
3
解决办法
1265
查看次数

标签 统计

r ×2

ggplot2 ×1

llvm-clang ×1

macos ×1

violin-plot ×1