Commit df85478b authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent 07ba7278
......@@ -23,7 +23,7 @@ get_short_data <- function(frostObj,stations,referencetime,elements,...) {
df <- short_data_df(tmp=tmp,indice=i)
res <- rbind(res,df)
}
res[,"sourceId"] <-gsub(":.*","",res[,"sourceId"])
res[,"ID"] <-gsub(":.*","",res[,"ID"])
}
......@@ -33,9 +33,9 @@ get_short_data <- function(frostObj,stations,referencetime,elements,...) {
short_data_init <- function(){
df <- data.frame(sourceId = character(0),
referenceTime = character(0),
elementId = character(0),
df <- data.frame(date = character(0),
ID = character(0),
CO_NAME = character(0),
value = numeric(0),
unit = character(0),
levelType = character(0),
......@@ -52,9 +52,9 @@ short_data_init <- function(){
}
short_data_df <- function(tmp,indice){
df <- data.frame(sourceId = ifelse(is.null(tmp$data[[indice]]$sourceId),NA,tmp$data[[indice]]$sourceId),
referenceTime = ifelse(is.null(tmp$data[[indice]]$referenceTime),NA,tmp$data[[indice]]$referenceTime),
elementId = ifelse(is.null(tmp$data[[indice]]$observations[[1]]$elementId),NA,tmp$data[[indice]]$observations[[1]]$elementId),
df <- data.frame(date = ifelse(is.null(tmp$data[[indice]]$referenceTime),NA,tmp$data[[indice]]$referenceTime),
ID = ifelse(is.null(tmp$data[[indice]]$sourceId),NA,tmp$data[[indice]]$sourceId),
CO_NAME = ifelse(is.null(tmp$data[[indice]]$observations[[1]]$elementId),NA,tmp$data[[indice]]$observations[[1]]$elementId),
value = ifelse(is.null(tmp$data[[indice]]$observations[[1]]$value),NA,tmp$data[[indice]]$observations[[1]]$value),
unit = ifelse(is.null(tmp$data[[indice]]$observations[[1]]$unit),NA,tmp$data[[indice]]$observations[[1]]$unit),
levelType = ifelse(is.null(tmp$data[[indice]]$observations[[1]]$level$levelType),NA,tmp$data[[indice]]$observations[[1]]$level$levelType),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment