Skip to contents

Subset individual plates from the input file

Usage

pull_plate(file, sheet = 1, plate_id)

Arguments

file

This is the path to a xlsx or csv file containing data for the following types of plates: 6, 12, 24, 48, 96, 384, and 1536.

sheet

If file type is xlsx this is the sheet name (character) or number (integer).

plate_id

Character or numeric vector that will be used to subset the file.

Value

a list of tibbles

Examples

file_path <- system.file("extdata", "example_12_well.xlsx", package = "tidyplate")

n_id = c(1, 3)
c_id = c("drug", "percent_survived")

data_n <- pull_plate(file = file_path, plate_id = n_id)
data_c <- pull_plate(file = file_path, plate_id = c_id)

print(data_n)
#> [[1]]
#> # A tibble: 3 × 5
#>   drug  `1`      `2`       `3`      `4`      
#>   <chr> <chr>    <chr>     <chr>    <chr>    
#> 1 A     Neomycin Puromycin Neomycin Puromycin
#> 2 B     Neomycin Puromycin Neomycin Puromycin
#> 3 C     DMSO     DMSO      DMSO     DMSO     
#> 
#> [[2]]
#> # A tibble: 3 × 5
#>   percent_survived   `1`   `2`   `3`   `4`
#>   <chr>            <int> <int> <int> <int>
#> 1 A                   60    NA    52    18
#> 2 B                   62    23    54    16
#> 3 C                   98    97    99    98
#> 
print(data_c)
#> [[1]]
#> # A tibble: 3 × 5
#>   drug  `1`      `2`       `3`      `4`      
#>   <chr> <chr>    <chr>     <chr>    <chr>    
#> 1 A     Neomycin Puromycin Neomycin Puromycin
#> 2 B     Neomycin Puromycin Neomycin Puromycin
#> 3 C     DMSO     DMSO      DMSO     DMSO     
#> 
#> [[2]]
#> # A tibble: 3 × 5
#>   percent_survived   `1`   `2`   `3`   `4`
#>   <chr>            <int> <int> <int> <int>
#> 1 A                   60    NA    52    18
#> 2 B                   62    23    54    16
#> 3 C                   98    97    99    98
#>