lanagarmire / lilikoi2

GNU General Public License v3.0
2 stars 4 forks source link

Error in example #2

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi

I was going through the example and there seems to be an error:

selected_Pathways_Weka= lilikoi.featuresSelection(PDSmatrix,threshold= 0.54,method="gain") Error in training_diagnosis$Label - 1 : non-numeric argument to binary operator

Please advise. Thank you.

lanagarmire commented 3 years ago

Hi, Are you using the provided example datasets? We just re-ran the example code, using the installation from GitHub, and didn't encounter this error.

You can add Metadata$Label <- as.factor(Metadata$Label) right after the lilikoi.Loaddata step. Make sure class(Metadata$Label) returns `[1] "factor"``

monahton commented 2 years ago

Hi,

I ran into the same error using the example dataset and following the functions in the vignette: https://cran.r-project.org/web/packages/lilikoi/vignettes/Vignette.html

As suggested, I add Metadata$Label <- as.factor(Metadata$Label) right after the lilikoi.Loaddata step and made sure class(Metadata$Label) returns `[1] "factor"``

I am using R version 4.2.1 (2022-06-23) on a macOS Monterey 12.5.1

Thanks for your help!

yhdu36 commented 2 years ago

monahton

Hi monahton, Thank you for reporting this error. However, we were unable to reproduce your error scenario with R 4.2.1. The non-numeric argument to binary operatorerror was fixed after running Metadata$Label <- as.factor(Metadata$Label) It would be helpful if you could provide more details from sessionInfo() and the code that you are running if the error persists. You can email us the screenshots at lana.garmire.group@gmail.com