Description Usage Arguments Details Value See Also Examples
This function Reads Excel data file, determine boundaries of the table (body data), get metadata from AWS and add it as a attribute of output data frame
1 |
file.xls |
character, path to Excel file |
na |
Character vector of strings to interpret as missing values. By default, readxl treats blank cells as missing data. |
verbose |
a logical indicating if some “progress report” should be given. |
xls_read() read the data in the excel file and determine the limits of the data table, that is, the body of the data (excludes header with AWS metadata).
The initial row of data (line with name of the variables) is detected by searching for the line with at least 3 letters, in order to find the name of the meteorological variables. This procedure was adopted because depending on the data request to INMET the file may contain variables in order and with different names.
Automatic meteorological station (AWS) metadata will be extracted from two
sources: (i) the name of the Excel file and (ii) the header in the Excel
file. The metadata is included as an attribute named 'meta' in the data frame with the
data imported from the Excel file. You can access metada with
attr(raw_data, 'meta')
.
data frame
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
xls_list <- list.files(
system.file("vignettes/dvd_xls_files", package = "rinmetxls"),
full.names = TRUE, recursive = TRUE
)
xls_file <- grep("BELEM", xls_list, value = TRUE)[1]
if (file.exists(xls_file)) {
raw_data <- xls_read(xls_file)
str(raw_data)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.