diff --git a/RBBGCMuso/DESCRIPTION b/RBBGCMuso/DESCRIPTION index ecef69f..b314be4 100644 --- a/RBBGCMuso/DESCRIPTION +++ b/RBBGCMuso/DESCRIPTION @@ -1,6 +1,6 @@ Package: RBBGCMuso Title: An R package for BiomeBGC-MuSo ecosystem modelling -Version: 0.5.0.0-0 +Version: 0.6.0.0-1 Authors@R: person("Roland", "Hollo's", , "hollorol@gmail.com", role = c("aut", "cre")) Description: What the package does (one paragraph). Depends: R (>= 2.10) diff --git a/RBBGCMuso/R/.#musoFilter.R b/RBBGCMuso/R/.#musoFilter.R deleted file mode 120000 index eb55cfa..0000000 --- a/RBBGCMuso/R/.#musoFilter.R +++ /dev/null @@ -1 +0,0 @@ -hollorol@meteor22.13528:1542837570 \ No newline at end of file diff --git a/RBBGCMuso/R/.#musoRand.R b/RBBGCMuso/R/.#musoRand.R deleted file mode 120000 index eb55cfa..0000000 --- a/RBBGCMuso/R/.#musoRand.R +++ /dev/null @@ -1 +0,0 @@ -hollorol@meteor22.13528:1542837570 \ No newline at end of file diff --git a/RBBGCMuso/R/musoExample.R b/RBBGCMuso/R/musoExample.R new file mode 100755 index 0000000..30fde0a --- /dev/null +++ b/RBBGCMuso/R/musoExample.R @@ -0,0 +1,56 @@ +#'copyMusoExampleTo +#' +#'With this function you can copy RBBGCMuso example library whereever you want +#' +#'@param example The name of the example file, if it is NULL tcl/tk menu will pop up to select. +#'@param destination The destination where the example files will be copied. +#'@export + +copyMusoExamleTo <- function(example = NULL, destination = NULL){ + WindowsP <- Sys.info()[1] == "Windows" + + chooseExample <- function(){ + choiceWin <- tcltk::tktoplevel() + tcltk::tclRequire("BWidget") + tcltk::tktitle(choiceWin) <- "Choose an example!" + tcltk::tcl("wm","geometry",choiceWin,"200x50") + tcltk::tcl("wm", "attributes", choiceWin, topmost=TRUE) + choiceValues <- basename(list.dirs(system.file("examples","",package = "RBBGCMuso"),recursive = FALSE)) + choices <- tcltk::tkwidget(choiceWin,"ComboBox", + editable = FALSE, values = choiceValues, + textvariable = tcltk::tclVar(choiceValues[1])) + tcltk::tkpack(choices) + choiceValue <- NA + closeSelection <- tcltk::tkwidget(choiceWin,"button",text ="Select", command =function (){ + choiceValue <<- tcltk::tclvalue(tcltk::tcl(choices,"get")) + tcltk::tkdestroy(choiceWin) + }) + + tcltk::tkpack(closeSelection) + while(as.numeric(tcltk::tclvalue(tcltk::tcl("winfo","exists",choiceWin)))){ + + } + return(choiceValue) + } + + + + if(is.null(example)){ + cExample<-paste0(system.file("examples","",package = "RBBGCMuso"),"/",chooseExample()) + } + + if(is.null(destination)){ + destination<-tcltk::tk_choose.dir(getwd(), "Choose folder to copy the examples!") + } + + currDir <- getwd() + setwd(cExample) + if(!WindowsP){ + file.copy("./bin/muso", destination) + } else { + file.copy("./bin/muso.exe", destination) + file.copy("./bin/cygwin1.dll", destination) + } + file.copy(grep("bin", list.files(), value = TRUE, invert = TRUE),destination) + setwd(currDir) +} \ No newline at end of file diff --git a/RBBGCMuso_0.6.0.0-1.tar.gz b/RBBGCMuso_0.6.0.0-1.tar.gz new file mode 100755 index 0000000..f22c6a1 Binary files /dev/null and b/RBBGCMuso_0.6.0.0-1.tar.gz differ diff --git a/RBBGCMuso_0.6.0.0-1.zip b/RBBGCMuso_0.6.0.0-1.zip new file mode 100755 index 0000000..657c331 Binary files /dev/null and b/RBBGCMuso_0.6.0.0-1.zip differ diff --git a/installWin.R b/installWin.R index b9c5264..a8f2e21 100755 --- a/installWin.R +++ b/installWin.R @@ -1,5 +1,5 @@ basePackages <- c("dplyr","digest","ggplot2","shiny","latex2expr", - "magrittr","tibble","tidyr","installr") + "magrittr","tibble","tidyr") install.packages(basePackages) install.packages("https://github.com/hollorol/RBBGCMuso/raw/master/RBBGCMuso_0.5.0.0-0.zip", repos = NULL, type = "win.binary")