prep_query | R Documentation |
For applying to data frames that are read into R using any
other method other than import_query()
, this function cleans variable
names by replacing special characters and converting the relevant variable
types so that they are compatible with the rest of the functions in
vivainsights.
prep_query(data, convert_date = TRUE, date_format = "%m/%d/%Y")
data |
A Standard Person Query dataset in the form of a data frame. You
should pass the data frame that is read into R using any other method
other than |
convert_date |
Logical. Defaults to |
date_format |
String specifying the date format for converting any
variable that may be a date to a Date variable. Defaults to |
A tibble
with the cleaned data frame is returned.
The following shows when and how to use prep_query()
:
pq_df <- read.csv("path_to_query.csv") cleaned_df <- pq_df |> prep_query()
You can then run checks to see that the variables are of the correct type:
dplyr::glimpse(cleaned_df)
Other Import and Export:
copy_df()
,
create_dt()
,
export()
,
import_query()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.