[英]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))
結果如下:
如果要選擇X軸的列,只需更改row.names
分配。 (它也可以來自knime.flow.in
,以防列名來自流變量,但據我所知,對您而言並非如此。)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.