xls_read: Reads a single '.xls' or '.xlsx' file containing 'RAP' data...

Description Usage Arguments Value See Also Examples

Description

Reads a single .xls or .xlsx file containing RAP data from disk.

Usage

1
xls_read(path = file.choose(), sheets = readxl::excel_sheets(path))

Arguments

path

The path of the file containing the mtp data. Defaults to file.choose()

sheets

The name of the sheet containing the mtp data. Defaults to readxl::excel_sheets(path)

Value

Returns a data frame of format file, sheet, ID, Plate, and mtp which contains the mtp plate objects.

See Also

xls_folder_read

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# specifying the file path. \code{system.file} is a function to search e.g. within a package.
df_mtp <- xls_read(path = system.file("extdata", "crystalban_salt_01.xls", package = "RAPr"))
df_mtp
df_mtp$mtp[1] # a list item containing a mtp object
class(df_mtp$mtp[1])
df_mtp$mtp[[1]] # a mtp object
class(df_mtp$mtp[[1]])

# browsing for files in the current directory
df_mtp <- read_mtp_xls()

# reading all files in a directory starting from the working directory
# replace with your own path to work
## NOT RUN
my_path <- "./inst/extdata/"
files <- list.files(path = my_path)
df_mtp <- purrr::map_df(files, function(file_name) xls_read(path = paste(my_path, file_name, sep = "")))
df_mtp
## END NOT RUN

JannikVindeloev/RAPr documentation built on May 7, 2019, 10:21 a.m.