Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Doc: Common Utilities

kmorrisongr edited this page Feb 17, 2020 · 1 revision

Extend A Vector

fccu_extend(vec, max_len, to_app=NA)

  • Extend vector to match max_len by appending to_app.
  • @param vec A vector.
  • @param max_len How long you want vec to be.
  • @param to_app What you want to be appended to vec.
  • @return A vector of length max_len.

Find the First Column That Is A Feature

fccu_first_feat_col(fc)

  • Find the first column that is a feature.
  • @param fc The Fc Array data frame.
  • @return The first column that is not "subject", "group", or "times".

Match The Length Of A Data Frame And Vector

fccu_match_rows = function(a, b, data)

  • Make data and vector same length/nrow as other vector. Remove entries from data and a until a is the same length as b. By checking if a[i] == b[i] until you find one that isn't.
  • @param a A vector to be trimmed, must be from data as well (say, rownames()).
  • @param b The vector of shorter length that you want length(a) and nrow(data) to be.
  • @param data Some data frame you want trimmed.
  • @return A trimmed data frame.

Clone this wiki locally