Basic but annoying situation
panchoco opened this issue · 3 comments
Dear all,
The package looks really great. When I copy the exercise the plot looks fantastic. However, when I use my dataset which look like:
'data.frame': 26 obs. of 4 variables:
$ organ : chr "adipose_tissue" "adrenal_gland" "brain" "heart" ...
$ colour: chr "red" "red" "red" "red" ...
$ Gene : chr "Stau1" "Stau1" "Stau1" "Stau1" ...
$ value : num 57 117 171 36 35 45 67 121 37 36 ...
And then I try to do any plot, RStudio return this:
Error in stats::complete.cases(dat) :
no input has determined the number of cases
Do you have an idea of what its happening? It's really frustrating, because as I said, when I do the dummy data.frame that you posted works fantastic.
Thank you in advance,
Best
Hi,
The error seem to suggest you have missing values in your data frame.
I could replicate the issue when i set one of the organ values to NA
`
df_test[df_test$organ == "testis",]$organ <- NA
NA reproductive #d95f02 NA prostate reproductive #d95f02 14.1272101
gganatogram(df_test)
Error in stats::complete.cases(dat) :
no input has determined the number of cases`
Hi Jasper,
Sadly is not that. I always add na.omit just to be sure. =(
At the end, I had "ovary" and "testis" in the same data frame. That was the problem.
Thanks