From 0d0eeb2d251aaaa64fcd35a70a2d3f55734eeebf Mon Sep 17 00:00:00 2001 From: CharlesEtienneLavoie <116216831+CharlesEtienneLavoie@users.noreply.github.com> Date: Mon, 12 Feb 2024 17:50:35 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20CharlesE?= =?UTF-8?q?tienneLavoie/celflow@cbadec1482451ab83abecb22cf2cceae40e97d16?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgdown.yml | 2 +- reference/clean_ending.html | 129 ++++++++++++++++++++++++++++++++++++ reference/index.html | 5 ++ search.json | 2 +- sitemap.xml | 3 + 5 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 reference/clean_ending.html diff --git a/pkgdown.yml b/pkgdown.yml index c545d7f..32245ba 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2024-02-07T19:36Z +last_built: 2024-02-12T17:50Z urls: reference: https://charlesetiennelavoie.github.io/celflow/reference article: https://charlesetiennelavoie.github.io/celflow/articles diff --git a/reference/clean_ending.html b/reference/clean_ending.html new file mode 100644 index 0000000..16d20f4 --- /dev/null +++ b/reference/clean_ending.html @@ -0,0 +1,129 @@ + +Filter Dataset Based on Ending Status — clean_ending • celflow + Skip to contents + + +
+
+
+ +
+

clean_ending function is designed to filter a dataset +based on the status of the "Ending" variable. It allows users to either +include or exclude observations where the Ending is NA or explicitly marked +as "Normal". This function provides a simple yet effective method for focusing +analyses on subsets of data that meet specific criteria related to their +conclusion status.

+
+ +
+

Usage

+
clean_ending(data, keep_na = TRUE)
+
+ +
+

Arguments

+
data
+

The dataset to be filtered.

+ + +
keep_na
+

Logical value indicating whether to keep observations where +the Ending is NA. If TRUE, observations where Ending is NA or "Normal" are kept. +If FALSE, only observations where Ending is "Normal" are kept (default is TRUE).

+ +
+
+

Value

+ + +

A filtered dataset based on the specified criteria for the Ending status. +Additionally, it reports the number of observations before and after filtering, +as well as the number of observations filtered out.

+
+
+

References

+

Add references here.

+
+ +
+

Examples

+
if (FALSE) {
+# Generate a dataset
+df <- data.frame(ID = 1:5,
+                 Score = c(100, 85, 90, NA, 95),
+                 Ending = c("Normal", "Abnormal", NA, "Normal", "Critical"))
+
+# Filter the dataset to keep only "Normal" or NA endings
+filtered_df <- clean_ending(df, keep_na = TRUE)
+
+# Filter the dataset to keep only "Normal" endings, excluding NAs
+filtered_df_no_na <- clean_ending(df, keep_na = FALSE)
+}
+
+
+
+ + +
+ + + + + + + diff --git a/reference/index.html b/reference/index.html index 55d9734..735a95a 100644 --- a/reference/index.html +++ b/reference/index.html @@ -63,6 +63,11 @@

All functionsclean_ending() + +
Filter Dataset Based on Ending Status
+
+ clean_env()
Clean Global Environment with Exceptions
diff --git a/search.json b/search.json index 8db17d0..75379de 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://charlesetiennelavoie.github.io/celflow/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 CEL authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charles-Étienne Lavoie. Author, maintainer.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lavoie C (2024). celflow: Helpers Good Practices Data Preparation. R package version 0.0.0.9000, https://charlesetiennelavoie.github.io/celflow/, https://github.com/CharlesEtienneLavoie/celflow.","code":"@Manual{, title = {celflow: Helpers For Good Practices In Data Preparation}, author = {Charles-Étienne Lavoie}, year = {2024}, note = {R package version 0.0.0.9000, https://charlesetiennelavoie.github.io/celflow/}, url = {https://github.com/CharlesEtienneLavoie/celflow}, }"},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"celflow","dir":"","previous_headings":"","what":"Helpers For Good Practices In Data Preparation","title":"Helpers For Good Practices In Data Preparation","text":"goal celflow provide comprehensive set tools functions optimizing workflow psychology research, specifically focusing data preparation cleaning. package aims streamline simplify process preparing data analysis, enabling researchers follow good practices adhere established standards field. leveraging functionality celflow, researchers can benefit efficient standardized methods data manipulation, transformation, quality control. package offers collection functions address common challenges encountered data preparation phase, handling missing values, managing outliers, recoding variables, conducting data checks. celflow, researchers can ensure integrity reliability data, reducing potential errors enhancing overall quality analyses. package promotes good data management practices facilitates creation reproducible research pipelines, contributing transparency replicability psychological research.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Helpers For Good Practices In Data Preparation","text":"can install development version celflow like :","code":"# If package `remotes` isn't already installed, install it with `install.packages(\"remotes\")` remotes::install_github(\"CharlesEtienneLavoie/celflow\")"},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Helpers For Good Practices In Data Preparation","text":"basic example shows simulate power Structural Equation Model (SEM) using simulate_power function provided celflow:","code":"library(celflow) library(lavaan) #> This is lavaan 0.6-15 #> lavaan is FREE software! Please report any bugs. # Define the lavaan model with population estimate values modpop <- ' M ~ 0.40*X Y ~ 0.30*M ' # Define the lavaan model that will be tested in each simulation mod <- ' M ~ X Y ~ M ' # Use the `simulate_power` function to perform power analysis # Assume we will perform 10 simulations and generate 5 observations in each simulation simulate_power(modpop, mod, ksim = 10, nobs = 5) #> lhs op rhs est se z pvalue ci.lower ci.upper Parameter #> 1 M ~ X 0.613 0.471 1.301 0.193 -0.310 1.537 M ~ X #> 2 Y ~ M -0.185 0.190 -0.975 0.330 -0.557 0.187 Y ~ M #> 3 M ~~ M 1.088 0.688 1.581 0.114 -0.261 2.437 M ~~ M #> 4 Y ~~ Y 0.262 0.166 1.581 0.114 -0.063 0.587 Y ~~ Y #> 5 X ~~ X 0.979 0.000 NA NA 0.979 0.979 X ~~ X #> 6 M ~ X 1.050 0.265 3.964 0.000 0.531 1.569 M ~ X #> 7 Y ~ M 0.019 0.254 0.076 0.939 -0.479 0.518 Y ~ M #> 8 M ~~ M 0.317 0.200 1.581 0.114 -0.076 0.709 M ~~ M #> 9 Y ~~ Y 0.424 0.268 1.581 0.114 -0.102 0.949 Y ~~ Y #> 10 X ~~ X 0.903 0.000 NA NA 0.903 0.903 X ~~ X #> 11 M ~ X 0.377 1.049 0.360 0.719 -1.679 2.434 M ~ X #> 12 Y ~ M 0.371 0.350 1.062 0.288 -0.314 1.056 Y ~ M #> 13 M ~~ M 0.931 0.589 1.581 0.114 -0.223 2.084 M ~~ M #> 14 Y ~~ Y 0.583 0.369 1.581 0.114 -0.140 1.306 Y ~~ Y #> 15 X ~~ X 0.169 0.000 NA NA 0.169 0.169 X ~~ X #> 16 M ~ X 0.500 0.154 3.251 0.001 0.198 0.801 M ~ X #> 17 Y ~ M 1.887 0.134 14.087 0.000 1.625 2.150 Y ~ M #> 18 M ~~ M 0.169 0.107 1.581 0.114 -0.040 0.378 M ~~ M #> 19 Y ~~ Y 0.047 0.030 1.581 0.114 -0.011 0.106 Y ~~ Y #> 20 X ~~ X 1.428 0.000 NA NA 1.428 1.428 X ~~ X #> 21 M ~ X 0.103 0.255 0.405 0.686 -0.397 0.603 M ~ X #> 22 Y ~ M 0.099 0.347 0.285 0.776 -0.581 0.778 Y ~ M #> 23 M ~~ M 0.385 0.244 1.581 0.114 -0.092 0.863 M ~~ M #> 24 Y ~~ Y 0.239 0.151 1.581 0.114 -0.057 0.535 Y ~~ Y #> 25 X ~~ X 1.184 0.000 NA NA 1.184 1.184 X ~~ X #> 26 M ~ X 0.506 0.611 0.827 0.408 -0.693 1.704 M ~ X #> 27 Y ~ M 0.513 0.290 1.768 0.077 -0.056 1.082 Y ~ M #> 28 M ~~ M 2.018 1.277 1.581 0.114 -0.484 4.520 M ~~ M #> 29 Y ~~ Y 0.966 0.611 1.581 0.114 -0.232 2.164 Y ~~ Y #> 30 X ~~ X 1.080 0.000 NA NA 1.080 1.080 X ~~ X #> 31 M ~ X 0.669 0.321 2.083 0.037 0.040 1.298 M ~ X #> 32 Y ~ M 0.415 0.318 1.307 0.191 -0.207 1.037 Y ~ M #> 33 M ~~ M 0.617 0.390 1.581 0.114 -0.148 1.381 M ~~ M #> 34 Y ~~ Y 0.581 0.367 1.581 0.114 -0.139 1.301 Y ~~ Y #> 35 X ~~ X 1.197 0.000 NA NA 1.197 1.197 X ~~ X #> 36 M ~ X 0.296 0.259 1.145 0.252 -0.211 0.803 M ~ X #> 37 Y ~ M 1.003 0.453 2.214 0.027 0.115 1.891 Y ~ M #> 38 M ~~ M 0.241 0.152 1.581 0.114 -0.058 0.540 M ~~ M #> 39 Y ~~ Y 0.312 0.197 1.581 0.114 -0.075 0.699 Y ~~ Y #> 40 X ~~ X 0.720 0.000 NA NA 0.720 0.720 X ~~ X #> 41 M ~ X 0.700 0.448 1.562 0.118 -0.178 1.578 M ~ X #> 42 Y ~ M 0.407 0.433 0.939 0.348 -0.442 1.256 Y ~ M #> 43 M ~~ M 0.694 0.439 1.581 0.114 -0.166 1.555 M ~~ M #> 44 Y ~~ Y 0.970 0.613 1.581 0.114 -0.232 2.172 Y ~~ Y #> 45 X ~~ X 0.692 0.000 NA NA 0.692 0.692 X ~~ X #> 46 M ~ X -2.695 1.207 -2.234 0.025 -5.060 -0.330 M ~ X #> 47 Y ~ M -0.369 0.206 -1.793 0.073 -0.773 0.034 Y ~ M #> 48 M ~~ M 0.391 0.247 1.581 0.114 -0.094 0.875 M ~~ M #> 49 Y ~~ Y 0.165 0.105 1.581 0.114 -0.040 0.371 Y ~~ Y #> 50 X ~~ X 0.054 0.000 NA NA 0.054 0.054 X ~~ X"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean and filter survey responses — clean_answers","title":"Clean and filter survey responses — clean_answers","text":"function cleans filters survey response data based variety user-specified criteria. includes filtering based distribution channel, progress threshold, response date.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean and filter survey responses — clean_answers","text":"","code":"clean_answers( data, apply_channel_filter = TRUE, channel_keep = \"anonymous\", apply_progress_filter = TRUE, progress_threshold = 60, apply_date_filter = TRUE, date_variable = \"StartDate\", date_filter = c(year = 2023, month = NULL, day = NULL) )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean and filter survey responses — clean_answers","text":"data data.frame containing survey response data. apply_channel_filter Logical; TRUE, filter responses based distribution channel. channel_keep name distribution channel keep. Responses channels excluded. apply_progress_filter Logical; TRUE, filter responses based progress threshold. progress_threshold minimum required progress response included cleaned data. apply_date_filter Logical; TRUE, filter responses based response date. date_variable name column data.frame containing response dates. date_filter list specifying earliest date (year, month, day) include cleaned data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean and filter survey responses — clean_answers","text":"data.frame cleaned survey response data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean and filter survey responses — clean_answers","text":"","code":"if (FALSE) { cleaned_data <- clean_answers(data = survey_data, apply_channel_filter = TRUE, channel_keep = \"anonymous\", apply_progress_filter = TRUE, progress_threshold = 60, apply_date_filter = TRUE, date_variable = \"StartDate\", date_filter = c(year = 2023, month = NULL, day = NULL)) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Attention Check Failures in a Dataset — clean_attention","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"clean_attention function identifies removes responses participants failed attention checks survey dataset. operates comparing participant responses set correct answers. can configured treat missing responses incorrect. function calculates total number correct responses per participant removes participants reach specified minimum number correct answers.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"","code":"clean_attention( data, questions, correct_answers, min_correct = 1, set_missing_to_zero = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"data dataframe attention check failures need identified removed. questions character vector column names dataframe represent questions used attention checks. correct_answers numeric vector correct answers attention check questions. Must length questions vector. min_correct minimum number correct answers participant must retained dataframe (default 1). set_missing_to_zero logical value indicating whether missing responses treated incorrect (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"dataframe responses participants failed attention checks removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( q1 = c(1, 2, 3, 2, 2, 1, 3, 2, 1, 2), q2 = c(2, 2, 3, 1, 2, 3, 2, 3, 1, 2), q3 = c(3, 2, 1, 2, 2, 3, 1, 3, 2, 1) ) # Specify the correct answers correct_answers <- c(2, 3, 1) # Clean the data clean_data <- clean_attention(df, questions = c(\"q1\", \"q2\", \"q3\"), correct_answers = correct_answers, min_correct = 2, set_missing_to_zero = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Global Environment with Exceptions — clean_env","title":"Clean Global Environment with Exceptions — clean_env","text":"clean_env function designed clean global environment objects except specified type name.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Global Environment with Exceptions — clean_env","text":"","code":"clean_env(keep_types = NULL, keep_objects = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Global Environment with Exceptions — clean_env","text":"keep_types vector classes. Objects global environment classes removed. Default NULL. keep_objects vector character strings. Objects global environment names removed. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Global Environment with Exceptions — clean_env","text":"NULL. function called side effect cleaning global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Clean Global Environment with Exceptions — clean_env","text":"function gets objects global environment, removes objects based keep_types keep_objects parameters. remaining objects removed global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Global Environment with Exceptions — clean_env","text":"Add relevant references .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Global Environment with Exceptions — clean_env","text":"","code":"if (FALSE) { # Generate some objects a <- 1 b <- \"hello\" c <- list(1, 2, 3) # Clean the environment but keep lists and the object named 'a' clean_env(keep_types = \"list\", keep_objects = \"a\") }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"clean_na function designed handle missing data given dataset excluding variables observations based provided parameters. provides flexible comprehensive approach handling missing data allowing exclude variables based patterns names filter observations percentage missing data specified threshold. Additionally, can perform MCAR (Missing Completely Random) test requested.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"","code":"clean_na( data, scenario_based_vars = NULL, missing_threshold = 60, full_names = FALSE, MCAR = FALSE, main_vars = NULL, answers_only = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"data dataset cleaned. scenario_based_vars Character vector base names full names variables exclude dataset. Can also numeric vector column indices removed. missing_threshold Percentage threshold missing data per observation (defaults 60 percent). full_names Logical value indicating whether scenario_based_vars full names variables (default FALSE). MCAR Logical value indicating whether perform MCAR test (defaults FALSE). main_vars Character vector base names variables include MCAR test. NULL, variables included (default NULL). answers_only Logical value indicating whether exclude non-answer variables (variables contain number 'demo' 'Demo' name). TRUE, variables treated way scenario-based variables.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"dataset cleaned missing data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"","code":"if (FALSE) { # Generate some objects df <- data.frame(a = c(1, 2, NA, 4, 5), b = c(\"one\", \"two\", \"three\", NA, \"five\"), c = c(NA, NA, 3, 4, 5)) # Clean the environment but keep lists and the object named 'a' clean_na(df, missing_threshold = 50, MCAR = TRUE, answers_only = FALSE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Speed Outliers in a Dataset — clean_speed","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"clean_speed function identifies removes speed outliers given dataset based Median Absolute Deviation (MAD). function can identify \"fast\" \"slow\" outliers, depending parameter settings. prints number identified outliers, initial number observations, final number observations removing outliers, number observations removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"","code":"clean_speed(data, duration_var, remove_slow = FALSE)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"data dataset speed outliers need identified removed. duration_var variable dataset used identify outliers. remove_slow logical value decide slow outliers removed (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"dataset speed outliers removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( duration = c(1, 2, 3, 4, 5, 6, 1000, 2000, 50000, -50, -200), other_var = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) ) # Remove speed outliers from the data clean_data <- clean_speed(df, duration_var = \"duration\", remove_slow = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Base Names from Dataset Variable Names — get_base_names","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"function extracts base names variable names dataset optionally, demo variable names.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"","code":"get_base_names( dataset, underscore_count = NULL, keep_qualtrics_vars = FALSE, other_vars_removal = NULL, use_numbers = TRUE, exclude_demo = TRUE, exclude_check = TRUE, keyword_exclude = NULL, extract_demo = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"dataset dataset variable names extracted. underscore_count number underscores consider extracting base names (default NULL). keep_qualtrics_vars Logical value indicating whether keep Qualtrics variables (default FALSE). other_vars_removal character vector specifying additional variables exclude extraction process (default NULL). use_numbers Logical value indicating whether append numbers base names (default TRUE). exclude_demo Logical value indicating whether exclude variables containing 'dem' 'demo' (default TRUE). exclude_check Logical value indicating whether exclude variables containing 'check' (default TRUE). keyword_exclude string indicating keyword exclude variable names (default NULL). extract_demo Logical value indicating whether return list variables contain 'dem' 'demo' (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"character vector containing unique base names extracted dataset variable names, list containing base names demo variable names extract_demo TRUE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"function takes dataset input extracts base names variable names. allows flexibility handling variable names underscores specifying number underscores consider. default, function removes Qualtrics variables commonly found survey data, behavior can modified keep_qualtrics_vars argument. Additional variables specified user can also excluded. function can also append numbers base names use_numbers set TRUE. Variables 'dem' 'demo' can excluded separately extracted extract_demo TRUE. Variables 'check' user-defined keyword can also excluded.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"","code":"dataset <- data.frame(Age_1 = c(25, 30, 35), Gender_1 = c(\"Male\", \"Female\", \"Male\"), Income_1 = c(50000, 60000, 70000), Age_2 = c(40, 45, 50), Gender_2 = c(\"Female\", \"Male\", \"Female\"), Income_2 = c(80000, 90000, 100000)) get_base_names(dataset, underscore_count = 1) #> [1] \"Age\" \"Gender\" \"Income\""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Specified Files from Working Directory — get_files","title":"Retrieve Specified Files from Working Directory — get_files","text":"get_files function generates list files (default .csv, can optionally set .sav) working directory contain specified keyword names. keyword provided, returns files specified type.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Specified Files from Working Directory — get_files","text":"","code":"get_files(keyword = NULL, filetype = \"csv\")"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Specified Files from Working Directory — get_files","text":"keyword character string. files containing keyword names included returned list. search case-sensitive. Default NULL. filetype character string. Specifies type files retrieved. Can \"csv\" (default) \"sav\".","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Specified Files from Working Directory — get_files","text":"character vector file names matched criteria.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve Specified Files from Working Directory — get_files","text":"function uses list.files() grepl() functions retrieve files specified type working directory. keyword provided, filters list include files whose names contain keyword.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Retrieve Specified Files from Working Directory — get_files","text":"function relies base R functions list.files() grepl().","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve Specified Files from Working Directory — get_files","text":"","code":"if (FALSE) { # Assume we have the following files in our working directory: # \"Alcohol_Study1.csv\", \"Alcohol_Study2.csv\", \"Other_Study.sav\" # Get all 'Alcohol' related .csv files get_files(\"Alcohol\") # This will return: c(\"Alcohol_Study1.csv\", \"Alcohol_Study2.csv\") # Get all .sav files get_files(filetype = \"sav\") # This will return: c(\"Other_Study.sav\") }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Install and Load GitHub Packages — get_git_packages","title":"Install and Load GitHub Packages — get_git_packages","text":"function installs loads R packages GitHub repositories. checks specified packages already installed. package installed, downloaded, installed, loaded R environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install and Load GitHub Packages — get_git_packages","text":"","code":"get_git_packages(git_packages)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install and Load GitHub Packages — get_git_packages","text":"git_packages vector GitHub repositories corresponding packages installed loaded. repository specified string format \"username/repository\".","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install and Load GitHub Packages — get_git_packages","text":"return value. Called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Install and Load GitHub Packages — get_git_packages","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install and Load GitHub Packages — get_git_packages","text":"","code":"if (FALSE) { get_git_packages(c(\"CharlesEtienneLavoie/CEL\", 'rempsyc/rempsyc')) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"function computes mean scores specified scales derived given data frame. scales anticipated represented columns data frame begin base name specified scale list. Items require reverse scoring (identified \"reverse\" \"Reverse\" item name) automatically reversed calculating mean. option provided rename reversed scored items. clustering variable specified, function also computes cluster-level means newly computed variable.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"","code":"get_means( data, scale_list, reverse_score = TRUE, rename_reversed_items = FALSE, order = 1, cluster = NULL )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"data data frame containing scales items. scale_list vector characters representing base names scales compute. reverse_score logical indicating whether reverse scoring applied. Default TRUE. rename_reversed_items logical indicating whether rename reverse scored items replacing \"reverse\" \"reversed\". Default FALSE. order integer indicating order scale. Use 1 first order scales 2 second order scales. Default 1. cluster character string representing column name used clustering. provided, function computes cluster-level means new variable. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"data frame new columns computed mean scale scores. cluster variable provided, additional columns representing cluster-level mean variables added.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Install and Load R Packages — get_packages","title":"Install and Load R Packages — get_packages","text":"function installs loads R packages. checks specified packages already installed. package installed, downloaded CRAN, installed, loaded R environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install and Load R Packages — get_packages","text":"","code":"get_packages(packages)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install and Load R Packages — get_packages","text":"packages character vector package names installed loaded.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install and Load R Packages — get_packages","text":"return value. Called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Install and Load R Packages — get_packages","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install and Load R Packages — get_packages","text":"","code":"if (FALSE) { get_packages(c(\"ggplot2\", \"dplyr\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"get_processed_list function takes character vector variable names selects processed version base variable name, option exclude variables undergone certain transformations indicated '.t' names. processed version variable considered one suffixes (segments separated \".\"), excluding '.t' segments specified.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"","code":"get_processed_list(var_list, include_t = TRUE)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"var_list character vector variable names, base variable name processing stages separated dots. include_t logical value indicating whether include variables transformation stages ('.t'). Defaults TRUE. FALSE, variables '.t' names excluded consideration.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"character vector containing processed version base variable name input list, according specified criteria.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"function particularly useful scenarios multiple versions variable exist dataset, need select processed version , without transformation stages. allows greater control selection variables analysis. output order preserved based order base variable names input list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"","code":"if (FALSE) { # Variable list with different processing stages, including transformations var_list <- c(\"var1\", \"var1.a\", \"var1.a.b\", \"var2\", \"var2.a\", \"var1.a.b.t\") # Get the most processed version of each variable, excluding transformations processed_list <- get_processed_list(var_list, include_t = FALSE) # Get the most processed version of each variable, including transformations processed_list_with_t <- get_processed_list(var_list, include_t = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Base Scale Names — get_scale_names","title":"Create Base Scale Names — get_scale_names","text":"function generates base scale names list scales, keeping first parts scale name specified user. scales separated parts underscore (_). Scales fewer parts specified minimum filtered .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Base Scale Names — get_scale_names","text":"","code":"get_scale_names(scale_list, min_parts = 3, parts_to_keep = 2)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Base Scale Names — get_scale_names","text":"scale_list character vector names scales processed. min_parts minimum number parts scale must included. Default 3. parts_to_keep number parts keep base scale name. Default 2.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Base Scale Names — get_scale_names","text":"character vector base scale names.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Base Scale Names — get_scale_names","text":"scale scale list, function splits scale name parts based underscore (_). keeps first parts specified user combines back base scale name. base scale names returned unique list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Base Scale Names — get_scale_names","text":"(Optional)","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Base Scale Names — get_scale_names","text":"","code":"# Assuming scales is your list of scales base_scales <- get_scale_names(scales, min_parts = 3, parts_to_keep = 2) #> Error in eval(expr, envir, enclos): object 'scales' not found"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert List to String — get_string","title":"Convert List to String — get_string","text":"function takes list variables input converts string representation, enclosed within c(). useful dealing formatted printing vector/list user-friendly manner.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert List to String — get_string","text":"","code":"get_string(var_list)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert List to String — get_string","text":"var_list list vector items converted string.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert List to String — get_string","text":"Prints string representation input list. However, function return value; called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert List to String — get_string","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert List to String — get_string","text":"","code":"if (FALSE) { get_string(c(\"var1\", \"var2\", \"var3\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"transform_and_update function takes dataset vector variable names, applies bestNormalize function variable, creates transformed versions variables necessary, updates dataset variable list accordingly. returns list containing updated dataset updated variable list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"","code":"get_transformation(data, var_list, seed = 100)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"data dataframe bestNormalize function applied. var_list character vector variable names. seed single value, interpreted integer, set random seed reproducibility.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"list two elements: data containing updated dataframe var_list containing updated variable list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( daily_sat_aut = rnorm(100), daily_fru_aut = rnorm(100), daily_sat_rel = rnorm(100), daily_fru_rel = rnorm(100) ) # Apply the `bestNormalize` function and update dataset result <- transform_and_update(df, var_list = c(\"daily_sat_aut\", \"daily_fru_aut\", \"daily_sat_rel\", \"daily_fru_rel\")) updated_df <- result$data updated_var_list <- result$var_list }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"function performs winsorization given vector x based median absolute deviation (MAD). replaces extreme values (beyond criteria number MADs median) highest/lowest non-extreme value. outliers vector based MAD criterion, function returns NULL prints message console.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"","code":"get_winsorization(x, criteria = 3)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"x numeric vector winsorize. criteria number MADs median beyond values considered outliers. Defaults 3.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"winsorized vector outliers based MAD criterion, otherwise NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"statistical analysis, winsorization can useful limiting effect outliers data. implementation uses MAD, robust measure variability, determine data points considered outliers.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"","code":"# Generate a vector with a few extreme values set.seed(123) x <- c(rnorm(100), 10, -10) # Winsorize the vector x_winsorized <- get_winsorization(x, criteria = 3)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute Data Using MissForest — impute_data","title":"Impute Data Using MissForest — impute_data","text":"impute_data function performs imputation numeric variables given dataset using MissForest algorithm. function excludes certain variables, termed \"scenario-based\" variables, imputation process. variables presented participants certain conditions might naturally contain NA values.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute Data Using MissForest — impute_data","text":"","code":"impute_data( data, scenario_based_vars = NULL, cores = 4, seed = 100, answers_only = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute Data Using MissForest — impute_data","text":"data dataset imputed. scenario_based_vars character numeric vector representing variable names indices excluded imputation process. scenario-based variables. Defaults NULL. cores number CPU cores used parallel processing. Default 4. seed seed reproducibility. Default 100. answers_only Logical value indicating whether include variables number word 'demo'/'Demo' names imputation process. Default FALSE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute Data Using MissForest — impute_data","text":"dataset imputed values, maintaining column order original data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Impute Data Using MissForest — impute_data","text":"Add relevant references .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute Data Using MissForest — impute_data","text":"","code":"if (FALSE) { # Use the function imputed_data <- impute_data(DataM, scenario_based_vars = c(\"WFC.CHECKLIST_1:CopeClosure\", \"PROLIFIC_PID:correct_answer_total\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Qualtrics Data Files — process_qualtrics_files","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"function reads processes series CSV files exported Qualtrics. assumes first two rows file contain metadata actual data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"","code":"process_qualtrics_files(data_files, rename_files = FALSE, new_names = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"data_files character vector file paths CSV files processed. rename_files Logical. TRUE, data labels file saved new name based original file name. Default FALSE. new_names character vector new names files. length data_files. NULL rename_files TRUE, new names generated removing timestamp anything original file name. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"function return anything. writes processed data labels CSV files assigns resulting data frames new variables global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"","code":"if (FALSE) { process_qualtrics_files(c(\"file1.csv\", \"file2.csv\"), rename_files = TRUE, new_names = c(\"survey1\", \"survey2\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove Specific Objects from Global Environment — remove_env_objects","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"function removes specified objects global environment R.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"","code":"remove_env_objects(remove_objects = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"remove_objects character vector specifying names objects removed. NULL (default), objects removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"function return anything. removes specified objects global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"","code":"if (FALSE) { # create some objects x <- 1:10 y <- letters z <- rnorm(100) # remove 'x' and 'y' remove_env_objects(c(\"x\", \"y\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":null,"dir":"Reference","previous_headings":"","what":"Report Descriptive Statistics for Demographics — report_additional_demographics","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"report_additional_demographics function generates summary report descriptive statistics (counts percentages) demographic variables income, employment status, weekly alcohol units.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"","code":"report_additional_demographics( data, income = NULL, empl_status = NULL, alcohol_units = NULL )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"data dataframe contains demographic variables. income string represents name income variable data (default: NULL). empl_status string represents name employment status variable data (default: NULL). alcohol_units string represents name weekly alcohol units variable data (default: NULL).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"string containing descriptive statistics demographic variable provided.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"function allows demographic optional. demographic parameter set null (default), function perform operations related demographic. valid demographic variable name passed parameter, function calculate number instances corresponding percentage category given demographic variable.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"","code":"if (FALSE) { data <- data.frame( demo_income_c = sample(c(\"$100,001 - $125,000\", \"$125,001 - $150,000\"), 100, replace = TRUE), demo_empl_status_c = sample(c(\"Full-time\", \"Part-time\"), 100, replace = TRUE), demo_alcohol_units_c = sample(c(\"1-4\", \"5-9\"), 100, replace = TRUE) ) report_additional_demographics( data = data, income = \"demo_income_c\", empl_status = \"demo_empl_status_c\", alcohol_units = \"demo_alcohol_units_c\" ) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"root_apply function takes dataset vector root names applies specified function subset variables match root name number end name. returns list results root name. function fails particular root name, returns NA root name prints message error.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"","code":"root_apply(dataset, root_names, fun, ...)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"dataset dataset function needs applied. root_names character vector root names. fun function apply subset variables root name. ... Additional arguments function.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"list element result applying fun subset variables match root name number end name. element list named root name.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( daily_sat_aut_1 = rnorm(100), daily_sat_aut_2 = rnorm(100), daily_fru_aut_1 = rnorm(100), daily_fru_aut_2 = rnorm(100), daily_sat_rel_1 = rnorm(100), daily_sat_rel_2 = rnorm(100), daily_fru_rel_1 = rnorm(100), daily_fru_rel_2 = rnorm(100) ) # Apply the mean function to the subsets of variables results <- root_apply(df, root_names = c(\"daily_sat_aut_reversed\", \"daily_fru_aut\", \"daily_sat_rel\"), fun = mean) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"Compute Power Analysis SEM Model Using Monte Carlo Simulation","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"","code":"simulate_power(model.population, model, ksim = 10, nobs = 100)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"model.population lavaan model population estimate values specified. model lavaan model tested simulation ksim many simulations function perform nobs many observations generate simulation","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"table.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"function uses simulate_data function lavaan package perform monte carlo simulation. mean, std error, z value, p value confidence intervals computed reported table parameter.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"","code":"library(lavaan) #> This is lavaan 0.6-17 #> lavaan is FREE software! Please report any bugs. modpop <- ' M ~ 0.40*X Y ~ 0.30*M ' mod <- ' M ~ X Y ~ M ' simulate_power(modpop, mod) #> lhs op rhs est se z pvalue ci.lower ci.upper Parameter #> 1 M ~ X 0.310 0.099 3.132 0.002 0.116 0.504 M ~ X #> 2 Y ~ M 0.318 0.094 3.382 0.001 0.134 0.502 Y ~ M #> 3 M ~~ M 0.963 0.136 7.071 0.000 0.696 1.230 M ~~ M #> 4 Y ~~ Y 0.933 0.132 7.071 0.000 0.675 1.192 Y ~~ Y #> 5 X ~~ X 0.982 0.000 NA NA 0.982 0.982 X ~~ X #> 6 M ~ X 0.263 0.111 2.384 0.017 0.047 0.480 M ~ X #> 7 Y ~ M 0.440 0.095 4.649 0.000 0.254 0.625 Y ~ M #> 8 M ~~ M 1.032 0.146 7.071 0.000 0.746 1.318 M ~~ M #> 9 Y ~~ Y 0.975 0.138 7.071 0.000 0.705 1.245 Y ~~ Y #> 10 X ~~ X 0.845 0.000 NA NA 0.845 0.845 X ~~ X #> 11 M ~ X 0.375 0.096 3.885 0.000 0.186 0.564 M ~ X #> 12 Y ~ M 0.301 0.096 3.135 0.002 0.113 0.489 Y ~ M #> 13 M ~~ M 1.000 0.141 7.071 0.000 0.723 1.277 M ~~ M #> 14 Y ~~ Y 1.060 0.150 7.071 0.000 0.767 1.354 Y ~~ Y #> 15 X ~~ X 1.075 0.000 NA NA 1.075 1.075 X ~~ X #> 16 M ~ X 0.543 0.094 5.753 0.000 0.358 0.728 M ~ X #> 17 Y ~ M 0.321 0.100 3.226 0.001 0.126 0.516 Y ~ M #> 18 M ~~ M 0.841 0.119 7.071 0.000 0.608 1.074 M ~~ M #> 19 Y ~~ Y 1.109 0.157 7.071 0.000 0.802 1.417 Y ~~ Y #> 20 X ~~ X 0.944 0.000 NA NA 0.944 0.944 X ~~ X #> 21 M ~ X 0.448 0.095 4.693 0.000 0.261 0.635 M ~ X #> 22 Y ~ M 0.425 0.095 4.488 0.000 0.240 0.611 Y ~ M #> 23 M ~~ M 0.859 0.122 7.071 0.000 0.621 1.097 M ~~ M #> 24 Y ~~ Y 0.941 0.133 7.071 0.000 0.680 1.202 Y ~~ Y #> 25 X ~~ X 0.944 0.000 NA NA 0.944 0.944 X ~~ X #> 26 M ~ X 0.434 0.086 5.027 0.000 0.265 0.603 M ~ X #> 27 Y ~ M 0.343 0.100 3.444 0.001 0.148 0.539 Y ~ M #> 28 M ~~ M 0.921 0.130 7.071 0.000 0.666 1.177 M ~~ M #> 29 Y ~~ Y 1.146 0.162 7.071 0.000 0.828 1.464 Y ~~ Y #> 30 X ~~ X 1.236 0.000 NA NA 1.236 1.236 X ~~ X #> 31 M ~ X 0.668 0.091 7.364 0.000 0.490 0.846 M ~ X #> 32 Y ~ M 0.307 0.080 3.829 0.000 0.150 0.464 Y ~ M #> 33 M ~~ M 0.818 0.116 7.071 0.000 0.591 1.044 M ~~ M #> 34 Y ~~ Y 0.811 0.115 7.071 0.000 0.586 1.035 Y ~~ Y #> 35 X ~~ X 0.993 0.000 NA NA 0.993 0.993 X ~~ X #> 36 M ~ X 0.346 0.110 3.141 0.002 0.130 0.561 M ~ X #> 37 Y ~ M 0.240 0.089 2.697 0.007 0.065 0.414 Y ~ M #> 38 M ~~ M 1.051 0.149 7.071 0.000 0.760 1.342 M ~~ M #> 39 Y ~~ Y 0.911 0.129 7.071 0.000 0.659 1.164 Y ~~ Y #> 40 X ~~ X 0.868 0.000 NA NA 0.868 0.868 X ~~ X #> 41 M ~ X 0.440 0.096 4.600 0.000 0.253 0.628 M ~ X #> 42 Y ~ M 0.280 0.101 2.775 0.006 0.082 0.477 Y ~ M #> 43 M ~~ M 0.868 0.123 7.071 0.000 0.627 1.109 M ~~ M #> 44 Y ~~ Y 1.069 0.151 7.071 0.000 0.773 1.365 Y ~~ Y #> 45 X ~~ X 0.948 0.000 NA NA 0.948 0.948 X ~~ X #> 46 M ~ X 0.286 0.104 2.741 0.006 0.081 0.490 M ~ X #> 47 Y ~ M 0.343 0.099 3.448 0.001 0.148 0.537 Y ~ M #> 48 M ~~ M 1.131 0.160 7.071 0.000 0.817 1.444 M ~~ M #> 49 Y ~~ Y 1.201 0.170 7.071 0.000 0.868 1.533 Y ~~ Y #> 50 X ~~ X 1.041 0.000 NA NA 1.041 1.041 X ~~ X"}] +[{"path":"https://charlesetiennelavoie.github.io/celflow/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 CEL authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charles-Étienne Lavoie. Author, maintainer.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lavoie C (2024). celflow: Helpers Good Practices Data Preparation. R package version 0.0.0.9000, https://charlesetiennelavoie.github.io/celflow/, https://github.com/CharlesEtienneLavoie/celflow.","code":"@Manual{, title = {celflow: Helpers For Good Practices In Data Preparation}, author = {Charles-Étienne Lavoie}, year = {2024}, note = {R package version 0.0.0.9000, https://charlesetiennelavoie.github.io/celflow/}, url = {https://github.com/CharlesEtienneLavoie/celflow}, }"},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"celflow","dir":"","previous_headings":"","what":"Helpers For Good Practices In Data Preparation","title":"Helpers For Good Practices In Data Preparation","text":"goal celflow provide comprehensive set tools functions optimizing workflow psychology research, specifically focusing data preparation cleaning. package aims streamline simplify process preparing data analysis, enabling researchers follow good practices adhere established standards field. leveraging functionality celflow, researchers can benefit efficient standardized methods data manipulation, transformation, quality control. package offers collection functions address common challenges encountered data preparation phase, handling missing values, managing outliers, recoding variables, conducting data checks. celflow, researchers can ensure integrity reliability data, reducing potential errors enhancing overall quality analyses. package promotes good data management practices facilitates creation reproducible research pipelines, contributing transparency replicability psychological research.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Helpers For Good Practices In Data Preparation","text":"can install development version celflow like :","code":"# If package `remotes` isn't already installed, install it with `install.packages(\"remotes\")` remotes::install_github(\"CharlesEtienneLavoie/celflow\")"},{"path":"https://charlesetiennelavoie.github.io/celflow/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Helpers For Good Practices In Data Preparation","text":"basic example shows simulate power Structural Equation Model (SEM) using simulate_power function provided celflow:","code":"library(celflow) library(lavaan) #> This is lavaan 0.6-15 #> lavaan is FREE software! Please report any bugs. # Define the lavaan model with population estimate values modpop <- ' M ~ 0.40*X Y ~ 0.30*M ' # Define the lavaan model that will be tested in each simulation mod <- ' M ~ X Y ~ M ' # Use the `simulate_power` function to perform power analysis # Assume we will perform 10 simulations and generate 5 observations in each simulation simulate_power(modpop, mod, ksim = 10, nobs = 5) #> lhs op rhs est se z pvalue ci.lower ci.upper Parameter #> 1 M ~ X 0.613 0.471 1.301 0.193 -0.310 1.537 M ~ X #> 2 Y ~ M -0.185 0.190 -0.975 0.330 -0.557 0.187 Y ~ M #> 3 M ~~ M 1.088 0.688 1.581 0.114 -0.261 2.437 M ~~ M #> 4 Y ~~ Y 0.262 0.166 1.581 0.114 -0.063 0.587 Y ~~ Y #> 5 X ~~ X 0.979 0.000 NA NA 0.979 0.979 X ~~ X #> 6 M ~ X 1.050 0.265 3.964 0.000 0.531 1.569 M ~ X #> 7 Y ~ M 0.019 0.254 0.076 0.939 -0.479 0.518 Y ~ M #> 8 M ~~ M 0.317 0.200 1.581 0.114 -0.076 0.709 M ~~ M #> 9 Y ~~ Y 0.424 0.268 1.581 0.114 -0.102 0.949 Y ~~ Y #> 10 X ~~ X 0.903 0.000 NA NA 0.903 0.903 X ~~ X #> 11 M ~ X 0.377 1.049 0.360 0.719 -1.679 2.434 M ~ X #> 12 Y ~ M 0.371 0.350 1.062 0.288 -0.314 1.056 Y ~ M #> 13 M ~~ M 0.931 0.589 1.581 0.114 -0.223 2.084 M ~~ M #> 14 Y ~~ Y 0.583 0.369 1.581 0.114 -0.140 1.306 Y ~~ Y #> 15 X ~~ X 0.169 0.000 NA NA 0.169 0.169 X ~~ X #> 16 M ~ X 0.500 0.154 3.251 0.001 0.198 0.801 M ~ X #> 17 Y ~ M 1.887 0.134 14.087 0.000 1.625 2.150 Y ~ M #> 18 M ~~ M 0.169 0.107 1.581 0.114 -0.040 0.378 M ~~ M #> 19 Y ~~ Y 0.047 0.030 1.581 0.114 -0.011 0.106 Y ~~ Y #> 20 X ~~ X 1.428 0.000 NA NA 1.428 1.428 X ~~ X #> 21 M ~ X 0.103 0.255 0.405 0.686 -0.397 0.603 M ~ X #> 22 Y ~ M 0.099 0.347 0.285 0.776 -0.581 0.778 Y ~ M #> 23 M ~~ M 0.385 0.244 1.581 0.114 -0.092 0.863 M ~~ M #> 24 Y ~~ Y 0.239 0.151 1.581 0.114 -0.057 0.535 Y ~~ Y #> 25 X ~~ X 1.184 0.000 NA NA 1.184 1.184 X ~~ X #> 26 M ~ X 0.506 0.611 0.827 0.408 -0.693 1.704 M ~ X #> 27 Y ~ M 0.513 0.290 1.768 0.077 -0.056 1.082 Y ~ M #> 28 M ~~ M 2.018 1.277 1.581 0.114 -0.484 4.520 M ~~ M #> 29 Y ~~ Y 0.966 0.611 1.581 0.114 -0.232 2.164 Y ~~ Y #> 30 X ~~ X 1.080 0.000 NA NA 1.080 1.080 X ~~ X #> 31 M ~ X 0.669 0.321 2.083 0.037 0.040 1.298 M ~ X #> 32 Y ~ M 0.415 0.318 1.307 0.191 -0.207 1.037 Y ~ M #> 33 M ~~ M 0.617 0.390 1.581 0.114 -0.148 1.381 M ~~ M #> 34 Y ~~ Y 0.581 0.367 1.581 0.114 -0.139 1.301 Y ~~ Y #> 35 X ~~ X 1.197 0.000 NA NA 1.197 1.197 X ~~ X #> 36 M ~ X 0.296 0.259 1.145 0.252 -0.211 0.803 M ~ X #> 37 Y ~ M 1.003 0.453 2.214 0.027 0.115 1.891 Y ~ M #> 38 M ~~ M 0.241 0.152 1.581 0.114 -0.058 0.540 M ~~ M #> 39 Y ~~ Y 0.312 0.197 1.581 0.114 -0.075 0.699 Y ~~ Y #> 40 X ~~ X 0.720 0.000 NA NA 0.720 0.720 X ~~ X #> 41 M ~ X 0.700 0.448 1.562 0.118 -0.178 1.578 M ~ X #> 42 Y ~ M 0.407 0.433 0.939 0.348 -0.442 1.256 Y ~ M #> 43 M ~~ M 0.694 0.439 1.581 0.114 -0.166 1.555 M ~~ M #> 44 Y ~~ Y 0.970 0.613 1.581 0.114 -0.232 2.172 Y ~~ Y #> 45 X ~~ X 0.692 0.000 NA NA 0.692 0.692 X ~~ X #> 46 M ~ X -2.695 1.207 -2.234 0.025 -5.060 -0.330 M ~ X #> 47 Y ~ M -0.369 0.206 -1.793 0.073 -0.773 0.034 Y ~ M #> 48 M ~~ M 0.391 0.247 1.581 0.114 -0.094 0.875 M ~~ M #> 49 Y ~~ Y 0.165 0.105 1.581 0.114 -0.040 0.371 Y ~~ Y #> 50 X ~~ X 0.054 0.000 NA NA 0.054 0.054 X ~~ X"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean and filter survey responses — clean_answers","title":"Clean and filter survey responses — clean_answers","text":"function cleans filters survey response data based variety user-specified criteria. includes filtering based distribution channel, progress threshold, response date.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean and filter survey responses — clean_answers","text":"","code":"clean_answers( data, apply_channel_filter = TRUE, channel_keep = \"anonymous\", apply_progress_filter = TRUE, progress_threshold = 60, apply_date_filter = TRUE, date_variable = \"StartDate\", date_filter = c(year = 2023, month = NULL, day = NULL) )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean and filter survey responses — clean_answers","text":"data data.frame containing survey response data. apply_channel_filter Logical; TRUE, filter responses based distribution channel. channel_keep name distribution channel keep. Responses channels excluded. apply_progress_filter Logical; TRUE, filter responses based progress threshold. progress_threshold minimum required progress response included cleaned data. apply_date_filter Logical; TRUE, filter responses based response date. date_variable name column data.frame containing response dates. date_filter list specifying earliest date (year, month, day) include cleaned data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean and filter survey responses — clean_answers","text":"data.frame cleaned survey response data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_answers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean and filter survey responses — clean_answers","text":"","code":"if (FALSE) { cleaned_data <- clean_answers(data = survey_data, apply_channel_filter = TRUE, channel_keep = \"anonymous\", apply_progress_filter = TRUE, progress_threshold = 60, apply_date_filter = TRUE, date_variable = \"StartDate\", date_filter = c(year = 2023, month = NULL, day = NULL)) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Attention Check Failures in a Dataset — clean_attention","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"clean_attention function identifies removes responses participants failed attention checks survey dataset. operates comparing participant responses set correct answers. can configured treat missing responses incorrect. function calculates total number correct responses per participant removes participants reach specified minimum number correct answers.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"","code":"clean_attention( data, questions, correct_answers, min_correct = 1, set_missing_to_zero = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"data dataframe attention check failures need identified removed. questions character vector column names dataframe represent questions used attention checks. correct_answers numeric vector correct answers attention check questions. Must length questions vector. min_correct minimum number correct answers participant must retained dataframe (default 1). set_missing_to_zero logical value indicating whether missing responses treated incorrect (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"dataframe responses participants failed attention checks removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Attention Check Failures in a Dataset — clean_attention","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( q1 = c(1, 2, 3, 2, 2, 1, 3, 2, 1, 2), q2 = c(2, 2, 3, 1, 2, 3, 2, 3, 1, 2), q3 = c(3, 2, 1, 2, 2, 3, 1, 3, 2, 1) ) # Specify the correct answers correct_answers <- c(2, 3, 1) # Clean the data clean_data <- clean_attention(df, questions = c(\"q1\", \"q2\", \"q3\"), correct_answers = correct_answers, min_correct = 2, set_missing_to_zero = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter Dataset Based on Ending Status — clean_ending","title":"Filter Dataset Based on Ending Status — clean_ending","text":"clean_ending function designed filter dataset based status \"Ending\" variable. allows users either include exclude observations Ending NA explicitly marked \"Normal\". function provides simple yet effective method focusing analyses subsets data meet specific criteria related conclusion status.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter Dataset Based on Ending Status — clean_ending","text":"","code":"clean_ending(data, keep_na = TRUE)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter Dataset Based on Ending Status — clean_ending","text":"data dataset filtered. keep_na Logical value indicating whether keep observations Ending NA. TRUE, observations Ending NA \"Normal\" kept. FALSE, observations Ending \"Normal\" kept (default TRUE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter Dataset Based on Ending Status — clean_ending","text":"filtered dataset based specified criteria Ending status. Additionally, reports number observations filtering, well number observations filtered .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Filter Dataset Based on Ending Status — clean_ending","text":"Add references .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter Dataset Based on Ending Status — clean_ending","text":"","code":"if (FALSE) { # Generate a dataset df <- data.frame(ID = 1:5, Score = c(100, 85, 90, NA, 95), Ending = c(\"Normal\", \"Abnormal\", NA, \"Normal\", \"Critical\")) # Filter the dataset to keep only \"Normal\" or NA endings filtered_df <- clean_ending(df, keep_na = TRUE) # Filter the dataset to keep only \"Normal\" endings, excluding NAs filtered_df_no_na <- clean_ending(df, keep_na = FALSE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Global Environment with Exceptions — clean_env","title":"Clean Global Environment with Exceptions — clean_env","text":"clean_env function designed clean global environment objects except specified type name.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Global Environment with Exceptions — clean_env","text":"","code":"clean_env(keep_types = NULL, keep_objects = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Global Environment with Exceptions — clean_env","text":"keep_types vector classes. Objects global environment classes removed. Default NULL. keep_objects vector character strings. Objects global environment names removed. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Global Environment with Exceptions — clean_env","text":"NULL. function called side effect cleaning global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Clean Global Environment with Exceptions — clean_env","text":"function gets objects global environment, removes objects based keep_types keep_objects parameters. remaining objects removed global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Global Environment with Exceptions — clean_env","text":"Add relevant references .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Global Environment with Exceptions — clean_env","text":"","code":"if (FALSE) { # Generate some objects a <- 1 b <- \"hello\" c <- list(1, 2, 3) # Clean the environment but keep lists and the object named 'a' clean_env(keep_types = \"list\", keep_objects = \"a\") }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"clean_na function designed handle missing data given dataset excluding variables observations based provided parameters. provides flexible comprehensive approach handling missing data allowing exclude variables based patterns names filter observations percentage missing data specified threshold. Additionally, can perform MCAR (Missing Completely Random) test requested.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"","code":"clean_na( data, scenario_based_vars = NULL, missing_threshold = 60, full_names = FALSE, MCAR = FALSE, main_vars = NULL, answers_only = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"data dataset cleaned. scenario_based_vars Character vector base names full names variables exclude dataset. Can also numeric vector column indices removed. missing_threshold Percentage threshold missing data per observation (defaults 60 percent). full_names Logical value indicating whether scenario_based_vars full names variables (default FALSE). MCAR Logical value indicating whether perform MCAR test (defaults FALSE). main_vars Character vector base names variables include MCAR test. NULL, variables included (default NULL). answers_only Logical value indicating whether exclude non-answer variables (variables contain number 'demo' 'Demo' name). TRUE, variables treated way scenario-based variables.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"dataset cleaned missing data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_na.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Dataset Based on Missing Data Threshold and MCAR Test — clean_na","text":"","code":"if (FALSE) { # Generate some objects df <- data.frame(a = c(1, 2, NA, 4, 5), b = c(\"one\", \"two\", \"three\", NA, \"five\"), c = c(NA, NA, 3, 4, 5)) # Clean the environment but keep lists and the object named 'a' clean_na(df, missing_threshold = 50, MCAR = TRUE, answers_only = FALSE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Speed Outliers in a Dataset — clean_speed","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"clean_speed function identifies removes speed outliers given dataset based Median Absolute Deviation (MAD). function can identify \"fast\" \"slow\" outliers, depending parameter settings. prints number identified outliers, initial number observations, final number observations removing outliers, number observations removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"","code":"clean_speed(data, duration_var, remove_slow = FALSE)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"data dataset speed outliers need identified removed. duration_var variable dataset used identify outliers. remove_slow logical value decide slow outliers removed (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"dataset speed outliers removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/clean_speed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Speed Outliers in a Dataset — clean_speed","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( duration = c(1, 2, 3, 4, 5, 6, 1000, 2000, 50000, -50, -200), other_var = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) ) # Remove speed outliers from the data clean_data <- clean_speed(df, duration_var = \"duration\", remove_slow = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Base Names from Dataset Variable Names — get_base_names","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"function extracts base names variable names dataset optionally, demo variable names.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"","code":"get_base_names( dataset, underscore_count = NULL, keep_qualtrics_vars = FALSE, other_vars_removal = NULL, use_numbers = TRUE, exclude_demo = TRUE, exclude_check = TRUE, keyword_exclude = NULL, extract_demo = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"dataset dataset variable names extracted. underscore_count number underscores consider extracting base names (default NULL). keep_qualtrics_vars Logical value indicating whether keep Qualtrics variables (default FALSE). other_vars_removal character vector specifying additional variables exclude extraction process (default NULL). use_numbers Logical value indicating whether append numbers base names (default TRUE). exclude_demo Logical value indicating whether exclude variables containing 'dem' 'demo' (default TRUE). exclude_check Logical value indicating whether exclude variables containing 'check' (default TRUE). keyword_exclude string indicating keyword exclude variable names (default NULL). extract_demo Logical value indicating whether return list variables contain 'dem' 'demo' (default FALSE).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"character vector containing unique base names extracted dataset variable names, list containing base names demo variable names extract_demo TRUE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"function takes dataset input extracts base names variable names. allows flexibility handling variable names underscores specifying number underscores consider. default, function removes Qualtrics variables commonly found survey data, behavior can modified keep_qualtrics_vars argument. Additional variables specified user can also excluded. function can also append numbers base names use_numbers set TRUE. Variables 'dem' 'demo' can excluded separately extracted extract_demo TRUE. Variables 'check' user-defined keyword can also excluded.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_base_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Base Names from Dataset Variable Names — get_base_names","text":"","code":"dataset <- data.frame(Age_1 = c(25, 30, 35), Gender_1 = c(\"Male\", \"Female\", \"Male\"), Income_1 = c(50000, 60000, 70000), Age_2 = c(40, 45, 50), Gender_2 = c(\"Female\", \"Male\", \"Female\"), Income_2 = c(80000, 90000, 100000)) get_base_names(dataset, underscore_count = 1) #> [1] \"Age\" \"Gender\" \"Income\""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Specified Files from Working Directory — get_files","title":"Retrieve Specified Files from Working Directory — get_files","text":"get_files function generates list files (default .csv, can optionally set .sav) working directory contain specified keyword names. keyword provided, returns files specified type.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Specified Files from Working Directory — get_files","text":"","code":"get_files(keyword = NULL, filetype = \"csv\")"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Specified Files from Working Directory — get_files","text":"keyword character string. files containing keyword names included returned list. search case-sensitive. Default NULL. filetype character string. Specifies type files retrieved. Can \"csv\" (default) \"sav\".","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Specified Files from Working Directory — get_files","text":"character vector file names matched criteria.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve Specified Files from Working Directory — get_files","text":"function uses list.files() grepl() functions retrieve files specified type working directory. keyword provided, filters list include files whose names contain keyword.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Retrieve Specified Files from Working Directory — get_files","text":"function relies base R functions list.files() grepl().","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve Specified Files from Working Directory — get_files","text":"","code":"if (FALSE) { # Assume we have the following files in our working directory: # \"Alcohol_Study1.csv\", \"Alcohol_Study2.csv\", \"Other_Study.sav\" # Get all 'Alcohol' related .csv files get_files(\"Alcohol\") # This will return: c(\"Alcohol_Study1.csv\", \"Alcohol_Study2.csv\") # Get all .sav files get_files(filetype = \"sav\") # This will return: c(\"Other_Study.sav\") }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Install and Load GitHub Packages — get_git_packages","title":"Install and Load GitHub Packages — get_git_packages","text":"function installs loads R packages GitHub repositories. checks specified packages already installed. package installed, downloaded, installed, loaded R environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install and Load GitHub Packages — get_git_packages","text":"","code":"get_git_packages(git_packages)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install and Load GitHub Packages — get_git_packages","text":"git_packages vector GitHub repositories corresponding packages installed loaded. repository specified string format \"username/repository\".","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install and Load GitHub Packages — get_git_packages","text":"return value. Called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Install and Load GitHub Packages — get_git_packages","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_git_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install and Load GitHub Packages — get_git_packages","text":"","code":"if (FALSE) { get_git_packages(c(\"CharlesEtienneLavoie/CEL\", 'rempsyc/rempsyc')) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"function computes mean scores specified scales derived given data frame. scales anticipated represented columns data frame begin base name specified scale list. Items require reverse scoring (identified \"reverse\" \"Reverse\" item name) automatically reversed calculating mean. option provided rename reversed scored items. clustering variable specified, function also computes cluster-level means newly computed variable.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"","code":"get_means( data, scale_list, reverse_score = TRUE, rename_reversed_items = FALSE, order = 1, cluster = NULL )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"data data frame containing scales items. scale_list vector characters representing base names scales compute. reverse_score logical indicating whether reverse scoring applied. Default TRUE. rename_reversed_items logical indicating whether rename reverse scored items replacing \"reverse\" \"reversed\". Default FALSE. order integer indicating order scale. Use 1 first order scales 2 second order scales. Default 1. cluster character string representing column name used clustering. provided, function computes cluster-level means new variable. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_means.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Mean Scores for Scales with Optional Reverse Scoring and Clustering — get_means","text":"data frame new columns computed mean scale scores. cluster variable provided, additional columns representing cluster-level mean variables added.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Install and Load R Packages — get_packages","title":"Install and Load R Packages — get_packages","text":"function installs loads R packages. checks specified packages already installed. package installed, downloaded CRAN, installed, loaded R environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install and Load R Packages — get_packages","text":"","code":"get_packages(packages)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install and Load R Packages — get_packages","text":"packages character vector package names installed loaded.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install and Load R Packages — get_packages","text":"return value. Called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Install and Load R Packages — get_packages","text":"Remember add reference .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install and Load R Packages — get_packages","text":"","code":"if (FALSE) { get_packages(c(\"ggplot2\", \"dplyr\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"get_processed_list function takes character vector variable names selects processed version base variable name, option exclude variables undergone certain transformations indicated '.t' names. processed version variable considered one suffixes (segments separated \".\"), excluding '.t' segments specified.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"","code":"get_processed_list(var_list, include_t = TRUE)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"var_list character vector variable names, base variable name processing stages separated dots. include_t logical value indicating whether include variables transformation stages ('.t'). Defaults TRUE. FALSE, variables '.t' names excluded consideration.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"character vector containing processed version base variable name input list, according specified criteria.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"function particularly useful scenarios multiple versions variable exist dataset, need select processed version , without transformation stages. allows greater control selection variables analysis. output order preserved based order base variable names input list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_processed_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Most Processed Variables from a List, Optionally Excluding Transformations — get_processed_list","text":"","code":"if (FALSE) { # Variable list with different processing stages, including transformations var_list <- c(\"var1\", \"var1.a\", \"var1.a.b\", \"var2\", \"var2.a\", \"var1.a.b.t\") # Get the most processed version of each variable, excluding transformations processed_list <- get_processed_list(var_list, include_t = FALSE) # Get the most processed version of each variable, including transformations processed_list_with_t <- get_processed_list(var_list, include_t = TRUE) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Base Scale Names — get_scale_names","title":"Create Base Scale Names — get_scale_names","text":"function generates base scale names list scales, keeping first parts scale name specified user. scales separated parts underscore (_). Scales fewer parts specified minimum filtered .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Base Scale Names — get_scale_names","text":"","code":"get_scale_names(scale_list, min_parts = 3, parts_to_keep = 2)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Base Scale Names — get_scale_names","text":"scale_list character vector names scales processed. min_parts minimum number parts scale must included. Default 3. parts_to_keep number parts keep base scale name. Default 2.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Base Scale Names — get_scale_names","text":"character vector base scale names.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Base Scale Names — get_scale_names","text":"scale scale list, function splits scale name parts based underscore (_). keeps first parts specified user combines back base scale name. base scale names returned unique list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Base Scale Names — get_scale_names","text":"(Optional)","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_scale_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Base Scale Names — get_scale_names","text":"","code":"# Assuming scales is your list of scales base_scales <- get_scale_names(scales, min_parts = 3, parts_to_keep = 2) #> Error in eval(expr, envir, enclos): object 'scales' not found"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert List to String — get_string","title":"Convert List to String — get_string","text":"function takes list variables input converts string representation, enclosed within c(). useful dealing formatted printing vector/list user-friendly manner.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert List to String — get_string","text":"","code":"get_string(var_list)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert List to String — get_string","text":"var_list list vector items converted string.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert List to String — get_string","text":"Prints string representation input list. However, function return value; called side effects.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert List to String — get_string","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert List to String — get_string","text":"","code":"if (FALSE) { get_string(c(\"var1\", \"var2\", \"var3\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"transform_and_update function takes dataset vector variable names, applies bestNormalize function variable, creates transformed versions variables necessary, updates dataset variable list accordingly. returns list containing updated dataset updated variable list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"","code":"get_transformation(data, var_list, seed = 100)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"data dataframe bestNormalize function applied. var_list character vector variable names. seed single value, interpreted integer, set random seed reproducibility.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"list two elements: data containing updated dataframe var_list containing updated variable list.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply bestNormalize Transformation to Variables in a Dataset and Update Dataset Accordingly — get_transformation","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( daily_sat_aut = rnorm(100), daily_fru_aut = rnorm(100), daily_sat_rel = rnorm(100), daily_fru_rel = rnorm(100) ) # Apply the `bestNormalize` function and update dataset result <- transform_and_update(df, var_list = c(\"daily_sat_aut\", \"daily_fru_aut\", \"daily_sat_rel\", \"daily_fru_rel\")) updated_df <- result$data updated_var_list <- result$var_list }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"function performs winsorization given vector x based median absolute deviation (MAD). replaces extreme values (beyond criteria number MADs median) highest/lowest non-extreme value. outliers vector based MAD criterion, function returns NULL prints message console.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"","code":"get_winsorization(x, criteria = 3)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"x numeric vector winsorize. criteria number MADs median beyond values considered outliers. Defaults 3.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"winsorized vector outliers based MAD criterion, otherwise NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"statistical analysis, winsorization can useful limiting effect outliers data. implementation uses MAD, robust measure variability, determine data points considered outliers.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/get_winsorization.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform Winsorization on a Vector Based on Median Absolute Deviation (MAD) — get_winsorization","text":"","code":"# Generate a vector with a few extreme values set.seed(123) x <- c(rnorm(100), 10, -10) # Winsorize the vector x_winsorized <- get_winsorization(x, criteria = 3)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute Data Using MissForest — impute_data","title":"Impute Data Using MissForest — impute_data","text":"impute_data function performs imputation numeric variables given dataset using MissForest algorithm. function excludes certain variables, termed \"scenario-based\" variables, imputation process. variables presented participants certain conditions might naturally contain NA values.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute Data Using MissForest — impute_data","text":"","code":"impute_data( data, scenario_based_vars = NULL, cores = 4, seed = 100, answers_only = FALSE )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute Data Using MissForest — impute_data","text":"data dataset imputed. scenario_based_vars character numeric vector representing variable names indices excluded imputation process. scenario-based variables. Defaults NULL. cores number CPU cores used parallel processing. Default 4. seed seed reproducibility. Default 100. answers_only Logical value indicating whether include variables number word 'demo'/'Demo' names imputation process. Default FALSE.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute Data Using MissForest — impute_data","text":"dataset imputed values, maintaining column order original data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Impute Data Using MissForest — impute_data","text":"Add relevant references .","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/impute_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute Data Using MissForest — impute_data","text":"","code":"if (FALSE) { # Use the function imputed_data <- impute_data(DataM, scenario_based_vars = c(\"WFC.CHECKLIST_1:CopeClosure\", \"PROLIFIC_PID:correct_answer_total\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Qualtrics Data Files — process_qualtrics_files","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"function reads processes series CSV files exported Qualtrics. assumes first two rows file contain metadata actual data.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"","code":"process_qualtrics_files(data_files, rename_files = FALSE, new_names = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"data_files character vector file paths CSV files processed. rename_files Logical. TRUE, data labels file saved new name based original file name. Default FALSE. new_names character vector new names files. length data_files. NULL rename_files TRUE, new names generated removing timestamp anything original file name. Default NULL.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"function return anything. writes processed data labels CSV files assigns resulting data frames new variables global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/process_qualtrics_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Qualtrics Data Files — process_qualtrics_files","text":"","code":"if (FALSE) { process_qualtrics_files(c(\"file1.csv\", \"file2.csv\"), rename_files = TRUE, new_names = c(\"survey1\", \"survey2\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove Specific Objects from Global Environment — remove_env_objects","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"function removes specified objects global environment R.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"","code":"remove_env_objects(remove_objects = NULL)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"remove_objects character vector specifying names objects removed. NULL (default), objects removed.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"function return anything. removes specified objects global environment.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/remove_env_objects.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove Specific Objects from Global Environment — remove_env_objects","text":"","code":"if (FALSE) { # create some objects x <- 1:10 y <- letters z <- rnorm(100) # remove 'x' and 'y' remove_env_objects(c(\"x\", \"y\")) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":null,"dir":"Reference","previous_headings":"","what":"Report Descriptive Statistics for Demographics — report_additional_demographics","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"report_additional_demographics function generates summary report descriptive statistics (counts percentages) demographic variables income, employment status, weekly alcohol units.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"","code":"report_additional_demographics( data, income = NULL, empl_status = NULL, alcohol_units = NULL )"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"data dataframe contains demographic variables. income string represents name income variable data (default: NULL). empl_status string represents name employment status variable data (default: NULL). alcohol_units string represents name weekly alcohol units variable data (default: NULL).","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"string containing descriptive statistics demographic variable provided.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"function allows demographic optional. demographic parameter set null (default), function perform operations related demographic. valid demographic variable name passed parameter, function calculate number instances corresponding percentage category given demographic variable.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/report_additional_demographics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report Descriptive Statistics for Demographics — report_additional_demographics","text":"","code":"if (FALSE) { data <- data.frame( demo_income_c = sample(c(\"$100,001 - $125,000\", \"$125,001 - $150,000\"), 100, replace = TRUE), demo_empl_status_c = sample(c(\"Full-time\", \"Part-time\"), 100, replace = TRUE), demo_alcohol_units_c = sample(c(\"1-4\", \"5-9\"), 100, replace = TRUE) ) report_additional_demographics( data = data, income = \"demo_income_c\", empl_status = \"demo_empl_status_c\", alcohol_units = \"demo_alcohol_units_c\" ) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"root_apply function takes dataset vector root names applies specified function subset variables match root name number end name. returns list results root name. function fails particular root name, returns NA root name prints message error.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"","code":"root_apply(dataset, root_names, fun, ...)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"dataset dataset function needs applied. root_names character vector root names. fun function apply subset variables root name. ... Additional arguments function.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"list element result applying fun subset variables match root name number end name. element list named root name.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/root_apply.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply a Function to Subset of Variables in a Dataset Based on Root Names — root_apply","text":"","code":"if (FALSE) { # Generate some data df <- data.frame( daily_sat_aut_1 = rnorm(100), daily_sat_aut_2 = rnorm(100), daily_fru_aut_1 = rnorm(100), daily_fru_aut_2 = rnorm(100), daily_sat_rel_1 = rnorm(100), daily_sat_rel_2 = rnorm(100), daily_fru_rel_1 = rnorm(100), daily_fru_rel_2 = rnorm(100) ) # Apply the mean function to the subsets of variables results <- root_apply(df, root_names = c(\"daily_sat_aut_reversed\", \"daily_fru_aut\", \"daily_sat_rel\"), fun = mean) }"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"Compute Power Analysis SEM Model Using Monte Carlo Simulation","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"","code":"simulate_power(model.population, model, ksim = 10, nobs = 100)"},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"model.population lavaan model population estimate values specified. model lavaan model tested simulation ksim many simulations function perform nobs many observations generate simulation","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"table.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"function uses simulate_data function lavaan package perform monte carlo simulation. mean, std error, z value, p value confidence intervals computed reported table parameter.","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"Remember add reference ","code":""},{"path":"https://charlesetiennelavoie.github.io/celflow/reference/simulate_power.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute Power Analysis For SEM Model Using Monte Carlo Simulation — simulate_power","text":"","code":"library(lavaan) #> This is lavaan 0.6-17 #> lavaan is FREE software! Please report any bugs. modpop <- ' M ~ 0.40*X Y ~ 0.30*M ' mod <- ' M ~ X Y ~ M ' simulate_power(modpop, mod) #> lhs op rhs est se z pvalue ci.lower ci.upper Parameter #> 1 M ~ X 0.310 0.099 3.132 0.002 0.116 0.504 M ~ X #> 2 Y ~ M 0.318 0.094 3.382 0.001 0.134 0.502 Y ~ M #> 3 M ~~ M 0.963 0.136 7.071 0.000 0.696 1.230 M ~~ M #> 4 Y ~~ Y 0.933 0.132 7.071 0.000 0.675 1.192 Y ~~ Y #> 5 X ~~ X 0.982 0.000 NA NA 0.982 0.982 X ~~ X #> 6 M ~ X 0.263 0.111 2.384 0.017 0.047 0.480 M ~ X #> 7 Y ~ M 0.440 0.095 4.649 0.000 0.254 0.625 Y ~ M #> 8 M ~~ M 1.032 0.146 7.071 0.000 0.746 1.318 M ~~ M #> 9 Y ~~ Y 0.975 0.138 7.071 0.000 0.705 1.245 Y ~~ Y #> 10 X ~~ X 0.845 0.000 NA NA 0.845 0.845 X ~~ X #> 11 M ~ X 0.375 0.096 3.885 0.000 0.186 0.564 M ~ X #> 12 Y ~ M 0.301 0.096 3.135 0.002 0.113 0.489 Y ~ M #> 13 M ~~ M 1.000 0.141 7.071 0.000 0.723 1.277 M ~~ M #> 14 Y ~~ Y 1.060 0.150 7.071 0.000 0.767 1.354 Y ~~ Y #> 15 X ~~ X 1.075 0.000 NA NA 1.075 1.075 X ~~ X #> 16 M ~ X 0.543 0.094 5.753 0.000 0.358 0.728 M ~ X #> 17 Y ~ M 0.321 0.100 3.226 0.001 0.126 0.516 Y ~ M #> 18 M ~~ M 0.841 0.119 7.071 0.000 0.608 1.074 M ~~ M #> 19 Y ~~ Y 1.109 0.157 7.071 0.000 0.802 1.417 Y ~~ Y #> 20 X ~~ X 0.944 0.000 NA NA 0.944 0.944 X ~~ X #> 21 M ~ X 0.448 0.095 4.693 0.000 0.261 0.635 M ~ X #> 22 Y ~ M 0.425 0.095 4.488 0.000 0.240 0.611 Y ~ M #> 23 M ~~ M 0.859 0.122 7.071 0.000 0.621 1.097 M ~~ M #> 24 Y ~~ Y 0.941 0.133 7.071 0.000 0.680 1.202 Y ~~ Y #> 25 X ~~ X 0.944 0.000 NA NA 0.944 0.944 X ~~ X #> 26 M ~ X 0.434 0.086 5.027 0.000 0.265 0.603 M ~ X #> 27 Y ~ M 0.343 0.100 3.444 0.001 0.148 0.539 Y ~ M #> 28 M ~~ M 0.921 0.130 7.071 0.000 0.666 1.177 M ~~ M #> 29 Y ~~ Y 1.146 0.162 7.071 0.000 0.828 1.464 Y ~~ Y #> 30 X ~~ X 1.236 0.000 NA NA 1.236 1.236 X ~~ X #> 31 M ~ X 0.668 0.091 7.364 0.000 0.490 0.846 M ~ X #> 32 Y ~ M 0.307 0.080 3.829 0.000 0.150 0.464 Y ~ M #> 33 M ~~ M 0.818 0.116 7.071 0.000 0.591 1.044 M ~~ M #> 34 Y ~~ Y 0.811 0.115 7.071 0.000 0.586 1.035 Y ~~ Y #> 35 X ~~ X 0.993 0.000 NA NA 0.993 0.993 X ~~ X #> 36 M ~ X 0.346 0.110 3.141 0.002 0.130 0.561 M ~ X #> 37 Y ~ M 0.240 0.089 2.697 0.007 0.065 0.414 Y ~ M #> 38 M ~~ M 1.051 0.149 7.071 0.000 0.760 1.342 M ~~ M #> 39 Y ~~ Y 0.911 0.129 7.071 0.000 0.659 1.164 Y ~~ Y #> 40 X ~~ X 0.868 0.000 NA NA 0.868 0.868 X ~~ X #> 41 M ~ X 0.440 0.096 4.600 0.000 0.253 0.628 M ~ X #> 42 Y ~ M 0.280 0.101 2.775 0.006 0.082 0.477 Y ~ M #> 43 M ~~ M 0.868 0.123 7.071 0.000 0.627 1.109 M ~~ M #> 44 Y ~~ Y 1.069 0.151 7.071 0.000 0.773 1.365 Y ~~ Y #> 45 X ~~ X 0.948 0.000 NA NA 0.948 0.948 X ~~ X #> 46 M ~ X 0.286 0.104 2.741 0.006 0.081 0.490 M ~ X #> 47 Y ~ M 0.343 0.099 3.448 0.001 0.148 0.537 Y ~ M #> 48 M ~~ M 1.131 0.160 7.071 0.000 0.817 1.444 M ~~ M #> 49 Y ~~ Y 1.201 0.170 7.071 0.000 0.868 1.533 Y ~~ Y #> 50 X ~~ X 1.041 0.000 NA NA 1.041 1.041 X ~~ X"}] diff --git a/sitemap.xml b/sitemap.xml index 912f6b0..2ea5162 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -21,6 +21,9 @@ https://charlesetiennelavoie.github.io/celflow/reference/clean_attention.html + + https://charlesetiennelavoie.github.io/celflow/reference/clean_ending.html + https://charlesetiennelavoie.github.io/celflow/reference/clean_env.html