readXLSample: Read Excel file

Description Usage Arguments Details Value

Description

Read sample data from an Excel file

Usage

1
2
3
readXLSample(filename, sheetname = NULL, address = "B4",
  check.names = c("Lab ID", "Moss species", "Sample ID", "Depth (mm)",
  "Segment length (mm)", "pMC"))

Arguments

filename

the Excel file to read

sheetname

the name of the worksheet to read. If NULL, the workbook must contain only one sheet.

address

the cell address of the first header cell

check.names

the names of the first few columns of data.

Details

This function assumes the data are stored as one contigous block of cells in an Excel spreadsheet, starting at the cell address address. The function reads the largest contiguous block that starts at this address and includes every column that has a heading and every row for which the first three columns are not all blank. The function then checks that the first few columns have the names specified by check.names.

The function also searches for the date the data were collected in a cell below the cell containing the text "Date collected". This date is extracted and added to the data.frame as an attribute.

If sheetname is NULL, the workbook must consist of a single sheet.

Value

a dataframe of data


AustralianAntarcticDataCentre/datemoss documentation built on May 5, 2019, 8:14 a.m.