R/helperFns.R

addCommas<-function(str){
  #if str includes spaces but isn't surrounded by commas then the commas are added
  
  if( length(grep(" ",str))>0  & length(grep("\"",str))==0 ){
    str <- paste("\"",str,"\"",sep="")
  }
    
  return(str)
  
}

Try the apsimr package in your browser

Any scripts or data that you put into this service are public.

apsimr documentation built on May 2, 2019, 3:03 a.m.