Skip to content

Commit

Permalink
Fix csv read assign
Browse files Browse the repository at this point in the history
  • Loading branch information
realxinzhao committed Aug 20, 2023
1 parent 4e12b5a commit 02a0dfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/xfaostat_L101_RawDataPreProc8_RL_RFN.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module_xfaostat_L101_RawDataPreProc8_RL_RFN <- function(command, ...) {


# RFN ----
FAOSTAT_load_raw_data(DATASETCODE = "RFN", DATA_FOLDER = DIR_RAW_DATA_FAOSTAT)
FAOSTAT_load_raw_data(DATASETCODE = "RFN", DATA_FOLDER = DIR_RAW_DATA_FAOSTAT, .Envir = Curr_Envir)

RFN %>%
filter(year %in% FAOSTAT_Hist_Year,
Expand Down
2 changes: 1 addition & 1 deletion R/xfaostat_helper_funcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ FAOSTAT_load_raw_data <- function(DATASETCODE,
# Lower case col names and use _ as delimiter
names(df) <- tolower(gsub("\\.| ", "_", names(df)))
# Assigned to .Envir
assign(CODE, df, envir = .Envir)
assign(paste(CODE, GET_MAPPINGCODE, sep = "_"), df, envir = .Envir)
}

} else {stop("Wrong GET_MAPPINGCODE")}
Expand Down

0 comments on commit 02a0dfa

Please sign in to comment.