apexcharter/man/parse_df.Rd

34 lines
788 B
Plaintext
Raw Normal View History

2018-09-03 23:52:53 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse-data.R
\name{parse_df}
\alias{parse_df}
\title{Convert a \code{data.frame} to a \code{list}}
\usage{
2018-12-18 18:02:09 +01:00
parse_df(data, add_names = FALSE)
2018-09-03 23:52:53 +02:00
}
\arguments{
\item{data}{A \code{data.frame} or an object coercible to \code{data.frame}.}
2018-12-18 18:02:09 +01:00
\item{add_names}{Use names of columns in output. Can be logical to
reuse \code{data} names or a character vector of new names.}
2018-09-03 23:52:53 +02:00
}
2019-07-24 12:20:22 +02:00
\value{
A \code{list} that can be used to specify data in \code{\link{ax_series}} for example.
}
2018-09-03 23:52:53 +02:00
\description{
Convert data to a format suitable for ApexCharts.js
}
2019-07-24 12:20:22 +02:00
\examples{
# All iris dataset
parse_df(iris)
# Keep variables names
parse_df(iris[, 1:2], add_names = TRUE)
# Use custom names
parse_df(iris[, 1:2], add_names = c("x", "y"))
}