try catch finally in r

    tryCatch({       data.oac.null <- rbind(data.oac.null, data.oac[[j]][[m-i]])       cat(“sheet”,m-i, “”)       }, error = function(e){cat(“ERROR :”,conditionMessage(e), “\n”)} http://mazamascience.com/WorkingWithData/?p=912 result = tryCatch({     expr }, warning = function(w) {     warning-handler-code }, error = function(e) {     error-handler-code }, finally = {     cleanup-code }  

argument 1 (type ‘list’) cannot be handled by ‘cat’

https://stackoverflow.com/questions/29041449/r-shiny-error-in-catlist-file-sep-fill-labels-append-argument Error in cat(list(…), file, sep, fill, labels, append) : argument 1 (type ‘list’) cannot be handled by ‘cat’ render함수에 list를 넘겨주는 과정에 발생하는 경우가 많다.  예를 들어,  output$AAA <- renderText({  }) 에서  renderText() 은  a single line of text을 render하는데,  render multiple lines,이 넘어오는 경우 error가 발생한다.    renderText() 대신에   tagList()  를 사용하는   renderUI() 를 사용해보는 것을 Read more…

package :: cronR

https://cran.r-project.org/web/packages/cronR/index.html Schedule R Scripts and Processes with the ‘cron’ Job Scheduler Create/ edit/ remove ‘cron’ jobs on your unix-alike system. provides a set of easy-to-use wrappers to ‘crontab’. provides an “RStudio add-in” to easily launch and schedule your scripts. cron_add cron_rm cron_clear cron_load cron_ls cron_njobs cron_save cron_rscript cron_rstudioaddin  

중복 체크

    id <- I(c(“bb”,”bb”,”bb”,”aa”,”aa”,”aa”)) val <- I(c(“b1″,”b2″,”b3″,”a1″,”a1″,”a2”)) DD <- data.frame(id,val) str(DD) ddply(DD, .(id, val), function(x){ x$DUP_MODULE = 1:nrow(x); x})      

Data Frame

    DataCamp Blog , https://www.r-bloggers.com/15-easy-solutions-to-your-data-frame-problems-in-r/ 번역   Data Frame?   class(warpbreaks) str(warpbreaks);head(warpbreaks) [1] “data.frame” ‘data.frame’: 54 obs. of 3 variables: $ breaks : num 26 30 54 25 70 52 51 26 67 18 … $ wool : Factor w/ 2 levels “A”,”B”: 1 1 1 1 1 1 1 Read more…