Skip to content

Commit

Permalink
removing bug on data frame
Browse files Browse the repository at this point in the history
  • Loading branch information
robsalasco committed Sep 12, 2022
1 parent dfbb6b3 commit 27a74a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/get_sinim_vars.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ get_sinim_vars <- function(catn) {
)
list <- Reduce(function(...) merge(..., all = T), resp)
sub <- as.vector(subset(list, id_subarea == catn, select = c("mtro_datos_nombre", "unidad_medida_simbolo", "id_dato")))
colnames(sub) <- c("variable", "unit", "code")
sub_df <- as.data.frame(sub)
colnames(sub_df) <- c("variable", "unit", "code")

stopifnot(nrow(sub) > 0)
stopifnot(nrow(sub_df) > 0)

return(sub)
return(sub_df)

}

0 comments on commit 27a74a8

Please sign in to comment.