# Example usage:
# Insert "Neutrophil" at positions 0, 1, 3 and "Macrophage" at positions 2, 4, 8
# in a vector of length 10, with "Unknown" as the default value.
library(easybio)
annotated_vector <- finsert(
x = expression(
c(0, 1, 3) == "Neutrophil",
c(2, 4, 8) == "Macrophage"
),
len = 10,
na = "Unknown"
)
print(annotated_vector)
Run the code above in your browser using DataLab