addVariable {scRepertoire} | R Documentation |
This function adds variables to the product of combineTCR() combineBCR() or expression2List() to be used in later visualizations. For each element, the function will add a column (labled by name) with the variable. The length of the variable paramater needs to match the length of the combined object.
addVariable(df, name = NULL, variables = NULL)
df |
The product of combineTCR() combineBCR() or expression2List(). |
name |
The column header to add. |
variables |
The exact values to add to each element of the list. |
list of contigs with a new column (name).
x <- contig_list combined <- combineTCR(x, rep(c("PX", "PY", "PZ"), each=2), rep(c("P", "T"), 3), cells ="T-AB") combined <- addVariable(combined, name = "batch", variables = c(1,1,1,1,2,2))