diff --git a/RBBGCMuso/DESCRIPTION b/RBBGCMuso/DESCRIPTION index 0f5f082..af838a1 100644 --- a/RBBGCMuso/DESCRIPTION +++ b/RBBGCMuso/DESCRIPTION @@ -1,6 +1,6 @@ Package: RBBGCMuso Title: An R package for BiomeBGC-MuSo ecosystem modelling -Version: 0.3.2.0-0 +Version: 0.3.3.0-0 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/otherUsefullFunctions.R b/RBBGCMuso/R/otherUsefullFunctions.R index 19f9acd..fef3323 100644 --- a/RBBGCMuso/R/otherUsefullFunctions.R +++ b/RBBGCMuso/R/otherUsefullFunctions.R @@ -126,6 +126,9 @@ corrigMuso <- function(settings, data){ #' @usage file.path2(str1, str2) file.path2<-function(str1, str2){ + if(str1==""|str1=="./"){ + return(str2) + } str1<-file.path(dirname(str1),basename(str1)) if(substring(str2,1,1)=="/"){ return(paste(str1,str2,sep="")) diff --git a/RBBGCMuso/R/setupMuso.R b/RBBGCMuso/R/setupMuso.R index d5ac5c2..de32f83 100644 --- a/RBBGCMuso/R/setupMuso.R +++ b/RBBGCMuso/R/setupMuso.R @@ -55,6 +55,11 @@ setupMuso <- function(executable=NULL, Linuxp <-(Sys.info()[1]=="Linux") + inputParser <- function(string,fileName,counter,value=TRUE){ + unlist(strsplit(grep(string,fileName,value=TRUE),"[\ \t]"))[counter] + } + + if(is.null(inputloc)){ inputloc<- "./" } else { @@ -93,8 +98,8 @@ setupMuso <- function(executable=NULL, if(is.null(epcinput)){ epcflag=TRUE - epcinput[1] <- unlist(strsplit(grep(" EPC file name",inifiles[[1]],value=TRUE),"[\ \t]"))[1] - epcinput[2] <- unlist(strsplit(grep(" EPC file name",inifiles[[2]],value=TRUE),"[\ \t]"))[1] + epcinput[1] <- paste0(inputloc,inputParser(string=" EPC file name",fileName=inifiles[[1]],counter=1,value=TRUE)) + epcinput[2] <- paste0(inputloc,inputParser(string=" EPC file name",fileName=inifiles[[2]],counter=1,value=TRUE)) } else { inifiles[[1]][grep(" EPC file name",inifiles[[1]])]<-paste(epcinput[1],"\t EPC file name",sep="") diff --git a/RBBGCMuso_archive/RBBGCMuso_0.3.2.0-0.tar.gz b/RBBGCMuso_archive/RBBGCMuso_0.3.2.0-0.tar.gz index ea358ba..a281e78 100644 Binary files a/RBBGCMuso_archive/RBBGCMuso_0.3.2.0-0.tar.gz and b/RBBGCMuso_archive/RBBGCMuso_0.3.2.0-0.tar.gz differ