The need to select a date for application R

I am looking for a simple date picker to use with R. I can find many collectors written in other languages, but I would prefer not to mix languages, if at all possible. Does anyone know of an R package that provides this functionality?

+3
source share
2 answers

If you are not opposed to installing gWidgets and gWidgetstcltk, you have the following:

library(gWidgetstcltk)
options(guiToolkit="tcltk")
#    
pickDate <- function() {
  date <- NULL
  dlg <- gbasicdialog(handler=function(...) date <<- svalue(calendar))
  calendar <- gcalendar(cont=dlg)
  visible(dlg, set=TRUE)
  date
}
+4
source

I think you can use gcalendar () from gWidgets.

options("guiToolkit"="RGtk2")
library(RGtk2)
library(gWidgets)

win <- gwindow("Test Calendar", width=12)   
Group <- ggroup(cont=win)

tmp <- gframe("Date", container=Group )
add(tmp, calStart)
add(tmp, calEnd)

calStart <- gcalendar("Debut", format = "%Y-%m-%d")
calEnd <- gcalendar("Fin", format = "%Y-%m-%d")

dateStart <- svalue(calStart) 
dateFin <- svalue(calEnd)

Perhaps this may help you.

Hi,

YougyZ

0
source

Source: https://habr.com/ru/post/1789058/


All Articles