Description Usage Arguments Value Examples
View source: R/padis_specific_functions.R
This function is very specific and takes as input only the two data frames daily and intake raw data. It will then return the five data sets, named 1. "par_data", 2. "psp_long", 3. "day_data", 4. "issue_long", 5. "selection_long")
| 1 2 | transform_data(daily_data, intake_data, write_to = "workspace",
  overwrite = FALSE, folder = NULL)
 | 
| daily_data | The Daily Raw data | 
| intake_data | The Raw Intake data | 
| write_to | Where the results should be written to. Can either be "workspace" (default), "xlsx", or "csv". The last two write the resulting data frames into the working directory either as .xlsx-files or .csv-files | 
| overwrite | Logical, should an existing data frame/object be overwritten? Default is to  | 
| folder | The folder in which the resulting data sets should be written. If no folder is specified, the current working directory (result of  | 
The function returns the five different data sets in long format
| 1 2 3 4 5 | ## not run
# these examples work only with the correct data frames
data_dy <- read.csv("Raw Diary Selection Data.csv", sep = ";", stringsAsFactors = FALSE)
data_in <- xlsx::read.xlsx("Raw Intake Sample.xlsx", 1)
transform_data(data_dy, data_in)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.