Create a data frame containing machine Eta.fu and Phi.u values.
read_all_eta_files.Rd
This function reads the files in eat_fin_paths
and creates a data frame of important efficiency and other variables.
Usage
read_all_eta_files(
eta_fin_paths,
efficiency_tab_name = PFUPipeline::machine_constants$efficiency_tab_name,
year = IEATools::iea_cols$year,
.values = IEATools::template_cols$.values,
hidden_excel_file_prefix = "~$"
)
Arguments
- eta_fin_paths
A list of the file paths to machine excel files containing FIN_ETA front sheets, and therefore usable data. Created by calling the
get_eta_filepaths()
function.- efficiency_tab_name
- year
See
IEATools::iea_cols
.- .values
- hidden_excel_file_prefix
The prefix for hidden Excel files. These files appear when an Excel file is open and should be ignored. Default is "~$".
Value
A data frame containing all Eta.fu and Phi.u values present in all Machine excel files, with the following column names: "Country", "Energy.type", "Last.stage", "Method", "Machine", "Eu.product", "Quantity", "Year", "Value".
Details
Note that eta_fin_paths
should typically be a list of
file paths, each a character string.
But eta_fin_paths
can be a single character string (not a list),
in which case it will be interpreted as a directory
containing files that have Eta.fu and Phi.u values.
When eta_fin_paths
is a single character string (not a list),
the directory will be interrogated for files,
a list of file paths constructed, and
all files read.
get_eta_filepaths()
is called internally before
reading the files and creating the data frames.