Skip to content

Commit

Permalink
NaN fix (Bar, Box, Dotplot)
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKim5 committed Jul 29, 2021
1 parent 051b537 commit 71de983
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
17 changes: 16 additions & 1 deletion R/AS_barplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,22 @@ AS_barplot<-function(data,
else if (asterisk =="Dunn"){
p_val_data<-data[["Dunn"]]}
else {
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}}
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}
if(length(unique(data[["Data"]]$Group)) !=2){
for(a in 1:nrow(p_val_data)){
for(b in 1:ncol(p_val_data)){
if(is.nan(p_val_data[a,b])==T){
p_val_data[a,b]<-1
}
}
}}
else if (length(unique(data[["Data"]]$Group))==2){
for(b in 1:length(p_val_data)){
if(is.nan(p_val_data[b])==T){
p_val_data[b]<-1
}
}
}}
###Plots###
suppressWarnings(
if (length(unique(data[["Data_renamed"]][["ZZZZ"]]))!=2){
Expand Down
18 changes: 17 additions & 1 deletion R/AS_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,23 @@ AS_boxplot<-function(data,
else if (asterisk =="Dunn"){
p_val_data<-data[["Dunn"]]}
else {
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}}
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}
if(length(unique(data[["Data"]]$Group)) !=2){
for(a in 1:nrow(p_val_data)){
for(b in 1:ncol(p_val_data)){
if(is.nan(p_val_data[a,b])==T){
p_val_data[a,b]<-1
}
}
}}
else if (length(unique(data[["Data"]]$Group))==2){
for(b in 1:length(p_val_data)){
if(is.nan(p_val_data[b])==T){
p_val_data[b]<-1
}
}
}
}
###Plots###
suppressWarnings(
if (length(unique(data[["Data_renamed"]][["Group"]]))!=2) {
Expand Down
18 changes: 17 additions & 1 deletion R/AS_dotplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,23 @@ AS_dotplot<-function(data,
else if (asterisk =="Dunn"){
p_val_data<-data[["Dunn"]]}
else {
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}}
print("Wrong asterisk input must be one of (Dunn,Scheffe,u_test,t_test)")}
if(length(unique(data[["Data"]]$Group)) !=2){
for(a in 1:nrow(p_val_data)){
for(b in 1:ncol(p_val_data)){
if(is.nan(p_val_data[a,b])==T){
p_val_data[a,b]<-1
}
}
}}
else if (length(unique(data[["Data"]]$Group))==2){
for(b in 1:length(p_val_data)){
if(is.nan(p_val_data[b])==T){
p_val_data[b]<-1
}
}
}
}
###Plots###
suppressWarnings(
if (length(unique(data[["Data_renamed"]][["Group"]]))!=2) {
Expand Down
3 changes: 2 additions & 1 deletion man/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\name{NEWS}
\title{News for Package \pkg{LMSstat}}
\alias{NEWS}
\title{News for Package

\section{Changes in version 1.0.1,(February 2021)}{
\itemize{
Expand Down

0 comments on commit 71de983

Please sign in to comment.