我不知道为什么,但看起来我的代码似乎在RStudio中绘制了很多图。我是R和RStudio的新手,所以我不知道绘制了多少,但我认为有重复的、以前的绘图和我想要的绘图,所有这些都在RStudio的Plots选项卡中。此外,当我尝试滚动查看创建了哪些地块时,会出现弹出窗口
我希望每个州都有5个图,但似乎我得到的更多。
library(ggplot2)
try(data('midwest', package='ggplot2'))
for (s in unique(midwest$state)) {
state_data = subset(midwest
我一直在学习ggplot2,并希望在我所有的R图中使用它。但是,我还没有找到一种方法来绘制类似于传统轮廓图的轮廓图,就像使用lattice:filled.contour()可以获得的那样。例如:
#define data
x<-seq(1,11,1)
y<-seq(1,11,1)
xyz.func<-function(x,y) {-10.4+6.53*x+6.53*y-0.167*x^2-0.167*y^2+0.0500*x*y}
#contour plot using lattice graphics and R Color Brewer
library(lattice)
下面是我在R中接收到的消息的代码:
> library(sjPlot)
Attaching package: ‘sjPlot’
The following objects are masked _by_ ‘.GlobalEnv’:
adjust_plot_range, sjp.int
Warning message:
package ‘sjPlot’ was built under R version 3.1.3
图书馆(Sjmisc)
Warning message:
package ‘sjmisc’ was bui