I'm sorry to ask you so many rudimentary questions.
Thank you very much for your help with the following questions.
How to Output Mann Whitney Test (or t-test) Calculations in R Language
Could you please let me know how to handle the following data?
The output of a certain data from the original measuring instrument is an excel file similar to the one above. Until now, I have used excel to delete the blanks and fill them up.
Running such data in
wilcox.exact resulted in an error (all NA) because there were no numbers in the A2 column.So I deleted
Data<-Data[,is.na(Data[1,])==FALSE], but I thought it would be troublesome if the column shifted, so I tried
Data[,is.na(Data[1,])]<-0 to zero all NA's in the first column.(The diagram shows that there is no data in this column in the first place, so
wilcox.exact should work anyway.)
However, I was wondering if I could simplify the processing in excel.
I am wondering if I can proceed with the following processing as the above data is.
·If the value of the column is NA only, set NA to 0.
·In other cases, delete NA and fill it up.
If all NAs are set to zero, I think it will affect the results of the calculation, but I would appreciate it if you could tell me how to set NA to zero.
Thank you for your guidance.r
First of all, non-rectangular data cannot be data.frame, so if you want to fill in NA,
It can be one of the following:The latter is in mind:
Perhaps we can process the requested data with this.You can also run
wilcox.exact with this vertical data:
However, the exactRankTests package will be developed soon, so I was told to use the coin package.The version using the wilcox_test function of the coin package is also shown below:
I thought it would be easier to understand if I added the output, but I apologize for the long sentence.
© 2022 OneMinuteCode. All rights reserved.