| list.parse | R Documentation | 
This function converts an object representing data to
list that represents the same data. For example, a
data.frame stored tabular data column-wisely,
that is, each column represents a vector of a certain
type. list.parse converts a data.frame to
a list which represents the data row-wisely so that it
can be more convinient to perform other non-tabular data
manipulation methods.
list.parse(x, ...) ## Default S3 method: list.parse(x, ...) ## S3 method for class 'matrix' list.parse(x, ...) ## S3 method for class 'data.frame' list.parse(x, ...) ## S3 method for class 'character' list.parse(x, type, ...)
x | 
 
  | 
... | 
 Additional parameters passed to converter function  | 
type | 
 The type of data to parse. Currently json and yaml are supported.  | 
list object representing the data in x
x <- data.frame(a=1:3,type=c('A','C','B'))
list.parse(x)
x <- matrix(rnorm(1000),ncol=5)
rownames(x) <- paste0('item',1:nrow(x))
colnames(x) <- c('a','b','c','d','e')
list.parse(x)
z <- '
a:
  type: x
  class: A
  registered: yes
'
list.parse(z, type='yaml')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.