One of the parameters in the fiel is PARAMETER. To extract PARAMETER I am using template$PARAMETER, but it does not work. I get the error $ operator is invalid for atomic vectors. It does not work if I convert the read file to a data frame "data.frame(read.delim)" . it does not work if I use template[, "PARAMETER"] or template[[PARAMETER]]. I cannot find any other explanation in Google. What seems to be not working?
template<- try(read.delim(parmsDefFn, as.is=T), silent=TRUE)
if (inherits(template, "try-error")) { # if error,
params <- stop("Defaults params file ",basename(parmsDefFn),"either doesn't exist or is not a valid tab-separated PARAMS file. \n")
}
#PARAMS FILE:
prm<- try(read.delim(PARAMSfullFile, as.is=T), silent=TRUE)
if (inherits(prm, "try-error")) { # if error,
stop(basename(PARAMSfullFile)," either doesn't exist or is not a valid tab-separated PARAMS file. \n")
}