Skip to content

Commit

Permalink
Ready for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Aug 6, 2022
1 parent b0b5af5 commit ca3af29
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dipsaus
Type: Package
Title: A Dipping Sauce for Data Analysis and Visualizations
Version: 0.2.2.9002
Version: 0.2.3
Authors@R: c(
person("Zhengjia", "Wang", email = "dipterix.wang@gmail.com", role = c("aut", "cre")),
person("John", "Magnotti", email = "John.Magnotti@pennmedicine.upenn.edu", role = c("ctb"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
dipsaus 0.2.3 (In Development)
=======

## Major Changes

* Added `rstudioapi` wrapper `rs_edit_file` to allow editing files directly in `RStudio`

## Minor Changes

* `parse_svec` handles multiple lengths all together, and `parse_svec(1:10)` is equivalent to `parse_svec("1:10")`
* Allowed `rs_exec` to run nested. However, there is a risk of parent process ends before the nested child process finishes. In this case, parent temporary directory will be destroyed, and child process will become orphan (results will become unavailable)

## Bug Fixes

Expand Down
5 changes: 2 additions & 3 deletions R/language.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,11 @@ eval_dirty <- function(expr, env = parent.frame(), data = NULL, quoted = TRUE){
env <- parent.frame()
lhs <- substitute(lhs)

tryCatch({
isnull <- tryCatch({
is.null(eval(lhs, envir = env))
}, error = function(e){
return(TRUE)
}) ->
isnull
})

if(isnull){
eval(as.call(list( quote(`<-`), lhs, value )), envir = env)
Expand Down
5 changes: 2 additions & 3 deletions R/strings.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ deparse_svec <- function(nums, connect = '-', concatenate = TRUE, collapse = ','
ind <- nums - lg
ind[1] <- 0
ind2 <- c(ind[-1], -1)
apply(cbind(nums[!ind %in% alag], nums[!ind2 %in% alag]), 1,function(x){
re <- apply(cbind(nums[!ind %in% alag], nums[!ind2 %in% alag]), 1,function(x){
if(x[1] == x[2]){
stringr::str_c(x[1])
}else{
stringr::str_c(x, collapse = connect)
}
}) ->
re
})
if(concatenate){
re <- stringr::str_c(re, collapse = collapse)
}
Expand Down
4 changes: 2 additions & 2 deletions demo/example-actionButtonStyled.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ui <- fluidPage(


server <- function(input, output, session) {
btn_types = c('default', 'primary', 'info', 'success', 'warning', 'danger')
btn_types <- c('default', 'primary', 'info', 'success', 'warning', 'danger')
observeEvent(input$btn, {
btype = btn_types[((input$btn-1) %% (length(btn_types)-1)) + 1]
btype <- btn_types[((input$btn-1) %% (length(btn_types)-1)) + 1]
updateActionButtonStyled(session, 'btn2', type = btype)
})
observeEvent(input$btn2, {
Expand Down

0 comments on commit ca3af29

Please sign in to comment.