Replacement method for cyto_names

cyto_names(x) <- value

Arguments

x

object of class flowFrame, flowSet, GatingHierarchy or GatingSet.

value

vector of replacement names.

Author

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

library(CytoExploreRData) # Activation flowSet fs <- Activation # Sample names cyto_names(fs)
#> [1] "Activation_1.fcs" "Activation_2.fcs" "Activation_3.fcs" #> [4] "Activation_4.fcs" "Activation_5.fcs" "Activation_6.fcs" #> [7] "Activation_7.fcs" "Activation_8.fcs" "Activation_9.fcs" #> [10] "Activation_10.fcs" "Activation_11.fcs" "Activation_12.fcs" #> [13] "Activation_13.fcs" "Activation_14.fcs" "Activation_15.fcs" #> [16] "Activation_16.fcs" "Activation_17.fcs" "Activation_18.fcs" #> [19] "Activation_19.fcs" "Activation_20.fcs" "Activation_21.fcs" #> [22] "Activation_22.fcs" "Activation_23.fcs" "Activation_24.fcs" #> [25] "Activation_25.fcs" "Activation_26.fcs" "Activation_27.fcs" #> [28] "Activation_28.fcs" "Activation_29.fcs" "Activation_30.fcs" #> [31] "Activation_31.fcs" "Activation_32.fcs" "Activation_33.fcs"
# Change first sample name cyto_names(fs)[1] <- "first_sample" # Activation GatingSet gs <- GatingSet(fs) # Change last sample name cyto_names(gs)[length(gs)] <- "last_sample" # Updated sample names cyto_names(gs)
#> [1] "first_sample" "Activation_2.fcs" "Activation_3.fcs" #> [4] "Activation_4.fcs" "Activation_5.fcs" "Activation_6.fcs" #> [7] "Activation_7.fcs" "Activation_8.fcs" "Activation_9.fcs" #> [10] "Activation_10.fcs" "Activation_11.fcs" "Activation_12.fcs" #> [13] "Activation_13.fcs" "Activation_14.fcs" "Activation_15.fcs" #> [16] "Activation_16.fcs" "Activation_17.fcs" "Activation_18.fcs" #> [19] "Activation_19.fcs" "Activation_20.fcs" "Activation_21.fcs" #> [22] "Activation_22.fcs" "Activation_23.fcs" "Activation_24.fcs" #> [25] "Activation_25.fcs" "Activation_26.fcs" "Activation_27.fcs" #> [28] "Activation_28.fcs" "Activation_29.fcs" "Activation_30.fcs" #> [31] "Activation_31.fcs" "Activation_32.fcs" "last_sample"