diff --git a/RAutoClDs.R b/RAutoClDs.R index 92f5c63..087f984 100644 --- a/RAutoClDs.R +++ b/RAutoClDs.R @@ -1,8 +1,6 @@ -######################################################################## -# Don't Use This Code Just Yet # -######################################################################## + #Efrain H. Gonzalez -#6/21/2017 +#6/22/2017 options(digits = 11) #Libraries required to run the code library(pryr) @@ -137,10 +135,10 @@ gcnames <- function(DiData,usecol=1){ i = 1 nwnam <- rep("0",length.out=nuruns) for(i in 1:nuruns){ - if(length(strsplit(colnames(DiData)[i],"///")[[1]]) >= usecol){ - nwnam[i]=str_trim(strsplit(colnames(DiData)[i],"///")[[1]][usecol]) + if(length(strsplit(colnames(DiData)[i],"///|//")[[1]]) >= usecol){ + nwnam[i]=str_trim(strsplit(colnames(DiData)[i],"///|//")[[1]][usecol]) } else{ - nwnam[i]=str_trim(strsplit(colnames(DiData)[i],"///")[[1]][1]) + nwnam[i]=str_trim(strsplit(colnames(DiData)[i],"///|//")[[1]][1]) } }