as.qlist: Convert a qlist or qlist-like list to a valid qlist.

Description Usage Arguments Value Examples

View source: R/qlist.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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
# is.qlist(q1) # error because list elements are not named

q2 <- as.qlist(q1)
is.qlist(q2) # no error
q2

royfrancis/pophelper documentation built on Jan. 1, 2021, 4:58 p.m.