brettscustomfunctions: Several clumped fuctions to be used in combo with isoreader

Description Usage Arguments Examples

Description

smallflatlist takes a isoreader obj and pass back a flatlist. The ClumpedbyCyc takes a isoreader obj and pass back a cyc by cyc flatlist

Usage

1

Arguments

isoreader.obj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  library(isoreader)
  did_files <- iso_read_dual_inlet(folder, cache = TRUE, quiet = FALSE, read_vendor_data_table = TRUE)
  did_files <- iso_omit_files_with_problems(did_files)
  flatlist.Cyc <- clumpedbyCyc(rawdata)

--------------------------------------------------
  library(isoreader)
  did_files <- iso_read_dual_inlet(folder, cache = TRUE, quiet = FALSE, read_vendor_data_table = TRUE)
  did_files <- iso_omit_files_with_problems(did_files)

  alldata=did_files %>%
  iso_get_file_info()  %>%
  # pick favorite file info fields
  select(file_id, `Analysis`, `Identifier 1`, `Preparation`,`Method`, `measurement_info` )
  preflatlist <-lapply(CIDSdata, '[[', "lineofsmallflatlist")  %>% bind_rows()  %>%
  isoreader:::unnest_aggregated_data_frame()
    sampleflatlist <- preflatlist  %>%
  arrange(Analysis)  %>%
  mutate(
    new_sample =  Preparation != c("", head(Preparation, -1)) | Analysis != c("", as.integer(head(Analysis, -1)) +1 ) |       Identifier1 != c("", head(Identifier1,-1)), #
    batch = cumsum(new_sample)
    )  %>%
  group_by(batch)  %>% mutate(id = row_number())  %>%  add_tally()

brettdavidheiser/Brettscustomfunctions documentation built on May 12, 2018, 12:50 a.m.