簡體   English   中英

如何從列過濾器(R / Knime)中選擇R圖的坐標X和Y?

[英]How I can select the coordinate X and Y of R plot from Column Filter (R/Knime)?

所以,我有這個工作流程:

在此處輸入圖片說明 在此處輸入圖片說明

我已經使用“列過濾器”從文件中選擇了2列(天和溫度)。 然后我連接到我配置的“ R plot”,但是我得到了:

在此處輸入圖片說明

Day列未選擇為X軸,而是(Row ID),而Y軸正常。

這是我在R圖中的代碼:

# Library
library(qcc)
library(readr)
library(Rserve)
Rserve(args = "--vanilla")

# Data column filter from CSV file imported
Test <- kIn

#Background color
qcc.options(bg.margin = "white", bg.figure = "gray95")

#R graph ranges of a continuous process variable
qcc(data = Test,
    type = "R",
    sizes = 5,
    title = "Sample R Chart Title",
    digits = 2,
    plot = TRUE)

這是我的嘗試(使用KNIME的R,而不是社區貢獻):

#install.packages("qcc")
library(qcc)

data <- knime.in
#Change the names to use Day instead of row keys
row.names(data) <- data$Day

#Using the updated data
plot(qcc(data = data,
    type = "R",
    sizes = 5,
    title = "Sample R Chart Title",
    digits = 2,
    plot = TRUE))

結果如下:

使用R視圖繪圖

如果要選擇X軸的列,只需更改row.names分配。 (它也可以來自knime.flow.in ,以防列名來自流變量,但據我所知,對您而言並非如此。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM