Hi everyone, I just started to use R for flow cytometry analysis and its hard for me to get behind. I never asked any question online and hope that I managed to post here accordingly, but I have a problem that I can't fix.
I'm using read.flowSet to read my .fcs files from an experiment. After gating and transformation of the flowset, I try to plot my flowset as stacked density plots as described here: https://www.bioconductor.org/packages/devel/bioc/vignettes/ggcyto/inst/doc/ggcyto.flowSet.html
When I try to plot however with
ggcyto(T_Singlets_MyFlowSet, aes(x="BV421-A")) + geom_density_ridges(aes(y=name))
I get an error:
Error in max(data$y) - min(data$y) :
non-numeric argument to binary operator
Could this error occur because my "name" vector in the phenodata dataframe is off the class " 'AsIs' chr" and not "chr" ?? This is at least the most obvious difference for me between teh flowset from I get from reading my experiment files vs. the flowset I get from https://www.bioconductor.org/packages/devel/bioc/vignettes/ggcyto/inst/doc/ggcyto.flowSet.html
I would be super happy if someone could help me. I really don't know a lot about this kind of stuff
Thanks for the reply! I get the same error when using backticks instead of quotes.
same error with previous code?
This works!
also works?
Nope. This again results in the error
Test your hypothesis. Change the type of the name column.
If the display still fails, please run the following code and return the result.
It worked!!! I can also use
now to plot as I intented. I guess then, the problem was that "name" wasn't classified as character, but I didn't know how to fix it. Thank you so so much!! this was giving me so much headaches
Great! If the error occurs again, it would be useful to understand where it comes from.
Best.