我已經包含用於分類兩個數值變量(X,Y) 25個獨特的變量我要繪製的每個單因素散點圖週期爲展示根據因素
for (factor in Coordinates$matrixID) {
dev.new()
plot(grid, type = "n")
vectorField(Coordinates$Angle,Coordinates&Length,Coordinates$x,Coordinates$y,scale=0.15, headspan=0, vecspec="deg")
}
一個因子矢量的數目多個圖形
該功能可生成63個相同的整體數據圖。我想25個不同的圖形,每一個因素
能否請你幫我, 感謝
編輯:實例給出
library(VecStatGraphs2D)
Data <- data.frame(
x = sample(1:100),
y = sample(1:100),
angle = sample(1:100),
lenght = sample(1:100),
matrixID = sample(letters[1:25], 20, replace = TRUE))
for (factor in matrixID) {
dev.new()
plot(grid, type = "n") V
VectorField(Data$angle,Data$lenght,Data$x,Data$y,scale=0.15,headspan=0, vecspec="deg")
}
你可以提供(你的數據的一個樣本)作爲[一個可重複的例子]的一部分(http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) ?另外,「包含用於分類兩個數字變量的25個唯一變量的因子向量」是什麼意思? – Thomas