Comment by Batanichek on R - SQLDF issue with special characters
You need to create reproduceble error ( small data.frame with such error) to alow anyone copy paste and test
View ArticleComment by Batanichek on converting data frame to matrix, sapply is returning...
You can use as.matrix(mymatrix) or if you have only 1 row use it as vector mymatrix<-sapply(unlist(DF), function(x) abs(x - unlist(DF)))
View ArticleComment by Batanichek on Reading eventreactive input from inputtextarea in...
try to use (strsplit(x =input$txt,split = '[\r\n]' )) - to split string into vector.. paste not evaluate you code of 'c(...)' it create simply strung of text
View ArticleComment by Batanichek on modify S3 Generics with dots using formals
I dont know, may be some one have better idea and post it as answer
View ArticleComment by Batanichek on Plot two graphs using plotly package in same plot in R
what means in the same window? in one plot? or in two div in screen? add code of you UI
View ArticleComment by Batanichek on Loading data files with ShinyFiles
@mohammad if you want file from client pc , you can usr fileinput shiny.rstudio.com/reference/shiny/latest/fileInput.html
View ArticleComment by Batanichek on RShiny SQL dataframe to table
And dont forget to disconect after get data or after session end.
View ArticleComment by Batanichek on Shiny: Dynamically Generate Data.Tree
see my example, its what you want? stackoverflow.com/a/39703410/5018792
View ArticleComment by Batanichek on How to dynamically rename multiple columns in R...
@MSD Is my second example what you want? or something else?
View ArticleComment by Batanichek on How to change the background color of the Shiny...
Possible duplicate of How to change color in shiny dashboard?
View ArticleComment by Batanichek on How to convert integer to factor?
@M-- with df in example work without NAs , can you provide example with NAs?
View ArticleAnswer by Batanichek for Shinydashboard remove extra space when header is...
You can add class and then remove it from server side(idea of hide head get here )library(shiny)library(shinyjs)library(shinydashboard)server=shinyServer( function(input, output,session) {...
View ArticleAnswer by Batanichek for R Shiny selectedInput inside renderDataTable cells
Why not use standart fucntional of DT (Shiny.bindAll)Example( in console print select of 1-st row)library(shiny)library(DT)mymtcars = mtcarsmymtcars$id = 1:nrow(mtcars)runApp( list(ui = fluidPage(...
View ArticleAnswer by Batanichek for how to replace a column of a data frame with several...
You can do it in loop like res=lapply(1:ncol(Xm),function(i){mydata[[3]] <- Xm[ , i] # change 3-rd column of mydata om i-th colomn of Xmlm(Y~.,data=mydata)})where res - list of your lm modelsIf you...
View ArticleAnswer by Batanichek for R shiny - last clicked button id
You can do it by adding JS smthing like $(document).on('click', '.needed', function () { Shiny.onInputChange('last_btn',this.id); });Example ( add class needed to btn if you want to control not all...
View ArticleAnswer by Batanichek for R shiny - save chosen values in selectInput
you can do it by storing values into reactivevValues values stored onlyfor one sessionlibrary(shinyjs) # needed for hide and showui <- shinyUI(fluidPage( titlePanel("Update Select Inputs"),...
View ArticleAnswer by Batanichek for Is there a way to make R strings verbatim (not...
You can use scan ( but only in interactive session -- not in source)Like path=scan(what="",allowEscapes=F,nlines=1)C:\test\pathprint(path)And thenCtrl+A++Ctrl+Entergive you resultBut not work in...
View ArticleAnswer by Batanichek for How to convert matrix elements from 0|1 to 1|0 in R?
You can make sample of n elements (10 in example) and change itm1=as.matrix(m)m1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0 0 1 1 0 0 0 0 1 0 [2,] 0 0 0 0 1 0 0 0 1 1 [3,] 1 0 0 0 0 0 0...
View ArticleAnswer by Batanichek for How to sort a dataframe by columns giving column...
dplyr examplelibrary(dplyr)sort_list <- c("z","b")sort_order=c(TRUE,FALSE)dd %>% arrange_(.dots=ifelse(sort_order,paste0("desc(",sort_list,")"),sort_list))
View Article