Description Usage Arguments Value See Also Examples
Reads a single .xls
or .xlsx
file containing RAP
data from disk.
1 | xls_read(path = file.choose(), sheets = readxl::excel_sheets(path))
|
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) |
Returns a data frame of format file
, sheet
, ID
, Plate
, and mtp
which contains the mtp
plate objects.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.