#' @export
all.data.list = function(record.codes, token){
out.list = NULL
good.list = NULL
bad.list = NULL
for(i in 1:length(record.codes)){
x.load = load.data(record.codes[i], token)
x.meta = analysis.metadata(record.codes[i], token)
if( identical( data.frame(x.load)$record.code, character(0)) ){
# bad.list[[i]] = record.codes[i]
warning(paste("The following was not recognized as valid record set codes:", record.codes[i]))
next
} else {
current = merge( data.frame(x.load, stringsAsFactors=FALSE, check.names=FALSE),
data.frame(x.meta, stringsAsFactors=FALSE, check.names=FALSE), all = TRUE)#, by="processid")
current = data.frame(current, stringsAsFactors=FALSE, check.names=FALSE)
allowed = allowed.fields()
allowed = c(allowed, names(current)[endsWith(names(current), "_nucraw")] )
allowed = c(allowed, names(current)[endsWith(names(current), "_gb_asc")] )
# current = current[ , names(current) %in% allowed]
current[current == "" ] = NA
out.list[[i]] = current
}
}
good.list = out.list[lapply(out.list,length)>0]
good.list = list.to.dataframe(good.list)
return(good.list)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.