xyplot of flowViz
0
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

Joachim,

When you construct a formula like channel1 ~ channel2, 'channel1' and 'channel2' are simply treated as symbols and will be passed to xyplot as they are without evaluating. One solution is to construct a string and convert it to a formula.

f_str <- paste0(channel1, "~", channel2)

f <- as.formula(f_str)

xyplot(f, frame)

See another related post regarding to the formula A: xyplot can't find channel (flowViz)

Mike



Hi Mike,

I want to use the xyplot method of the flowViz package. I'm writing a method in which the user determines the channels he want to use for the xyplot like the followgin:

plot<-function(channel1="FS.Log",channel2="FL.4.Log"){
frame<-read.FCS(...)
xyplot(channel1 ~ channel2, frame)
}

But this does not work because channel1 within the xyplot method does not match channel1 in the function definition. I also tried to do it without quotes (channel1=FS.Log) but this does not work, too. Do you know what I can do to get a match in this way?

Best,
Joachim

--
M. Sc. Joachim Schumann 

 

flowviz flow cytometry • 1.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 508 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6