Convert a list to a valid qlist. Adds run labels if needed. Renames cluster columns and adds basic attributes 'ind' and 'k' if needed.

as.qlist(qlist, debug = FALSE)

Arguments

qlist

A qlist or a list of runs (data.frames)

debug

Logical for internal use

Value

A qlist object (list of data.frames)

Examples

# create two data frames df1 <- data.frame(A=c(0.2,0.4,0.6,0.2), B=c(0.8,0.6,0.4,0.8)) df2 <- data.frame(A=c(0.3,0.1,0.5,0.6), B=c(0.7,0.9,0.5,0.4)) # create qlist q1 <- list(df1,df2) q1
#> [[1]] #> A B #> 1 0.2 0.8 #> 2 0.4 0.6 #> 3 0.6 0.4 #> 4 0.2 0.8 #> #> [[2]] #> A B #> 1 0.3 0.7 #> 2 0.1 0.9 #> 3 0.5 0.5 #> 4 0.6 0.4 #>
# is.qlist(q1) # error because list elements are not named q2 <- as.qlist(q1) is.qlist(q2) # no error q2
#> $run1 #> Cluster1 Cluster2 #> 1 0.2 0.8 #> 2 0.4 0.6 #> 3 0.6 0.4 #> 4 0.2 0.8 #> #> $run2 #> Cluster1 Cluster2 #> 1 0.3 0.7 #> 2 0.1 0.9 #> 3 0.5 0.5 #> 4 0.6 0.4 #>