Publications by Jen Richmond

4_zscores

07.07.2020

https://rpubs.com/jenrichmond/emgz load packages library(tidyverse) library(here) library(skimr) options(scipen = 999) #set no scientific notation The process first, make data wide using pivot_wider so that brow and cheek are in columns use scale() to transform RMS scores into z scores for each participant. then make bin wide so that each row...

2759 sym R (5623 sym/20 pcs) 1 img

emg_readme

07.07.2020

README All the dynamic data files are in the data/dirty. Scripts that were created in the working out process are in the “working” folder, those that made the cut into the final cleaning process are in the “final” folder. The cleaning process is documented below. Step 1 - work out cleaning process on a single file I read in a single dirt...

2494 sym

6_emg dynamic plots

07.07.2020

load packages library(tidyverse) library(here) library(janitor) library(papaja) read bin screened data plot_data <- read_csv(here("data", "combined", "5_zdiff_binscreened.csv")) glimpse(plot_data) ## Rows: 18,576 ## Columns: 7 ## $ pp_no <chr> "pp401", "pp401", "pp401", "pp401", "pp401", "pp401", … ## $ condition <chr> "dyn", "dyn", "dyn"...

302 sym R (2995 sym/12 pcs) 3 img

lmm bests

07.08.2020

Overview The purpose of this document is to work through the code from the paper below, tidyverse-ising it where possible and adding notes to help me understand what the code is doing to illustrating how linear mixed models work with this dataset. Things I learned along the way… this code might not be 100% relevant to using LMM with EMG becau...

16109 sym R (33885 sym/112 pcs) 17 img 3 tbl

EMG Z scores

23.06.2020

load packages library(tidyverse) library(formattable) # useful for controlling decimal places options(scipen = 999) #set no scientific notation The process first, make data wide using pivot_wider so that brow and cheek are in columns use scale() to transform RMS scores into z scores for each participant. then make bin wide so that each row rep...

5233 sym R (7789 sym/30 pcs) 2 img

cassandra

02.07.2020

load the packages library(tidyverse) library(here) library(janitor) read the data AIBQ <- read_csv("Desktop/AIBQ.csv") %>% clean_names() list the variable names names(AIBQ) ## [1] "event_index" "utc_timestamp" ## [3] "utc_date" "local_timestamp" ## [5] "local_time...

694 sym R (4839 sym/11 pcs)

5_bin outliers

07.07.2020

load packages library(tidyverse) library(here) library(janitor) read combined clean no BL outliers data bins <- read_csv(here("data", "combined", "4_zdiff_clean.csv")) Make new screening column which is TRUE if the zdiff value for a particular bin is greater than 2SD the mean zdiff value for that trial for that participant/emotion/muscle. bins_o...

592 sym R (1682 sym/10 pcs)

2_bind clean files

07.07.2020

load packages library(tidyverse) library(here) library(janitor) Define the path where the files live and get a list of files data_path <- here("data", "clean") files <- dir(data_path, pattern = "*.csv") Use map to read_csv on all those files, binding them into a single df clean_data <- files %>% map(~ read_csv(file.path(data_path, .))) %>%...

284 sym R (524 sym/6 pcs)

1_cleaning dyn files

07.07.2020

load packages library(readxl) library(tidyverse) library(here) library(janitor) call functions source(here("scripts","final", "clean_write_function.R")) Solution from https://stackoverflow.com/questions/47540471/load-multiple-excel-files-and-name-object-after-a-file-name set up path and files list filepath <- here("data", "dirty") file_list <-...

1325 sym R (541 sym/7 pcs)

cheek_dynamic

11.08.2020

load packages library(tidyverse) library(here) library(lme4) library(lmerTest) library(broom.mixed) library(pixiedust) library(beepr) # note if you run LMM with just the lme4 package you wont get any pvalues # loading lmerTest as well gets you pvalues when you test anova(model) read in data df <- read_csv(here("data", "combined", "5_zdiff_bin...

18890 sym R (19298 sym/62 pcs) 4 img