我遇到了此警告消息,该消息将停止执行。
Saving 8.04 x 5.67 in image
Warning messages:
1: In dev(file = filename, width = dim[1], height = dim[2], ...) :
unable to load shared object '/usr/local/Cellar/r/3.5.0_1/lib/R/library/grDevices/libs//cairo.so':
dlopen(/usr/local/Cellar/r/3.5.0_1/lib/R/library/grDevices/libs//cairo.so, 6): image not found
2: In dev(file = filename, width = dim[1], height = dim[2], ...) :
failed to load cairo DLL
Run Code Online (Sandbox Code Playgroud)
这是为我生成警告的代码
library(tidyverse)
library(cowplot)
d <- sample_n(diamonds, 50)
g <- ggplot(d, aes(carat, price)) + geom_point()
gg <- list(g,g,g)
plot_grid(plotlist = gg, nrow=1) %>%
cowplot::ggsave(filename = paste0("~/Desktop/", paste0("testing", ".svg")), device = …Run Code Online (Sandbox Code Playgroud) 我是新手R程序员.我有以下一系列要点.
df <- data.frame(x = c(1 , 2, 3, 4), y = c(6 , 3, 7, 5))
df <- df %>% mutate(k = 1)
df <- df %>% full_join(df, by = 'k')
df <- subset(df, select = c('x.x', 'y.x', 'x.y', 'y.y'))
df
Run Code Online (Sandbox Code Playgroud)
有没有办法选择"独特"点?(点的顺序无关紧要)
编辑:
x.x y.x x.y y.y
1 6 2 3
2 3 3 7
.
.
.
Run Code Online (Sandbox Code Playgroud)
(我改变了2到7来澄清问题)