Question: xyplot of flowViz
0
gravatar for Jiang, Mike
3.7 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

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 • 461 views
ADD COMMENTlink written 3.7 years ago by Jiang, Mike1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 200 users visited in the last hour