Skip to content

Commit

Permalink
plot_raw update
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio committed May 22, 2022
1 parent 647f98f commit 9b77268
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- `figure2rmd()`
- `table2rmd()`
- `gdocs2rmd()`
- Fix `plot_raw()`: "length(x) = 2 > 1' in coercion to 'logical(1)"

# inti 0.5.6

Expand Down
13 changes: 7 additions & 6 deletions R/plot_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
#'
#' fb %>%
#' plot_raw(type = "sca"
#' , x = "hi"
#' , x = "geno"
#' , y = "twue"
#' , group = ""
#' , group = "treat"
#' , color = c("red", "blue")
#' )
#'
#' }
Expand Down Expand Up @@ -127,8 +128,8 @@ if(!c(y %in% colnames(data))) stop("colum no exist")

opt <- if(is.null(opt) || is.na(opt) || opt == "") {NULL} else {opt}

color <- if(is.null(color) || is.na(color) || color == "" || color == "yes") {
TRUE} else if (color == "no") {FALSE} else {color}
color <- if(length(color) <= 1 && (is.null(color) || is.na(color) || color == "" || color == "yes")) {
TRUE} else {color}

ylimits <- if(any(is.null(ylimits)) || any(is.na(ylimits)) || any(ylimits == "")) {
NULL
Expand All @@ -139,15 +140,15 @@ if(!c(y %in% colnames(data))) stop("colum no exist")
unlist() %>% as.numeric()
} else {ylimits}

xtext <- if(is.null(xtext) || is.na(xtext) || xtext == "") {
xtext <- if(length(xtext) <= 1 && (is.null(xtext) || is.na(xtext) || xtext == "")) {
NULL} else if (is.character(xtext)){
xtext %>%
strsplit(., ",") %>%
unlist() %>%
base::trimws()
} else {xtext}

gtext <- if(is.null(gtext) || is.na(gtext) || gtext == "") {
gtext <- if (length(gtext) <= 1 && (is.null(gtext) || is.na(gtext) || gtext == "")) {
NULL} else if (is.character(gtext)){
gtext %>%
strsplit(., ",") %>%
Expand Down
6 changes: 3 additions & 3 deletions inst/yupana/rsconnect/shinyapps.io/flavjack/yupana.dcf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ account: flavjack
server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1
appId: 357871
bundleId: 5923320
bundleId: 5931320
url: https://flavjack.shinyapps.io/yupana/
when: 1652971133.1596
lastSyncTime: 1652971133.15961
when: 1653190943.78602
lastSyncTime: 1653190943.78605
asMultiple: FALSE
asStatic: FALSE
5 changes: 3 additions & 2 deletions man/plot_raw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b77268

Please sign in to comment.