% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eDT.R
\name{initData}
\alias{initData}
\title{Add some extra columns to data to allow for / keep track of modifications}
\usage{
initData(
  data,
  ns,
  buttonCol = "buttons",
  statusCol = "_editbl_status",
  deleteCol = "_editbl_deleted",
  iCol = "i",
  canDeleteRow = TRUE,
  canEditRow = TRUE,
  canCloneRow = TRUE
)
}
\arguments{
\item{data}{\code{data.frame}}

\item{ns}{namespace function}

\item{buttonCol}{\code{character(1)} name of column with buttons}

\item{statusCol}{\code{character(1)} name of column with general status (e.g. modified or not).}

\item{deleteCol}{\code{character(1)} name of the column with deletion status.}

\item{iCol}{\code{character(1)} name of column containing a unique identifier.}

\item{canDeleteRow}{can be either of the following:
\itemize{
\item \code{logical}, e.g. TRUE or FALSE. In case of \code{FALSE}, buttons will not be visible except for new rows.
\item \code{function}. Needs as input an argument \code{row} which accepts a single row \code{tibble} and as output TRUE/FALSE.
}}

\item{canEditRow}{can be either of the following:
\itemize{
\item \code{logical}, e.g. TRUE or FALSE. In case of \code{FALSE}, buttons will not be visible except for new rows.
\item \code{function}. Needs as input an argument \code{row} which accepts a single row \code{tibble} and as output TRUE/FALSE.
}}

\item{canCloneRow}{can be either of the following:
\itemize{
\item \code{logical}, e.g. TRUE or FALSE. In case of \code{FALSE}, buttons will not be visible except for new rows.
\item \code{function}. Needs as input an argument \code{row} which accepts a single row \code{tibble} and as output TRUE/FALSE.
}}
}
\value{
data with extra columns buttons, status, i.
}
\description{
Add some extra columns to data to allow for / keep track of modifications
}
\author{
Jasper Schelfhout
}
\keyword{internal}
