1 Arrange folders, sort files, read and merge

1.1 Create folders by conditions, copy files to them

##################### Read file names ##################################################################################
file_names <- dir(pattern = "\\.xls$")
## if above isn't good enough try the following:
# file_names <- list.files(wd)
# file_names <- sop_files[!file.info(sop_files)$isdir]   # exclude directories
# file_names <- sop_files[grep(".xls", sop_files, fixed = TRUE)]


##################### Create folders with Condition names ###############################################################
# this part of script may be re-run if files from wd are updated
dir_names <- c("Unic_CTRL_Instr", "Unic_CTRL_Solo", "Unic_OGL_Instr", "Unic_OGL_Solo",
              "Repetat_CTRL_Instr", "Repetat_CTRL_Solo", "Repetat_OGL_Instr", "Repetat_OGL_Solo")
             
for(dir in dir_names){
  if(!dir.exists(file.path(wd, dir)))
  dir.create(file.path(wd, dir), showWarnings = FALSE)
}


##################### Use file names to sort them to folders ############################################################
sort_files_to_dirs <- function(wd, pattern, dir) {
  check_pattern <- outer(file_names, pattern, stringr::str_detect)               # if all TRUE bye row then it has full pattern
  index <- which(apply(check_pattern, 1, function(x) all(x==TRUE)))              # get index of file_names where all are TRUE
  sorted_files <- file_names[index]                                              # get names of files from indexes
  
  for(files in sorted_files) {                                                   # copy the files to corresponding folder
    file.copy(from = file.path(wd, files), to = file.path(wd, dir))
  }  
}

sort_files_to_dirs(wd = wd, pattern = c("unic", "ecran", "instructor"), dir = "Unic_CTRL_Instr")
sort_files_to_dirs(wd = wd, pattern = c("unic", "ecran", "solo"), dir = "Unic_CTRL_Solo")
sort_files_to_dirs(wd = wd, pattern = c("unic", "oglinda", "instructor"), dir = "Unic_OGL_Instr")
sort_files_to_dirs(wd = wd, pattern = c("unic", "oglinda", "solo"), dir = "Unic_OGL_Solo")

sort_files_to_dirs(wd = wd, pattern = c("repetat", "ecran", "instructor"), dir = "Repetat_CTRL_Instr")
sort_files_to_dirs(wd = wd, pattern = c("repetat", "ecran", "solo"), dir = "Repetat_CTRL_Solo")
sort_files_to_dirs(wd = wd, pattern = c("repetat", "oglinda", "instructor"), dir = "Repetat_OGL_Instr")
sort_files_to_dirs(wd = wd, pattern = c("repetat", "oglinda", "solo"), dir = "Repetat_OGL_Solo")

1.2 Reading the data

############ Read in all the .xls from folders and merge them in datasets named after corresponding folder ##############
# this part of script may be re-run if files from wd are updated
# RE-RUN FROM HERE IF FOLDERS AND SORTING WAS ALREADY DONE
wd <- "E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite"
setwd(wd)
The working directory was changed to E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
folders <- list.files(wd)
folders <- folders[file.info(folders)$isdir]   # luam doar folderele
datasetnames <- NULL
for (i in 1:length(folders)) {
  datasetname <- folders[i]
  datasetnames <- c(datasetnames, datasetname)
  current_dir <- setwd(file.path(wd, folders[i]))
  print(paste0("current_dir: ", current_dir))
  
  paths <- dir(pattern = "\\.xls$")
  names(paths) <- basename(paths)
  assign( paste(datasetname), plyr::ldply(paths, rio::import) )
}
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Repetat_CTRL_Instr"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Repetat_CTRL_Solo"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Repetat_OGL_Instr"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Repetat_OGL_Solo"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Unic_CTRL_Instr"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Unic_CTRL_Solo"
[1] "current_dir: E:/CINETIC diverse/O.4c (EEG)/Date 27.04.2019/Date redenumite/Unic_OGL_Instr"
setwd(wd)
# detach("package:plyr", unload=TRUE)                                                   # detach plyr because of conflicts with dplyr

1.3 Cleaning the data

#################################### Data Cleaning #####################################################################
# Check if ids have > 1 row of data (empty .xls have only 1 row)
# Careful! This function modfies the datasets in the global envinronment
delete_empty_id <- function(df){
  list_empty_id <- 
    df %>%
    dplyr::group_by(.id) %>%
    dplyr::summarise(row_count = n()) %>%
    dplyr::rename("empty_id" = .id) %>%
    mutate(delete_id = if_else(row_count < 3, TRUE, FALSE)) %>%
    filter(delete_id == TRUE)
  
  df_modif <- 
    df %>%
    filter(!.id %in% list_empty_id$empty_id)
  
  if(!identical(df, df_modif)){
    df <- deparse(substitute(df))
    cat("Deleting from ", print(as.name(df))); print(list_empty_id)                    # print out which ids are deleted from which dataset
    assign(df, df_modif, envir = globalenv())                                          # assign modified df to original dataset from Global
  }else cat("No empty datasets. Nothing to delete")
}
# Apply function to all datasets (tricky to do in for loop because of super assignment)
delete_empty_id(Unic_CTRL_Instr)
No empty datasets. Nothing to delete
delete_empty_id(Unic_CTRL_Solo)
No empty datasets. Nothing to delete
delete_empty_id(Unic_OGL_Instr)
No empty datasets. Nothing to delete
delete_empty_id(Unic_OGL_Solo)
No empty datasets. Nothing to delete
delete_empty_id(Repetat_CTRL_Instr)
Repetat_CTRL_Instr
Deleting from  Repetat_CTRL_Instr
delete_empty_id(Repetat_CTRL_Solo)
No empty datasets. Nothing to delete
delete_empty_id(Repetat_OGL_Instr)
Repetat_OGL_Instr
Deleting from  Repetat_OGL_Instr
delete_empty_id(Repetat_OGL_Solo)
Repetat_OGL_Solo
Deleting from  Repetat_OGL_Solo

1.4 Exclude SAM_resp based on RT outliers

############################### Exclude Outliers based on RT (by subject and stimulus type) #######################################
## DONT RUN (unless it is needed) ----> eval=FALSE
# Exclude RT outliers (=- 2SD) - instead of simple filter, makeing them NA  is better for paired comparison
remove_outliers <- function(df) {
  df_modif <-
    df %>%
    dplyr::group_by(.id, `Stimulus type`) %>%                  # we could have done before:  dplyr::rename("Stim_type" = `Stimulus type`) 
    mutate(SAM_Resp = if_else(abs(SAM_RT - mean(SAM_RT, na.rm=TRUE)) > 2*sd(SAM_RT, na.rm=TRUE), as.numeric(NA), SAM_Resp))
  
  if(!identical(df, df_modif)){
    df <- deparse(substitute(df))
    cat("Deleting outliers from ", print(as.name(df)));                               # print out datasets which have been modified
    assign(df, df_modif, envir = globalenv())                                          # assign modified df to original dataset from Global
  }else cat("No outlier")
}
remove_outliers(Unic_CTRL_Instr)
Unic_CTRL_Instr
Deleting outliers from  Unic_CTRL_Instr
remove_outliers(Unic_CTRL_Solo)
Unic_CTRL_Solo
Deleting outliers from  Unic_CTRL_Solo
remove_outliers(Unic_OGL_Instr)
Unic_OGL_Instr
Deleting outliers from  Unic_OGL_Instr
remove_outliers(Unic_OGL_Solo)
Unic_OGL_Solo
Deleting outliers from  Unic_OGL_Solo
remove_outliers(Repetat_CTRL_Instr)
Repetat_CTRL_Instr
Deleting outliers from  Repetat_CTRL_Instr
remove_outliers(Repetat_CTRL_Solo)
Repetat_CTRL_Solo
Deleting outliers from  Repetat_CTRL_Solo
remove_outliers(Repetat_OGL_Instr)
Repetat_OGL_Instr
Deleting outliers from  Repetat_OGL_Instr
remove_outliers(Repetat_OGL_Solo)
Repetat_OGL_Solo
Deleting outliers from  Repetat_OGL_Solo

1.5 Test if datasets have same columns

unic_df_obj <- mget(c("Unic_CTRL_Instr", "Unic_CTRL_Solo", "Unic_OGL_Instr", "Unic_OGL_Solo"))
unic_df_obj <-lapply(unic_df_obj, colnames)
outer(unic_df_obj, unic_df_obj, Vectorize(identical))                           # if all are TRUE, all df have same columns
                Unic_CTRL_Instr Unic_CTRL_Solo Unic_OGL_Instr Unic_OGL_Solo
Unic_CTRL_Instr            TRUE           TRUE           TRUE          TRUE
Unic_CTRL_Solo             TRUE           TRUE           TRUE          TRUE
Unic_OGL_Instr             TRUE           TRUE           TRUE          TRUE
Unic_OGL_Solo              TRUE           TRUE           TRUE          TRUE
repetat_df_obj <- mget(c("Repetat_CTRL_Instr", "Repetat_CTRL_Solo", "Repetat_OGL_Instr", "Repetat_OGL_Solo"))
repetat_df_obj <-lapply(repetat_df_obj, colnames)
outer(repetat_df_obj, repetat_df_obj, Vectorize(identical))                           # if all are TRUE, all df have same columns
                   Repetat_CTRL_Instr Repetat_CTRL_Solo Repetat_OGL_Instr Repetat_OGL_Solo
Repetat_CTRL_Instr               TRUE              TRUE              TRUE             TRUE
Repetat_CTRL_Solo                TRUE              TRUE              TRUE             TRUE
Repetat_OGL_Instr                TRUE              TRUE              TRUE             TRUE
Repetat_OGL_Solo                 TRUE              TRUE              TRUE             TRUE



2 Analysis - UNICE

2.1 Descriptives

##########################################################################################################################
#################################### Analyses - UNICE ####################################################################
## Descriptives by condition dataset
descriptive_func <- function(df, Stim_type, By_ID = FALSE){
  df_name <- deparse(substitute(df))
  suppressWarnings({                                                                # if all NAs in SAM_Resp, NaNs and Infs will be produced
    df_modif <- 
      df %>%
      dplyr::rename("ID" = .id) %>%
      select_all(~gsub("\\s+|\\.", "_", .)) %>%                                     # replaces blancks with "_" in colnames 
      filter(Stimulus_type == Stim_type)                                            # filter by stimulus type
      
    if(isTRUE(By_ID)){                                                              # if true group by id, if not return descriptives for all ids
      df_modif %>%
      dplyr::group_by(ID) %>%
      tidystats::describe_data(SAM_Resp, SAM_RT, na.rm = TRUE) %>%
        knitr::kable(caption = as.name(df_name), format = "pandoc", digits = 2)
    }else{ 
      df_modif %>%
      tidystats::describe_data(SAM_Resp, SAM_RT, na.rm = TRUE) %>%
        knitr::kable(caption = as.name(df_name), format = "pandoc", digits = 2)
    }
  })
}  
descriptive_func(df = Unic_CTRL_Instr, Stim_type = "negativ", By_ID = FALSE)           # Negative - General

Unic_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls negativ 11 24 2.08 1.02 0.21 1 4.00 3.00 2.00 NA 0.59 2.30
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls negativ 1 34 8.03 1.47 0.25 4 9.00 5.00 9.00 9.00 -1.57 4.49
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls negativ 0 35 3.14 1.42 0.24 1 5.00 4.00 3.00 5.00 0.00 1.72
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls negativ 1 34 5.76 2.28 0.39 3 9.00 6.00 6.00 3.00 0.11 1.47
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls negativ 1 34 3.09 1.86 0.32 1 8.00 7.00 3.00 1.00 0.81 3.01
SAM_RT O4c_2_ID17ecraninstructorunic .xls negativ 0 35 2.84 0.75 0.13 1 4.38 3.38 2.65 2.51 0.04 2.81
SAM_RT O4c_Run_ID8ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls negativ 0 35 1.71 0.62 0.11 1 3.34 2.33 1.59 1.24 0.78 2.79
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls negativ 0 35 1.43 0.32 0.05 1 2.26 1.26 1.37 1.00 0.69 2.88
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls negativ 0 35 1.59 0.65 0.11 1 3.43 2.43 1.34 1.00 1.26 3.65
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls negativ 0 35 1.40 0.57 0.10 1 3.26 2.26 1.23 1.22 2.15 6.83

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "negativ", By_ID = FALSE)

Unic_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls negativ 0 35 3.69 1.59 0.27 1.00 6.00 5.00 4.00 5.00 -0.19 1.75
SAM_Resp O4c_Run1_ID17ecransolo unic .xls negativ 5 30 3.17 1.78 0.33 1.00 7.00 6.00 2.50 2.00 0.71 2.38
SAM_Resp O4c_Run1_ID9ecransolo unic .xls negativ 1 34 5.71 1.83 0.31 3.00 9.00 6.00 6.00 6.00 0.41 2.18
SAM_Resp O4c_Run2_ID6ecransolo unic .xls negativ 0 35 8.26 1.22 0.21 4.00 9.00 5.00 9.00 9.00 -1.98 6.55
SAM_Resp O4c_Run2_ID8ecransolo unic .xls negativ 1 34 5.35 2.24 0.38 1.00 9.00 8.00 5.00 5.00 -0.52 2.35
SAM_Resp O4c_Run3_ID10ecransolo unic .xls negativ 3 32 3.00 1.80 0.32 1.00 8.00 7.00 2.50 2.00 1.19 3.74
SAM_Resp Radu1ecransolo unic .xls negativ 1 34 6.44 1.69 0.29 2.00 9.00 7.00 7.00 7.00 -1.10 4.24
SAM_Resp Radu21ecransolo unic .xls negativ 1 34 6.32 1.25 0.21 3.00 8.00 5.00 7.00 7.00 -1.11 4.07
SAM_RT O4c_1_ID17ecransolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls negativ 0 35 1.79 0.69 0.12 1.00 4.23 3.23 1.56 1.59 1.47 5.65
SAM_RT O4c_Run1_ID17ecransolo unic .xls negativ 0 35 3.48 1.71 0.29 1.18 10.12 8.94 3.24 1.18 1.91 8.09
SAM_RT O4c_Run1_ID9ecransolo unic .xls negativ 0 35 2.10 1.04 0.18 1.00 5.65 4.65 1.90 1.89 1.48 5.55
SAM_RT O4c_Run2_ID6ecransolo unic .xls negativ 0 35 1.66 0.63 0.11 1.00 3.40 2.40 1.49 1.03 0.85 2.93
SAM_RT O4c_Run2_ID8ecransolo unic .xls negativ 0 35 2.11 2.96 0.50 1.00 18.75 17.75 1.51 1.00 5.30 30.37
SAM_RT O4c_Run3_ID10ecransolo unic .xls negativ 0 35 2.31 1.88 0.32 1.00 9.63 8.63 1.65 1.28 2.47 9.08
SAM_RT Radu1ecransolo unic .xls negativ 0 35 2.23 1.30 0.22 1.00 6.85 5.85 1.73 4.26 1.56 5.69
SAM_RT Radu21ecransolo unic .xls negativ 0 35 1.81 1.00 0.17 1.00 6.81 5.81 1.65 1.45 3.70 19.05

descriptive_func(df = Unic_OGL_Instr, Stim_type = "negativ", By_ID = FALSE)

Unic_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls negativ 0 35 2.77 1.46 0.25 1.00 5.00 4.00 3.00 1.00 0.23 1.70
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls negativ 0 35 3.86 2.30 0.39 1.00 8.00 7.00 3.00 2.00 0.38 1.82
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls negativ 0 35 4.17 1.10 0.19 2.00 6.00 4.00 4.00 4.00 -0.07 2.27
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls negativ 1 34 7.59 2.06 0.35 2.00 9.00 7.00 9.00 9.00 -1.24 3.35
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls negativ 1 34 6.65 1.87 0.32 3.00 9.00 6.00 6.50 6.00 -0.23 1.88
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls negativ 0 35 4.63 1.85 0.31 2.00 8.00 6.00 4.00 3.00 0.28 1.59
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls negativ 0 35 7.54 1.44 0.24 5.00 9.00 4.00 8.00 9.00 -0.48 1.83
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls negativ 0 35 1.77 0.73 0.12 1.00 3.00 2.00 2.00 2.00 0.37 1.98
SAM_RT O4c_3_ID12oglindainstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls negativ 0 35 1.28 0.24 0.04 1.00 1.79 0.79 1.22 1.42 0.89 2.80
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls negativ 0 35 2.00 0.89 0.15 1.00 4.04 3.04 1.78 3.11 0.71 2.47
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls negativ 0 35 1.30 0.24 0.04 1.00 2.12 1.12 1.25 1.27 1.41 5.57
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls negativ 0 35 2.30 1.59 0.27 1.00 8.20 7.20 1.59 1.59 2.15 7.34
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls negativ 0 35 4.02 1.82 0.31 2.26 11.25 8.99 3.56 2.74 1.92 8.18
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls negativ 0 35 1.58 0.58 0.10 1.00 4.15 3.14 1.49 1.14 2.64 11.99
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls negativ 0 35 1.72 0.71 0.12 1.00 3.65 2.65 1.56 1.58 1.13 3.73
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls negativ 0 35 2.45 0.63 0.11 1.38 4.54 3.17 2.40 2.26 0.91 4.88

descriptive_func(df = Unic_OGL_Solo, Stim_type = "negativ", By_ID = FALSE)

Unic_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls negativ 0 35 2.91 1.46 0.25 1.00 5.00 4.00 3.00 1.00 -0.02 1.65
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls negativ 1 34 8.38 1.60 0.27 1.00 9.00 8.00 9.00 9.00 -3.42 15.12
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls negativ 14 21 6.29 1.71 0.37 3.00 9.00 6.00 6.00 NA -0.21 2.42
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls negativ 0 35 3.34 1.94 0.33 1.00 8.00 7.00 3.00 3.00 0.66 2.62
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls negativ 0 35 7.26 1.79 0.30 1.00 9.00 8.00 7.00 9.00 -1.21 5.24
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls negativ 0 35 5.23 2.03 0.34 2.00 9.00 7.00 5.00 3.00 0.07 1.77
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls negativ 0 35 1.71 0.67 0.11 1.00 3.00 2.00 2.00 2.00 0.38 2.24
SAM_RT O4c_4_ID12oglindasolo unic .xls negativ 0 35 1.35 0.33 0.05 1.00 2.30 1.30 1.28 1.00 1.23 3.79
SAM_RT O4c_Run1_ID13oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls negativ 0 35 2.69 1.91 0.32 1.00 7.93 6.93 1.74 7.93 1.11 2.99
SAM_RT O4c_Run1_ID16oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls negativ 0 35 6.40 3.23 0.55 1.36 16.12 14.75 5.62 1.97 0.96 3.70
SAM_RT O4c_Run2_ID10oglindasolo unic .xls negativ 0 35 2.01 1.05 0.18 1.00 5.27 4.27 1.73 1.24 1.42 4.56
SAM_RT O4c_Run3_ID6oglindasolo unic .xls negativ 0 35 1.68 0.78 0.13 1.00 3.99 2.99 1.37 1.51 1.58 4.72
SAM_RT O4c_Run4_ID12oglindasolo unic .xls negativ 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls negativ 0 35 1.63 0.60 0.10 1.00 3.15 2.15 1.54 1.00 0.76 2.55
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls negativ 0 35 2.38 0.57 0.10 1.46 3.74 2.28 2.30 3.04 0.19 2.37

descriptive_func(df = Unic_CTRL_Instr, Stim_type = "negativ", By_ID = TRUE)            # Negative - by id

Unic_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls 11 24 2.08 1.02 0.21 1 4.00 3.00 2.00 NA 0.59 2.30
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls 1 34 8.03 1.47 0.25 4 9.00 5.00 9.00 9.00 -1.57 4.49
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls 0 35 3.14 1.42 0.24 1 5.00 4.00 3.00 5.00 0.00 1.72
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls 1 34 5.76 2.28 0.39 3 9.00 6.00 6.00 3.00 0.11 1.47
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls 1 34 3.09 1.86 0.32 1 8.00 7.00 3.00 1.00 0.81 3.01
SAM_RT O4c_2_ID17ecraninstructorunic .xls 0 35 2.84 0.75 0.13 1 4.38 3.38 2.65 2.51 0.04 2.81
SAM_RT O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls 0 35 1.71 0.62 0.11 1 3.34 2.33 1.59 1.24 0.78 2.79
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls 0 35 1.43 0.32 0.05 1 2.26 1.26 1.37 1.00 0.69 2.88
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls 0 35 1.59 0.65 0.11 1 3.43 2.43 1.34 1.00 1.26 3.65
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls 0 35 1.40 0.57 0.10 1 3.26 2.26 1.23 1.22 2.15 6.83

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "negativ", By_ID = TRUE)

Unic_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls 0 35 3.69 1.59 0.27 1.00 6.00 5.00 4.00 5.00 -0.19 1.75
SAM_Resp O4c_Run1_ID17ecransolo unic .xls 5 30 3.17 1.78 0.33 1.00 7.00 6.00 2.50 2.00 0.71 2.38
SAM_Resp O4c_Run1_ID9ecransolo unic .xls 1 34 5.71 1.83 0.31 3.00 9.00 6.00 6.00 6.00 0.41 2.18
SAM_Resp O4c_Run2_ID6ecransolo unic .xls 0 35 8.26 1.22 0.21 4.00 9.00 5.00 9.00 9.00 -1.98 6.55
SAM_Resp O4c_Run2_ID8ecransolo unic .xls 1 34 5.35 2.24 0.38 1.00 9.00 8.00 5.00 5.00 -0.52 2.35
SAM_Resp O4c_Run3_ID10ecransolo unic .xls 3 32 3.00 1.80 0.32 1.00 8.00 7.00 2.50 2.00 1.19 3.74
SAM_Resp Radu1ecransolo unic .xls 1 34 6.44 1.69 0.29 2.00 9.00 7.00 7.00 7.00 -1.10 4.24
SAM_Resp Radu21ecransolo unic .xls 1 34 6.32 1.25 0.21 3.00 8.00 5.00 7.00 7.00 -1.11 4.07
SAM_RT O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls 0 35 1.79 0.69 0.12 1.00 4.23 3.23 1.56 1.59 1.47 5.65
SAM_RT O4c_Run1_ID17ecransolo unic .xls 0 35 3.48 1.71 0.29 1.18 10.12 8.94 3.24 1.18 1.91 8.09
SAM_RT O4c_Run1_ID9ecransolo unic .xls 0 35 2.10 1.04 0.18 1.00 5.65 4.65 1.90 1.89 1.48 5.55
SAM_RT O4c_Run2_ID6ecransolo unic .xls 0 35 1.66 0.63 0.11 1.00 3.40 2.40 1.49 1.03 0.85 2.93
SAM_RT O4c_Run2_ID8ecransolo unic .xls 0 35 2.11 2.96 0.50 1.00 18.75 17.75 1.51 1.00 5.30 30.37
SAM_RT O4c_Run3_ID10ecransolo unic .xls 0 35 2.31 1.88 0.32 1.00 9.63 8.63 1.65 1.28 2.47 9.08
SAM_RT Radu1ecransolo unic .xls 0 35 2.23 1.30 0.22 1.00 6.85 5.85 1.73 4.26 1.56 5.69
SAM_RT Radu21ecransolo unic .xls 0 35 1.81 1.00 0.17 1.00 6.81 5.81 1.65 1.45 3.70 19.05

descriptive_func(df = Unic_OGL_Instr, Stim_type = "negativ", By_ID = TRUE)

Unic_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls 0 35 2.77 1.46 0.25 1.00 5.00 4.00 3.00 1.00 0.23 1.70
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls 0 35 3.86 2.30 0.39 1.00 8.00 7.00 3.00 2.00 0.38 1.82
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls 0 35 4.17 1.10 0.19 2.00 6.00 4.00 4.00 4.00 -0.07 2.27
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls 1 34 7.59 2.06 0.35 2.00 9.00 7.00 9.00 9.00 -1.24 3.35
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls 1 34 6.65 1.87 0.32 3.00 9.00 6.00 6.50 6.00 -0.23 1.88
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls 0 35 4.63 1.85 0.31 2.00 8.00 6.00 4.00 3.00 0.28 1.59
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls 0 35 7.54 1.44 0.24 5.00 9.00 4.00 8.00 9.00 -0.48 1.83
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 1.77 0.73 0.12 1.00 3.00 2.00 2.00 2.00 0.37 1.98
SAM_RT O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls 0 35 1.28 0.24 0.04 1.00 1.79 0.79 1.22 1.42 0.89 2.80
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls 0 35 2.00 0.89 0.15 1.00 4.04 3.04 1.78 3.11 0.71 2.47
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls 0 35 1.30 0.24 0.04 1.00 2.12 1.12 1.25 1.27 1.41 5.57
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls 0 35 2.30 1.59 0.27 1.00 8.20 7.20 1.59 1.59 2.15 7.34
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls 0 35 4.02 1.82 0.31 2.26 11.25 8.99 3.56 2.74 1.92 8.18
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls 0 35 1.58 0.58 0.10 1.00 4.15 3.14 1.49 1.14 2.64 11.99
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls 0 35 1.72 0.71 0.12 1.00 3.65 2.65 1.56 1.58 1.13 3.73
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 2.45 0.63 0.11 1.38 4.54 3.17 2.40 2.26 0.91 4.88

descriptive_func(df = Unic_OGL_Solo, Stim_type = "negativ", By_ID = TRUE)

Unic_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls 0 35 2.91 1.46 0.25 1.00 5.00 4.00 3.00 1.00 -0.02 1.65
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls 1 34 8.38 1.60 0.27 1.00 9.00 8.00 9.00 9.00 -3.42 15.12
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls 14 21 6.29 1.71 0.37 3.00 9.00 6.00 6.00 NA -0.21 2.42
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls 0 35 3.34 1.94 0.33 1.00 8.00 7.00 3.00 3.00 0.66 2.62
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls 0 35 7.26 1.79 0.30 1.00 9.00 8.00 7.00 9.00 -1.21 5.24
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls 0 35 5.23 2.03 0.34 2.00 9.00 7.00 5.00 3.00 0.07 1.77
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 1.71 0.67 0.11 1.00 3.00 2.00 2.00 2.00 0.38 2.24
SAM_RT O4c_4_ID12oglindasolo unic .xls 0 35 1.35 0.33 0.05 1.00 2.30 1.30 1.28 1.00 1.23 3.79
SAM_RT O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls 0 35 2.69 1.91 0.32 1.00 7.93 6.93 1.74 7.93 1.11 2.99
SAM_RT O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls 0 35 6.40 3.23 0.55 1.36 16.12 14.75 5.62 1.97 0.96 3.70
SAM_RT O4c_Run2_ID10oglindasolo unic .xls 0 35 2.01 1.05 0.18 1.00 5.27 4.27 1.73 1.24 1.42 4.56
SAM_RT O4c_Run3_ID6oglindasolo unic .xls 0 35 1.68 0.78 0.13 1.00 3.99 2.99 1.37 1.51 1.58 4.72
SAM_RT O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls 0 35 1.63 0.60 0.10 1.00 3.15 2.15 1.54 1.00 0.76 2.55
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 2.38 0.57 0.10 1.46 3.74 2.28 2.30 3.04 0.19 2.37

descriptive_func(df = Unic_CTRL_Instr, Stim_type = "pozitiv", By_ID = FALSE)           # Positive - General

Unic_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls pozitiv 3 32 1.59 0.71 0.13 1.00 3.00 2.00 1.00 1.00 0.75 2.34
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls pozitiv 4 31 7.13 2.28 0.41 1.00 9.00 8.00 8.00 8.00 -1.76 5.00
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls pozitiv 0 35 1.00 0.00 0.00 1.00 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls pozitiv 0 35 4.91 1.50 0.25 3.00 8.00 5.00 5.00 5.00 0.52 2.48
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls pozitiv 1 34 2.50 1.05 0.18 1.00 5.00 4.00 2.00 2.00 0.48 2.45
SAM_RT O4c_2_ID17ecraninstructorunic .xls pozitiv 0 35 2.41 0.59 0.10 1.39 4.08 2.69 2.41 2.33 0.40 3.21
SAM_RT O4c_Run_ID8ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls pozitiv 0 35 1.90 0.96 0.16 1.00 4.89 3.89 1.63 1.01 1.77 5.75
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls pozitiv 0 35 1.25 0.29 0.05 1.00 2.50 1.50 1.18 1.14 2.48 10.70
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls pozitiv 0 35 1.30 0.31 0.05 1.00 2.74 1.74 1.27 2.74 2.87 14.25
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls pozitiv 0 35 1.41 0.49 0.08 1.00 3.55 2.54 1.27 1.76 2.59 11.43

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "pozitiv", By_ID = FALSE)

Unic_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls pozitiv 0 35 1.00 0.00 0.00 1.00 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_Run1_ID17ecransolo unic .xls pozitiv 1 34 1.91 0.83 0.14 1.00 4.00 3.00 2.00 2.00 0.49 2.44
SAM_Resp O4c_Run1_ID9ecransolo unic .xls pozitiv 0 35 5.03 1.20 0.20 3.00 7.00 4.00 5.00 4.00 0.36 2.08
SAM_Resp O4c_Run2_ID6ecransolo unic .xls pozitiv 1 34 7.09 1.88 0.32 2.00 9.00 7.00 7.50 8.00 -1.18 3.68
SAM_Resp O4c_Run2_ID8ecransolo unic .xls pozitiv 0 35 3.51 1.82 0.31 1.00 7.00 6.00 4.00 5.00 0.04 2.04
SAM_Resp O4c_Run3_ID10ecransolo unic .xls pozitiv 3 32 3.09 1.40 0.25 1.00 6.00 5.00 3.00 2.00 0.41 2.27
SAM_Resp Radu1ecransolo unic .xls pozitiv 4 31 5.48 1.09 0.20 3.00 8.00 5.00 6.00 6.00 -0.27 3.48
SAM_Resp Radu21ecransolo unic .xls pozitiv 0 35 5.89 1.30 0.22 3.00 8.00 5.00 6.00 6.00 -0.60 2.63
SAM_RT O4c_1_ID17ecransolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls pozitiv 0 35 1.39 0.42 0.07 1.00 2.91 1.91 1.27 1.21 1.83 6.56
SAM_RT O4c_Run1_ID17ecransolo unic .xls pozitiv 0 35 2.89 0.68 0.12 1.23 4.85 3.61 2.84 2.81 0.71 4.47
SAM_RT O4c_Run1_ID9ecransolo unic .xls pozitiv 0 35 1.91 0.80 0.14 1.00 3.87 2.87 1.71 3.87 0.94 2.74
SAM_RT O4c_Run2_ID6ecransolo unic .xls pozitiv 0 35 2.09 1.19 0.20 1.00 6.77 5.77 1.87 1.52 2.12 8.14
SAM_RT O4c_Run2_ID8ecransolo unic .xls pozitiv 0 35 1.93 0.83 0.14 1.00 4.49 3.48 1.73 1.12 1.14 3.95
SAM_RT O4c_Run3_ID10ecransolo unic .xls pozitiv 0 35 2.11 1.81 0.31 1.00 9.16 8.16 1.40 2.99 2.67 9.78
SAM_RT Radu1ecransolo unic .xls pozitiv 0 35 2.51 1.64 0.28 1.10 7.35 6.25 1.89 6.64 1.77 5.00
SAM_RT Radu21ecransolo unic .xls pozitiv 0 35 1.66 0.62 0.10 1.00 3.18 2.17 1.54 2.09 0.84 2.58

descriptive_func(df = Unic_OGL_Instr, Stim_type = "pozitiv", By_ID = FALSE)

Unic_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls pozitiv 0 35 1.29 0.52 0.09 1.00 3.00 2.00 1.00 1.00 1.57 4.56
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls pozitiv 0 35 3.86 1.59 0.27 1.00 8.00 7.00 4.00 4.00 0.33 2.85
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls pozitiv 1 34 2.41 0.78 0.13 1.00 4.00 3.00 2.00 3.00 -0.09 2.55
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls pozitiv 0 35 4.20 2.35 0.40 1.00 9.00 8.00 4.00 2.00 0.30 2.18
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls pozitiv 0 35 3.89 1.18 0.20 2.00 6.00 4.00 4.00 4.00 0.22 2.26
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls pozitiv 0 35 4.34 1.37 0.23 1.00 7.00 6.00 4.00 5.00 -0.22 2.89
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls pozitiv 0 35 5.14 1.38 0.23 2.00 7.00 5.00 5.00 4.00 -0.12 2.16
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls pozitiv 0 35 1.31 0.47 0.08 1.00 2.00 1.00 1.00 1.00 0.80 1.64
SAM_RT O4c_3_ID12oglindainstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls pozitiv 0 35 1.29 0.24 0.04 1.00 1.84 0.84 1.20 1.00 0.68 2.48
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls pozitiv 0 35 2.09 1.07 0.18 1.01 5.14 4.13 1.68 2.79 1.37 4.13
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls pozitiv 0 35 2.04 3.41 0.58 1.00 21.34 20.34 1.25 1.76 5.40 31.05
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls pozitiv 0 35 2.19 1.38 0.23 1.00 6.88 5.88 1.65 1.19 1.73 5.54
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls pozitiv 0 35 3.58 1.14 0.19 1.96 7.05 5.09 3.32 4.19 1.12 4.61
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls pozitiv 0 35 1.44 0.48 0.08 1.00 2.96 1.95 1.24 1.50 1.45 4.63
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls pozitiv 0 35 1.77 0.71 0.12 1.00 4.46 3.46 1.49 1.26 1.79 6.81
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls pozitiv 0 35 2.17 0.59 0.10 1.27 3.66 2.38 2.11 3.66 0.65 2.83

descriptive_func(df = Unic_OGL_Solo, Stim_type = "pozitiv", By_ID = FALSE)

Unic_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls pozitiv 0 35 1.34 0.48 0.08 1.00 2.00 1.00 1.00 1.00 0.66 1.44
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls pozitiv 5 30 5.77 2.42 0.44 1.00 9.00 8.00 6.50 8.00 -0.63 2.22
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls pozitiv 6 29 3.83 1.17 0.22 2.00 6.00 4.00 3.00 3.00 0.48 2.12
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls pozitiv 1 34 3.24 1.46 0.25 1.00 7.00 6.00 3.00 4.00 0.48 3.09
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls pozitiv 0 35 5.49 1.76 0.30 1.00 8.00 7.00 6.00 7.00 -0.74 2.74
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls pozitiv 0 35 4.91 1.79 0.30 1.00 9.00 8.00 5.00 4.00 0.35 2.76
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls pozitiv 0 35 1.49 0.51 0.09 1.00 2.00 1.00 1.00 1.00 0.06 1.00
SAM_RT O4c_4_ID12oglindasolo unic .xls pozitiv 0 35 1.24 0.43 0.07 1.00 3.48 2.48 1.14 1.42 4.27 22.86
SAM_RT O4c_Run1_ID13oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls pozitiv 0 35 3.34 3.35 0.57 1.01 15.21 14.20 2.00 6.63 2.15 6.97
SAM_RT O4c_Run1_ID16oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls pozitiv 0 35 4.83 2.55 0.43 2.02 15.44 13.41 4.10 3.17 2.51 10.27
SAM_RT O4c_Run2_ID10oglindasolo unic .xls pozitiv 0 35 2.12 1.35 0.23 1.00 6.72 5.71 1.59 1.21 2.06 6.70
SAM_RT O4c_Run3_ID6oglindasolo unic .xls pozitiv 0 35 1.78 0.86 0.15 1.00 4.89 3.89 1.44 1.43 1.80 6.41
SAM_RT O4c_Run4_ID12oglindasolo unic .xls pozitiv 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls pozitiv 0 35 1.55 0.55 0.09 1.00 3.08 2.08 1.34 1.61 1.23 3.93
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls pozitiv 0 35 2.16 0.83 0.14 1.00 4.54 3.53 1.98 1.79 0.87 3.30

descriptive_func(df = Unic_CTRL_Instr, Stim_type = "pozitiv", By_ID = TRUE)            # Positive - by id

Unic_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls 3 32 1.59 0.71 0.13 1.00 3.00 2.00 1.00 1.00 0.75 2.34
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls 4 31 7.13 2.28 0.41 1.00 9.00 8.00 8.00 8.00 -1.76 5.00
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls 0 35 1.00 0.00 0.00 1.00 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls 0 35 4.91 1.50 0.25 3.00 8.00 5.00 5.00 5.00 0.52 2.48
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls 1 34 2.50 1.05 0.18 1.00 5.00 4.00 2.00 2.00 0.48 2.45
SAM_RT O4c_2_ID17ecraninstructorunic .xls 0 35 2.41 0.59 0.10 1.39 4.08 2.69 2.41 2.33 0.40 3.21
SAM_RT O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls 0 35 1.90 0.96 0.16 1.00 4.89 3.89 1.63 1.01 1.77 5.75
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls 0 35 1.25 0.29 0.05 1.00 2.50 1.50 1.18 1.14 2.48 10.70
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls 0 35 1.30 0.31 0.05 1.00 2.74 1.74 1.27 2.74 2.87 14.25
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls 0 35 1.41 0.49 0.08 1.00 3.55 2.54 1.27 1.76 2.59 11.43

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "pozitiv", By_ID = TRUE)

Unic_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls 0 35 1.00 0.00 0.00 1.00 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_Run1_ID17ecransolo unic .xls 1 34 1.91 0.83 0.14 1.00 4.00 3.00 2.00 2.00 0.49 2.44
SAM_Resp O4c_Run1_ID9ecransolo unic .xls 0 35 5.03 1.20 0.20 3.00 7.00 4.00 5.00 4.00 0.36 2.08
SAM_Resp O4c_Run2_ID6ecransolo unic .xls 1 34 7.09 1.88 0.32 2.00 9.00 7.00 7.50 8.00 -1.18 3.68
SAM_Resp O4c_Run2_ID8ecransolo unic .xls 0 35 3.51 1.82 0.31 1.00 7.00 6.00 4.00 5.00 0.04 2.04
SAM_Resp O4c_Run3_ID10ecransolo unic .xls 3 32 3.09 1.40 0.25 1.00 6.00 5.00 3.00 2.00 0.41 2.27
SAM_Resp Radu1ecransolo unic .xls 4 31 5.48 1.09 0.20 3.00 8.00 5.00 6.00 6.00 -0.27 3.48
SAM_Resp Radu21ecransolo unic .xls 0 35 5.89 1.30 0.22 3.00 8.00 5.00 6.00 6.00 -0.60 2.63
SAM_RT O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls 0 35 1.39 0.42 0.07 1.00 2.91 1.91 1.27 1.21 1.83 6.56
SAM_RT O4c_Run1_ID17ecransolo unic .xls 0 35 2.89 0.68 0.12 1.23 4.85 3.61 2.84 2.81 0.71 4.47
SAM_RT O4c_Run1_ID9ecransolo unic .xls 0 35 1.91 0.80 0.14 1.00 3.87 2.87 1.71 3.87 0.94 2.74
SAM_RT O4c_Run2_ID6ecransolo unic .xls 0 35 2.09 1.19 0.20 1.00 6.77 5.77 1.87 1.52 2.12 8.14
SAM_RT O4c_Run2_ID8ecransolo unic .xls 0 35 1.93 0.83 0.14 1.00 4.49 3.48 1.73 1.12 1.14 3.95
SAM_RT O4c_Run3_ID10ecransolo unic .xls 0 35 2.11 1.81 0.31 1.00 9.16 8.16 1.40 2.99 2.67 9.78
SAM_RT Radu1ecransolo unic .xls 0 35 2.51 1.64 0.28 1.10 7.35 6.25 1.89 6.64 1.77 5.00
SAM_RT Radu21ecransolo unic .xls 0 35 1.66 0.62 0.10 1.00 3.18 2.17 1.54 2.09 0.84 2.58

descriptive_func(df = Unic_OGL_Instr, Stim_type = "pozitiv", By_ID = TRUE)

Unic_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls 0 35 1.29 0.52 0.09 1.00 3.00 2.00 1.00 1.00 1.57 4.56
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls 0 35 3.86 1.59 0.27 1.00 8.00 7.00 4.00 4.00 0.33 2.85
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls 1 34 2.41 0.78 0.13 1.00 4.00 3.00 2.00 3.00 -0.09 2.55
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls 0 35 4.20 2.35 0.40 1.00 9.00 8.00 4.00 2.00 0.30 2.18
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls 0 35 3.89 1.18 0.20 2.00 6.00 4.00 4.00 4.00 0.22 2.26
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls 0 35 4.34 1.37 0.23 1.00 7.00 6.00 4.00 5.00 -0.22 2.89
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls 0 35 5.14 1.38 0.23 2.00 7.00 5.00 5.00 4.00 -0.12 2.16
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 1.31 0.47 0.08 1.00 2.00 1.00 1.00 1.00 0.80 1.64
SAM_RT O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls 0 35 1.29 0.24 0.04 1.00 1.84 0.84 1.20 1.00 0.68 2.48
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls 0 35 2.09 1.07 0.18 1.01 5.14 4.13 1.68 2.79 1.37 4.13
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls 0 35 2.04 3.41 0.58 1.00 21.34 20.34 1.25 1.76 5.40 31.05
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls 0 35 2.19 1.38 0.23 1.00 6.88 5.88 1.65 1.19 1.73 5.54
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls 0 35 3.58 1.14 0.19 1.96 7.05 5.09 3.32 4.19 1.12 4.61
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls 0 35 1.44 0.48 0.08 1.00 2.96 1.95 1.24 1.50 1.45 4.63
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls 0 35 1.77 0.71 0.12 1.00 4.46 3.46 1.49 1.26 1.79 6.81
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 2.17 0.59 0.10 1.27 3.66 2.38 2.11 3.66 0.65 2.83

descriptive_func(df = Unic_OGL_Solo, Stim_type = "pozitiv", By_ID = TRUE)

Unic_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls 0 35 1.34 0.48 0.08 1.00 2.00 1.00 1.00 1.00 0.66 1.44
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls 5 30 5.77 2.42 0.44 1.00 9.00 8.00 6.50 8.00 -0.63 2.22
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls 6 29 3.83 1.17 0.22 2.00 6.00 4.00 3.00 3.00 0.48 2.12
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls 1 34 3.24 1.46 0.25 1.00 7.00 6.00 3.00 4.00 0.48 3.09
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls 0 35 5.49 1.76 0.30 1.00 8.00 7.00 6.00 7.00 -0.74 2.74
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls 0 35 4.91 1.79 0.30 1.00 9.00 8.00 5.00 4.00 0.35 2.76
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 1.49 0.51 0.09 1.00 2.00 1.00 1.00 1.00 0.06 1.00
SAM_RT O4c_4_ID12oglindasolo unic .xls 0 35 1.24 0.43 0.07 1.00 3.48 2.48 1.14 1.42 4.27 22.86
SAM_RT O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls 0 35 3.34 3.35 0.57 1.01 15.21 14.20 2.00 6.63 2.15 6.97
SAM_RT O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls 0 35 4.83 2.55 0.43 2.02 15.44 13.41 4.10 3.17 2.51 10.27
SAM_RT O4c_Run2_ID10oglindasolo unic .xls 0 35 2.12 1.35 0.23 1.00 6.72 5.71 1.59 1.21 2.06 6.70
SAM_RT O4c_Run3_ID6oglindasolo unic .xls 0 35 1.78 0.86 0.15 1.00 4.89 3.89 1.44 1.43 1.80 6.41
SAM_RT O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls 0 35 1.55 0.55 0.09 1.00 3.08 2.08 1.34 1.61 1.23 3.93
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 2.16 0.83 0.14 1.00 4.54 3.53 1.98 1.79 0.87 3.30

descriptive_func(df = Unic_CTRL_Instr, Stim_type = "neutru", By_ID = FALSE)           # Neutral - General

Unic_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls neutru 2 33 1.15 0.51 0.09 1.0 3.00 2.00 1.00 1.00 3.19 11.60
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls neutru 0 35 2.03 1.72 0.29 1.0 8.00 7.00 1.00 1.00 1.98 6.31
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls neutru 0 35 1.03 0.17 0.03 1.0 2.00 1.00 1.00 1.00 5.66 33.03
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls neutru 2 33 2.76 1.23 0.21 1.0 6.00 5.00 2.00 2.00 1.20 4.00
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls neutru 0 35 2.03 1.34 0.23 1.0 5.00 4.00 2.00 1.00 1.21 3.29
SAM_RT O4c_2_ID17ecraninstructorunic .xls neutru 0 35 2.17 0.51 0.09 1.3 3.47 2.16 2.13 2.12 0.84 3.42
SAM_RT O4c_Run_ID8ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls neutru 0 35 1.58 0.58 0.10 1.0 3.02 2.02 1.38 1.00 0.90 2.76
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls neutru 0 35 1.33 0.35 0.06 1.0 2.09 1.09 1.22 2.09 0.74 2.23
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls neutru 0 35 1.51 0.72 0.12 1.0 4.78 3.77 1.32 1.51 3.11 13.48
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls neutru 0 35 1.20 0.26 0.04 1.0 1.87 0.87 1.09 1.00 1.47 3.91

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "neutru", By_ID = FALSE)

Unic_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls neutru 0 35 1.09 0.51 0.09 1.00 4.00 3.00 1.00 1.00 5.66 33.03
SAM_Resp O4c_Run1_ID17ecransolo unic .xls neutru 2 33 1.39 0.93 0.16 1.00 5.00 4.00 1.00 1.00 2.66 9.47
SAM_Resp O4c_Run1_ID9ecransolo unic .xls neutru 0 35 3.63 1.31 0.22 1.00 7.00 6.00 3.00 3.00 0.47 3.05
SAM_Resp O4c_Run2_ID6ecransolo unic .xls neutru 0 35 2.09 1.54 0.26 1.00 6.00 5.00 1.00 1.00 1.03 2.63
SAM_Resp O4c_Run2_ID8ecransolo unic .xls neutru 1 34 2.29 1.62 0.28 1.00 6.00 5.00 1.00 1.00 0.81 2.19
SAM_Resp O4c_Run3_ID10ecransolo unic .xls neutru 1 34 2.06 1.30 0.22 1.00 5.00 4.00 2.00 1.00 1.06 3.02
SAM_Resp Radu1ecransolo unic .xls neutru 2 33 2.48 1.46 0.25 1.00 7.00 6.00 2.00 2.00 1.38 4.71
SAM_Resp Radu21ecransolo unic .xls neutru 1 34 2.74 1.83 0.31 1.00 7.00 6.00 2.00 2.00 0.94 2.60
SAM_RT O4c_1_ID17ecransolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls neutru 0 35 1.36 0.55 0.09 1.00 3.53 2.53 1.18 1.61 2.47 9.05
SAM_RT O4c_Run1_ID17ecransolo unic .xls neutru 0 35 2.54 0.90 0.15 1.46 5.03 3.57 2.34 2.71 1.30 4.16
SAM_RT O4c_Run1_ID9ecransolo unic .xls neutru 0 35 1.85 0.85 0.14 1.00 4.22 3.22 1.59 2.15 1.19 3.87
SAM_RT O4c_Run2_ID6ecransolo unic .xls neutru 0 35 1.97 0.94 0.16 1.00 4.59 3.59 1.81 1.06 1.38 4.22
SAM_RT O4c_Run2_ID8ecransolo unic .xls neutru 0 35 1.80 1.19 0.20 1.00 7.79 6.78 1.55 1.07 3.79 19.45
SAM_RT O4c_Run3_ID10ecransolo unic .xls neutru 0 35 1.75 1.05 0.18 1.00 5.90 4.90 1.35 1.45 2.22 8.35
SAM_RT Radu1ecransolo unic .xls neutru 0 35 2.32 1.19 0.20 1.00 5.31 4.30 2.02 2.38 1.08 3.36
SAM_RT Radu21ecransolo unic .xls neutru 0 35 1.75 1.13 0.19 1.00 6.89 5.89 1.39 1.17 3.07 13.61

descriptive_func(df = Unic_OGL_Instr, Stim_type = "neutru", By_ID = FALSE)

Unic_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls neutru 0 35 1.17 0.57 0.10 1.00 4.00 3.00 1.00 1.00 3.94 19.03
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls neutru 0 35 1.80 1.32 0.22 1.00 6.00 5.00 1.00 1.00 1.84 5.49
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls neutru 1 34 1.97 0.90 0.16 1.00 4.00 3.00 2.00 2.00 0.81 3.04
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls neutru 3 32 2.06 2.08 0.37 1.00 9.00 8.00 1.00 1.00 2.44 8.40
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls neutru 0 35 2.94 1.21 0.20 1.00 6.00 5.00 3.00 2.00 0.41 2.62
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls neutru 0 35 2.46 1.27 0.21 1.00 6.00 5.00 2.00 2.00 0.76 3.15
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls neutru 0 35 1.60 1.24 0.21 1.00 7.00 6.00 1.00 1.00 2.76 11.50
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls neutru 0 35 1.14 0.36 0.06 1.00 2.00 1.00 1.00 1.00 2.04 5.17
SAM_RT O4c_3_ID12oglindainstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls neutru 0 35 1.25 0.23 0.04 1.00 1.83 0.83 1.22 1.21 0.80 2.74
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls neutru 0 35 1.90 0.73 0.12 1.00 3.98 2.98 1.71 3.98 0.93 3.43
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls neutru 0 35 3.34 11.78 1.99 1.00 70.98 69.98 1.27 1.97 5.65 32.97
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls neutru 0 35 2.74 2.84 0.48 1.00 13.40 12.40 1.95 1.27 2.67 9.32
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls neutru 0 35 3.45 1.25 0.21 1.72 7.37 5.65 3.21 3.21 1.18 4.31
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls neutru 0 35 1.46 0.51 0.09 1.00 2.95 1.95 1.31 1.02 1.47 4.61
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls neutru 0 35 1.78 0.71 0.12 1.00 4.42 3.42 1.76 1.04 1.55 6.60
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls neutru 0 35 1.86 0.56 0.09 1.05 3.75 2.70 1.84 2.87 1.09 5.12

descriptive_func(df = Unic_OGL_Solo, Stim_type = "neutru", By_ID = FALSE)

Unic_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls neutru 0 35 1.20 0.41 0.07 1.00 2.00 1.00 1.00 1.00 1.50 3.25
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls neutru 1 34 3.12 2.45 0.42 1.00 8.00 7.00 2.00 1.00 0.91 2.40
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls neutru 7 28 2.68 1.19 0.22 1.00 6.00 5.00 2.00 2.00 0.78 3.27
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls neutru 0 35 1.94 1.33 0.22 1.00 5.00 4.00 1.00 1.00 1.18 3.12
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls neutru 0 35 1.60 0.98 0.17 1.00 5.00 4.00 1.00 1.00 1.83 6.05
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls neutru 0 35 2.74 1.24 0.21 1.00 6.00 5.00 3.00 2.00 0.59 2.89
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls neutru 0 35 1.14 0.43 0.07 1.00 3.00 2.00 1.00 1.00 3.08 11.98
SAM_RT O4c_4_ID12oglindasolo unic .xls neutru 0 35 1.20 0.20 0.03 1.00 1.57 0.56 1.15 1.55 0.64 1.91
SAM_RT O4c_Run1_ID13oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls neutru 0 35 3.11 1.64 0.28 1.03 7.58 6.55 2.75 7.58 0.84 3.04
SAM_RT O4c_Run1_ID16oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls neutru 0 35 4.87 1.95 0.33 1.92 9.85 7.93 4.56 2.08 0.78 3.02
SAM_RT O4c_Run2_ID10oglindasolo unic .xls neutru 0 35 1.77 0.78 0.13 1.00 3.73 2.73 1.38 1.95 0.82 2.43
SAM_RT O4c_Run3_ID6oglindasolo unic .xls neutru 0 35 1.92 0.83 0.14 1.00 4.10 3.10 1.72 1.00 1.12 3.40
SAM_RT O4c_Run4_ID12oglindasolo unic .xls neutru 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls neutru 0 35 1.67 0.68 0.12 1.00 4.15 3.15 1.56 1.00 1.73 6.52
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls neutru 0 35 1.71 0.52 0.09 1.04 2.83 1.80 1.68 1.22 0.55 2.39

descriptive_func(df = Unic_CTRL_Instr, Stim_type = "neutru", By_ID = TRUE)            # Neutral - by id

Unic_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_2_ID17ecraninstructorunic .xls 2 33 1.15 0.51 0.09 1.0 3.00 2.00 1.00 1.00 3.19 11.60
SAM_Resp O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_RUN1_ID06ecraninstructorunic .xls 0 35 2.03 1.72 0.29 1.0 8.00 7.00 1.00 1.00 1.98 6.31
SAM_Resp O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID12ecraninstructorunic .xls 0 35 1.03 0.17 0.03 1.0 2.00 1.00 1.00 1.00 5.66 33.03
SAM_Resp O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID9ecraninstructorunic X.xls 2 33 2.76 1.23 0.21 1.0 6.00 5.00 2.00 2.00 1.20 4.00
SAM_Resp O4c_Run4_ID10ecraninstructorunic .xls 0 35 2.03 1.34 0.23 1.0 5.00 4.00 2.00 1.00 1.21 3.29
SAM_RT O4c_2_ID17ecraninstructorunic .xls 0 35 2.17 0.51 0.09 1.3 3.47 2.16 2.13 2.12 0.84 3.42
SAM_RT O4c_Run_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_RUN1_ID06ecraninstructorunic .xls 0 35 1.58 0.58 0.10 1.0 3.02 2.02 1.38 1.00 0.90 2.76
SAM_RT O4c_Run1_ID8ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID12ecraninstructorunic .xls 0 35 1.33 0.35 0.06 1.0 2.09 1.09 1.22 2.09 0.74 2.23
SAM_RT O4c_Run2_ID9ecraninstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID9ecraninstructorunic X.xls 0 35 1.51 0.72 0.12 1.0 4.78 3.77 1.32 1.51 3.11 13.48
SAM_RT O4c_Run4_ID10ecraninstructorunic .xls 0 35 1.20 0.26 0.04 1.0 1.87 0.87 1.09 1.00 1.47 3.91

descriptive_func(df = Unic_CTRL_Solo, Stim_type = "neutru", By_ID = TRUE)

Unic_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID12ecransolo unic .xls 0 35 1.09 0.51 0.09 1.00 4.00 3.00 1.00 1.00 5.66 33.03
SAM_Resp O4c_Run1_ID17ecransolo unic .xls 2 33 1.39 0.93 0.16 1.00 5.00 4.00 1.00 1.00 2.66 9.47
SAM_Resp O4c_Run1_ID9ecransolo unic .xls 0 35 3.63 1.31 0.22 1.00 7.00 6.00 3.00 3.00 0.47 3.05
SAM_Resp O4c_Run2_ID6ecransolo unic .xls 0 35 2.09 1.54 0.26 1.00 6.00 5.00 1.00 1.00 1.03 2.63
SAM_Resp O4c_Run2_ID8ecransolo unic .xls 1 34 2.29 1.62 0.28 1.00 6.00 5.00 1.00 1.00 0.81 2.19
SAM_Resp O4c_Run3_ID10ecransolo unic .xls 1 34 2.06 1.30 0.22 1.00 5.00 4.00 2.00 1.00 1.06 3.02
SAM_Resp Radu1ecransolo unic .xls 2 33 2.48 1.46 0.25 1.00 7.00 6.00 2.00 2.00 1.38 4.71
SAM_Resp Radu21ecransolo unic .xls 1 34 2.74 1.83 0.31 1.00 7.00 6.00 2.00 2.00 0.94 2.60
SAM_RT O4c_1_ID17ecransolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID12ecransolo unic .xls 0 35 1.36 0.55 0.09 1.00 3.53 2.53 1.18 1.61 2.47 9.05
SAM_RT O4c_Run1_ID17ecransolo unic .xls 0 35 2.54 0.90 0.15 1.46 5.03 3.57 2.34 2.71 1.30 4.16
SAM_RT O4c_Run1_ID9ecransolo unic .xls 0 35 1.85 0.85 0.14 1.00 4.22 3.22 1.59 2.15 1.19 3.87
SAM_RT O4c_Run2_ID6ecransolo unic .xls 0 35 1.97 0.94 0.16 1.00 4.59 3.59 1.81 1.06 1.38 4.22
SAM_RT O4c_Run2_ID8ecransolo unic .xls 0 35 1.80 1.19 0.20 1.00 7.79 6.78 1.55 1.07 3.79 19.45
SAM_RT O4c_Run3_ID10ecransolo unic .xls 0 35 1.75 1.05 0.18 1.00 5.90 4.90 1.35 1.45 2.22 8.35
SAM_RT Radu1ecransolo unic .xls 0 35 2.32 1.19 0.20 1.00 5.31 4.30 2.02 2.38 1.08 3.36
SAM_RT Radu21ecransolo unic .xls 0 35 1.75 1.13 0.19 1.00 6.89 5.89 1.39 1.17 3.07 13.61

descriptive_func(df = Unic_OGL_Instr, Stim_type = "neutru", By_ID = TRUE)

Unic_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_3_ID12oglindainstructorunic X.xls 0 35 1.17 0.57 0.10 1.00 4.00 3.00 1.00 1.00 3.94 19.03
SAM_Resp O4c_Run1_ID10oglindainstructorunic .xls 0 35 1.80 1.32 0.22 1.00 6.00 5.00 1.00 1.00 1.84 5.49
SAM_Resp O4c_Run1_ID15oglindainstructorunic .xls 1 34 1.97 0.90 0.16 1.00 4.00 3.00 2.00 2.00 0.81 3.04
SAM_Resp O4c_Run2_ID13oglindainstructorunic .xls 3 32 2.06 2.08 0.37 1.00 9.00 8.00 1.00 1.00 2.44 8.40
SAM_Resp O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run2_ID16oglindainstructorunic X.xls 0 35 2.94 1.21 0.20 1.00 6.00 5.00 3.00 2.00 0.41 2.62
SAM_Resp O4c_Run3_ID9oglindainstructorunic .xls 0 35 2.46 1.27 0.21 1.00 6.00 5.00 2.00 2.00 0.76 3.15
SAM_Resp O4c_Run4_ID6oglindainstructorunic .xls 0 35 1.60 1.24 0.21 1.00 7.00 6.00 1.00 1.00 2.76 11.50
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 1.14 0.36 0.06 1.00 2.00 1.00 1.00 1.00 2.04 5.17
SAM_RT O4c_3_ID12oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_3_ID12oglindainstructorunic X.xls 0 35 1.25 0.23 0.04 1.00 1.83 0.83 1.22 1.21 0.80 2.74
SAM_RT O4c_Run1_ID10oglindainstructorunic .xls 0 35 1.90 0.73 0.12 1.00 3.98 2.98 1.71 3.98 0.93 3.43
SAM_RT O4c_Run1_ID15oglindainstructorunic .xls 0 35 3.34 11.78 1.99 1.00 70.98 69.98 1.27 1.97 5.65 32.97
SAM_RT O4c_Run2_ID13oglindainstructorunic .xls 0 35 2.74 2.84 0.48 1.00 13.40 12.40 1.95 1.27 2.67 9.32
SAM_RT O4c_Run2_ID16oglindainstructorunic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run2_ID16oglindainstructorunic X.xls 0 35 3.45 1.25 0.21 1.72 7.37 5.65 3.21 3.21 1.18 4.31
SAM_RT O4c_Run3_ID9oglindainstructorunic .xls 0 35 1.46 0.51 0.09 1.00 2.95 1.95 1.31 1.02 1.47 4.61
SAM_RT O4c_Run4_ID6oglindainstructorunic .xls 0 35 1.78 0.71 0.12 1.00 4.42 3.42 1.76 1.04 1.55 6.60
SAM_RT O4c_RunN(modifica N!)_ID1717oglindainstructorunic .xls 0 35 1.86 0.56 0.09 1.05 3.75 2.70 1.84 2.87 1.09 5.12

descriptive_func(df = Unic_OGL_Solo, Stim_type = "neutru", By_ID = TRUE)
Unic_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_4_ID12oglindasolo unic .xls 0 35 1.20 0.41 0.07 1.00 2.00 1.00 1.00 1.00 1.50 3.25
SAM_Resp O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID13oglindasolo unic X.xls 1 34 3.12 2.45 0.42 1.00 8.00 7.00 2.00 1.00 0.91 2.40
SAM_Resp O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run1_ID16oglindasolo unic X.xls 7 28 2.68 1.19 0.22 1.00 6.00 5.00 2.00 2.00 0.78 3.27
SAM_Resp O4c_Run2_ID10oglindasolo unic .xls 0 35 1.94 1.33 0.22 1.00 5.00 4.00 1.00 1.00 1.18 3.12
SAM_Resp O4c_Run3_ID6oglindasolo unic .xls 0 35 1.60 0.98 0.17 1.00 5.00 4.00 1.00 1.00 1.83 6.05
SAM_Resp O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_Resp O4c_Run4_ID9oglindasolo unic .xls 0 35 2.74 1.24 0.21 1.00 6.00 5.00 3.00 2.00 0.59 2.89
SAM_Resp O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 1.14 0.43 0.07 1.00 3.00 2.00 1.00 1.00 3.08 11.98
SAM_RT O4c_4_ID12oglindasolo unic .xls 0 35 1.20 0.20 0.03 1.00 1.57 0.56 1.15 1.55 0.64 1.91
SAM_RT O4c_Run1_ID13oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID13oglindasolo unic X.xls 0 35 3.11 1.64 0.28 1.03 7.58 6.55 2.75 7.58 0.84 3.04
SAM_RT O4c_Run1_ID16oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run1_ID16oglindasolo unic X.xls 0 35 4.87 1.95 0.33 1.92 9.85 7.93 4.56 2.08 0.78 3.02
SAM_RT O4c_Run2_ID10oglindasolo unic .xls 0 35 1.77 0.78 0.13 1.00 3.73 2.73 1.38 1.95 0.82 2.43
SAM_RT O4c_Run3_ID6oglindasolo unic .xls 0 35 1.92 0.83 0.14 1.00 4.10 3.10 1.72 1.00 1.12 3.40
SAM_RT O4c_Run4_ID12oglindasolo unic .xls 35 0 NaN NA NA Inf -Inf -Inf NA NA NaN NaN
SAM_RT O4c_Run4_ID9oglindasolo unic .xls 0 35 1.67 0.68 0.12 1.00 4.15 3.15 1.56 1.00 1.73 6.52
SAM_RT O4c_RunN(modifica N!)_ID1717oglindasolo unic .xls 0 35 1.71 0.52 0.09 1.04 2.83 1.80 1.68 1.22 0.55 2.39

2.2 Merge

############################## Merge condition dataset ############################################################
# Must first rename .id to ID in oder to have .id for df names
ID_rename <- function(df){
  if(".id" %in% colnames(df)) {
    df_modif <- 
      df %>%
      dplyr::rename("ID" = .id)
    df <- deparse(substitute(df))
    cat("Changed .id to ID for: ", as.name(df))
    assign(df, df_modif, envir = globalenv())
  }  
}
ID_rename(Unic_CTRL_Instr)
Changed .id to ID for:  Unic_CTRL_Instr
ID_rename(Unic_CTRL_Solo)
Changed .id to ID for:  Unic_CTRL_Solo
ID_rename(Unic_OGL_Instr)
Changed .id to ID for:  Unic_OGL_Instr
ID_rename(Unic_OGL_Solo)
Changed .id to ID for:  Unic_OGL_Solo
# Merge into one df
list_df_merge <- list(Unic_CTRL_Instr, Unic_CTRL_Solo, Unic_OGL_Instr, Unic_OGL_Solo)
names(list_df_merge) <- c("Unic_CTRL_Instr", "Unic_CTRL_Solo", "Unic_OGL_Instr", "Unic_OGL_Solo")
Unic_merged <- plyr::ldply(list_df_merge, data.frame)                    # also works for this job bind_rows(list_df_merge, .id = "column_label")

2.3 Analyses on merged (Anova & post-hoc)

############################## Analyses on Merged ################################################################
## Just a Test 
  # Unic_merged_spread_Neg <- 
  #   Unic_merged %>%
  #   filter(!is.na(SAM_Resp)) %>%                                           # some files had only NA on SAM_Resp and SAM_RT
  #   select(.id, ID, Subj_id, 
  #          Stimuli.order, MarkerStimuli, Stimulus.type, 
  #          SAM_Resp, SAM_RT) %>%
  #   filter(Stimulus.type == "negativ") %>%                                 # dont forget to pick stymulus type
  #   spread(.id, SAM_Resp)
  # 
  # t.test(Unic_merged_spread_Neg$Unic_CTRL_Instr, Unic_merged_spread_Neg$Unic_CTRL_Solo, na.rm = TRUE)
  # t.test(Unic_merged_spread_Neg$Unic_OGL_Instr, Unic_merged_spread_Neg$Unic_OGL_Solo, na.rm = TRUE)
  # t.test(Unic_merged_spread_Neg$Unic_OGL_Instr, Unic_merged_spread_Neg$Unic_CTRL_Instr, na.rm = TRUE)
  # t.test(Unic_merged_spread_Neg$Unic_OGL_Solo, Unic_merged_spread_Neg$Unic_CTRL_Solo, na.rm = TRUE)

## Function prepair data for analyses
prepaire_merged_func <- function(Stim_type){
  Unic_merged %>%
    filter(!is.na(SAM_Resp)) %>%                                           # some files had only NA on SAM_Resp and SAM_RT
    select(.id, ID, Subj_id, 
           Stimuli.order, MarkerStimuli, Stimulus.type, 
           SAM_Resp, SAM_RT) %>%
    dplyr::rename(Cond = .id) %>% 
    filter(Stimulus.type == Stim_type) %>%                                 # dont forget to pick stymulus type
    mutate(Cond = as.factor(Cond))                                         # tunr to factor for aov family functions
}

Unic_merged_Neg <- prepaire_merged_func("negativ")
Unic_merged_Neu <- prepaire_merged_func("neutru")
Unic_merged_Poz <- prepaire_merged_func("pozitiv")

## Anova and Post-Hoc
# Normality 
Unic_merged_Neg %>%
  select(SAM_Resp) %>%                                                     # must select variables outside function 
  tadaatoolbox::tadaa_normtest(method = "shapiro")                         # , print = "markdown"  for Notebook

# Levene Test (p>.05 = homogeneity of variances)
Unic_merged_Neg %>%
  tadaatoolbox::tadaa_levene(data = ., SAM_Resp ~ Cond)                    # , print = "markdown"  for Notebook

# Anova
Unic_merged_Neg %>%
  #do(broom::glance(aov(.$SAM_Resp ~ .$Cond)))                             # regular anova do(broom::tidy(aov(.$SAM_Resp ~ .$Cond)))
  tadaatoolbox::tadaa_aov(data = ., SAM_Resp ~ Cond, type = 1)             # , print = "markdown"  for Notebook

# Post-Hoc 
Unic_merged_Neg %>%
  # Tukey for equal variance 
  tadaatoolbox::tadaa_pairwise_tukey(data = ., SAM_Resp, Cond)             # , print = "markdown"  for Notebook
  # Games Howell does not assume equal variances
  #tadaatoolbox::tadaa_pairwise_gh(data = ., SAM_Resp, Cond)                # , print = "markdown"  for Notebook

2.4 Plots with p values

# by dataset
ggplot(Unic_merged, aes(x = Stimulus.type, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  facet_wrap(~.id) +
  ggpubr::stat_compare_means(method = "t.test", 
                             label = "p.signif",                                         # to avoid scientific notation of very small p-values
                             #paired = TRUE, 
                             comparisons = list(c("negativ", "neutru"),
                                                c("neutru", "pozitiv"),
                                                c("negativ", "pozitiv")))  

# by Stimulus type
ggplot(Unic_merged, aes(x = .id, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
  facet_wrap(~Stimulus.type) +
  ggpubr::stat_compare_means(method = "t.test",
                             label = "p.format",                                         # formated p-values
                             #paired = TRUE, 
                             comparisons = list(c("Unic_CTRL_Instr", "Unic_CTRL_Solo"),
                                                c("Unic_CTRL_Instr", "Unic_OGL_Instr"),
                                                c("Unic_CTRL_Solo", "Unic_OGL_Instr"),
                                                c("Unic_CTRL_Solo", "Unic_OGL_Solo"),
                                                c("Unic_OGL_Instr", "Unic_OGL_Solo"),
                                                c("Unic_CTRL_Instr", "Unic_OGL_Solo"))) 

# drop to CTRL vs OGL - by Stimulus type
Unic_merged %>%
  mutate(.id = case_when(.id %in% c("Unic_CTRL_Instr", "Unic_CTRL_Solo") ~ "Unic_CTRL",
                         .id %in% c("Unic_OGL_Instr", "Unic_OGL_Solo") ~ "Unic_OGL",
                         TRUE ~ as.character(.id))) %>%
    ggplot(aes(x = .id, y = SAM_Resp)) +
    geom_boxplot() +
    stat_summary(fun.data = mean_se,  colour = "darkred") +
    xlab("") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
    facet_wrap(~Stimulus.type) +
    ggpubr::stat_compare_means(method = "t.test",
                               label = "p.format",                                         # formated p-values
                               #paired = TRUE, 
                               comparisons = list(c("Unic_CTRL", "Unic_OGL")))          

# drop to Instr vs Solo - by Stimulus type
Unic_merged %>%
  mutate(.id = case_when(.id %in% c("Unic_CTRL_Instr", "Unic_OGL_Instr") ~ "Unic_Instr",
                         .id %in% c("Unic_CTRL_Solo", "Unic_OGL_Solo") ~ "Unic_Solo",
                         TRUE ~ as.character(.id))) %>%
    ggplot(aes(x = .id, y = SAM_Resp)) +
    geom_boxplot() +
    stat_summary(fun.data = mean_se,  colour = "darkred") +
    xlab("") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
    facet_wrap(~Stimulus.type) +
    ggpubr::stat_compare_means(method = "t.test",
                               label = "p.format",                                         # formated p-values
                               #paired = TRUE, 
                               comparisons = list(c("Unic_Instr", "Unic_Solo"))) 



3 Analysis - REPETATE

3.1 Descriptives

##########################################################################################################################
#################################### Analyses - REPETATE #################################################################
## Descriptives by condition dataset
descriptive_func <- function(df, Stim_type, By_ID = FALSE){
  df_name <- deparse(substitute(df))
  suppressWarnings({                                                                # if all NAs in SAM_Resp, NaNs and Infs will be produced
    df_modif <- 
      df %>%
      dplyr::rename("ID" = .id) %>%
      select_all(~gsub("\\s+|\\.", "_", .)) %>%                                     # replaces blancks with "_" in colnames 
      filter(Stimulus_type == Stim_type)                                            # filter by stimulus type
    
    if(isTRUE(By_ID)){                                                              # if true group by id, if not return descriptives for all ids
      df_modif %>%
        dplyr::group_by(ID) %>%
        tidystats::describe_data(SAM_Resp, SAM_RT, na.rm = TRUE) %>%
        knitr::kable(caption = as.name(df_name), format = "pandoc", digits = 2)
    }else{ 
      df_modif %>%
        tidystats::describe_data(SAM_Resp, SAM_RT, na.rm = TRUE) %>%
        knitr::kable(caption = as.name(df_name), format = "pandoc", digits = 2)
    }
  })
}  
descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "negativ", By_ID = FALSE)           # Negative - General

Repetat_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls negativ 6 74 3.31 0.91 0.11 2 6.00 4.00 4.00 4.00 -0.09 2.52
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls negativ 5 75 1.00 0.00 0.00 1 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls negativ 3 77 3.94 1.44 0.16 1 5.00 4.00 5.00 5.00 -1.05 2.63
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls negativ 1 23 3.09 1.24 0.26 1 4.00 3.00 4.00 4.00 -0.90 2.12
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls negativ 0 80 1.33 0.40 0.04 1 2.80 1.80 1.22 1.10 1.93 6.65
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls negativ 0 80 1.29 0.43 0.05 1 3.22 2.22 1.14 1.00 2.67 11.06
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls negativ 0 80 1.28 0.34 0.04 1 2.92 1.92 1.17 2.01 2.04 8.55
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls negativ 0 24 1.20 0.28 0.06 1 2.25 1.25 1.12 1.11 2.48 9.72

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "negativ", By_ID = FALSE)

Repetat_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls negativ 3 77 3.58 0.83 0.09 2 6.00 4.00 4.00 4.00 -0.48 3.29
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls negativ 6 74 1.20 0.91 0.11 1 8.00 7.00 1.00 1.00 6.15 44.60
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls negativ 0 80 4.34 1.08 0.12 1 5.00 4.00 5.00 5.00 -1.80 5.57
SAM_RT O4c_Run1_ID14ecransolo repetat.xls negativ 0 80 1.61 0.71 0.08 1 4.97 3.97 1.40 1.28 2.18 9.09
SAM_RT O4c_Run1_ID19ecransolo repetat.xls negativ 0 80 1.48 0.98 0.11 1 5.93 4.93 1.06 1.63 2.69 10.13
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls negativ 0 80 1.18 0.25 0.03 1 2.09 1.09 1.08 1.11 1.85 5.87

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "negativ", By_ID = FALSE)

Repetat_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls negativ 0 80 4.01 1.19 0.13 1.00 5.00 4.00 4.00 5.00 -0.94 2.79
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls negativ 1 79 1.84 1.48 0.17 1.00 7.00 6.00 1.00 1.00 1.98 6.18
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls negativ 11 69 3.00 2.29 0.28 1.00 7.00 6.00 1.00 1.00 0.42 1.44
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls negativ 0 80 1.31 0.31 0.03 1.00 2.56 1.56 1.24 1.01 1.45 5.48
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls negativ 0 80 1.41 0.90 0.10 1.00 6.67 5.66 1.12 1.13 3.87 19.83
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls negativ 0 80 3.48 1.97 0.22 1.12 10.24 9.12 2.72 5.94 1.35 4.39

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "negativ", By_ID = FALSE)

Repetat_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls negativ 0 80 3.92 1.02 0.11 1 5.00 4.00 4.00 5.00 -0.72 3.05
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls negativ 8 72 2.08 1.58 0.19 1 8.00 7.00 1.00 1.00 1.54 4.94
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls negativ 0 80 3.44 2.67 0.30 1 8.00 7.00 1.50 1.00 0.35 1.37
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls negativ 0 80 1.31 0.36 0.04 1 2.92 1.92 1.22 1.39 1.89 7.35
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls negativ 0 80 2.23 2.63 0.29 1 20.68 19.68 1.30 2.24 4.86 32.07
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls negativ 0 80 1.48 0.47 0.05 1 3.12 2.12 1.37 2.44 1.34 4.42

descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "negativ", By_ID = TRUE)            # Negative - by id

Repetat_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls 6 74 3.31 0.91 0.11 2 6.00 4.00 4.00 4.00 -0.09 2.52
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls 5 75 1.00 0.00 0.00 1 1.00 0.00 1.00 1.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 3 77 3.94 1.44 0.16 1 5.00 4.00 5.00 5.00 -1.05 2.63
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 1 23 3.09 1.24 0.26 1 4.00 3.00 4.00 4.00 -0.90 2.12
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls 0 80 1.33 0.40 0.04 1 2.80 1.80 1.22 1.10 1.93 6.65
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls 0 80 1.29 0.43 0.05 1 3.22 2.22 1.14 1.00 2.67 11.06
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 0 80 1.28 0.34 0.04 1 2.92 1.92 1.17 2.01 2.04 8.55
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 0 24 1.20 0.28 0.06 1 2.25 1.25 1.12 1.11 2.48 9.72

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "negativ", By_ID = TRUE)

Repetat_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls 3 77 3.58 0.83 0.09 2 6.00 4.00 4.00 4.00 -0.48 3.29
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls 6 74 1.20 0.91 0.11 1 8.00 7.00 1.00 1.00 6.15 44.60
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 4.34 1.08 0.12 1 5.00 4.00 5.00 5.00 -1.80 5.57
SAM_RT O4c_Run1_ID14ecransolo repetat.xls 0 80 1.61 0.71 0.08 1 4.97 3.97 1.40 1.28 2.18 9.09
SAM_RT O4c_Run1_ID19ecransolo repetat.xls 0 80 1.48 0.98 0.11 1 5.93 4.93 1.06 1.63 2.69 10.13
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 1.18 0.25 0.03 1 2.09 1.09 1.08 1.11 1.85 5.87

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "negativ", By_ID = TRUE)

Repetat_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 4.01 1.19 0.13 1.00 5.00 4.00 4.00 5.00 -0.94 2.79
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 1 79 1.84 1.48 0.17 1.00 7.00 6.00 1.00 1.00 1.98 6.18
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls 11 69 3.00 2.29 0.28 1.00 7.00 6.00 1.00 1.00 0.42 1.44
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 1.31 0.31 0.03 1.00 2.56 1.56 1.24 1.01 1.45 5.48
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 0 80 1.41 0.90 0.10 1.00 6.67 5.66 1.12 1.13 3.87 19.83
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls 0 80 3.48 1.97 0.22 1.12 10.24 9.12 2.72 5.94 1.35 4.39

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "negativ", By_ID = TRUE)

Repetat_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 3.92 1.02 0.11 1 5.00 4.00 4.00 5.00 -0.72 3.05
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 8 72 2.08 1.58 0.19 1 8.00 7.00 1.00 1.00 1.54 4.94
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls 0 80 3.44 2.67 0.30 1 8.00 7.00 1.50 1.00 0.35 1.37
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 1.31 0.36 0.04 1 2.92 1.92 1.22 1.39 1.89 7.35
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 0 80 2.23 2.63 0.29 1 20.68 19.68 1.30 2.24 4.86 32.07
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls 0 80 1.48 0.47 0.05 1 3.12 2.12 1.37 2.44 1.34 4.42

descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "pozitiv", By_ID = FALSE)           # Positive - General

Repetat_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls pozitiv 4 76 6.91 1.31 0.15 5 9.00 4.00 7.00 6.00 0.46 2.02
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls pozitiv 7 73 8.41 0.93 0.11 6 9.00 3.00 9.00 9.00 -1.11 2.63
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls pozitiv 1 79 5.42 2.25 0.25 1 9.00 8.00 5.00 5.00 -0.17 2.38
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls pozitiv 0 24 6.33 0.87 0.18 5 8.00 3.00 6.00 6.00 0.94 3.02
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls pozitiv 0 80 1.29 0.32 0.04 1 2.72 1.72 1.19 2.09 2.16 8.54
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls pozitiv 0 80 1.33 0.54 0.06 1 4.22 3.22 1.19 3.59 3.36 15.93
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls pozitiv 0 80 1.20 0.26 0.03 1 2.45 1.45 1.09 1.00 1.92 8.07
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls pozitiv 0 24 1.15 0.17 0.03 1 1.50 0.50 1.09 1.46 0.89 2.42

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "pozitiv", By_ID = FALSE)

Repetat_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls pozitiv 5 75 6.44 1.35 0.16 5 9.00 4.00 6.00 6.00 0.73 2.34
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls pozitiv 7 73 8.18 0.82 0.10 7 9.00 2.00 8.00 9.00 -0.34 1.58
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls pozitiv 0 80 5.29 1.32 0.15 2 9.00 7.00 5.00 5.00 0.38 3.69
SAM_RT O4c_Run1_ID14ecransolo repetat.xls pozitiv 0 80 1.81 1.05 0.12 1 8.38 7.38 1.47 1.00 3.42 20.62
SAM_RT O4c_Run1_ID19ecransolo repetat.xls pozitiv 0 80 1.65 0.96 0.11 1 6.06 5.05 1.25 2.94 2.25 8.56
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls pozitiv 0 80 1.22 0.24 0.03 1 2.12 1.12 1.14 2.12 1.55 5.27

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "pozitiv", By_ID = FALSE)

Repetat_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls pozitiv 0 80 6.05 1.68 0.19 3.00 9.00 6.00 5.50 5.00 0.21 1.67
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls pozitiv 1 79 5.77 2.22 0.25 1.00 9.00 8.00 6.00 4.00 -0.04 2.02
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls pozitiv 13 67 6.67 1.46 0.18 3.00 9.00 6.00 7.00 7.00 -0.30 2.60
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls pozitiv 0 80 1.19 0.24 0.03 1.00 2.15 1.15 1.13 1.67 1.71 6.13
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls pozitiv 0 80 1.35 0.69 0.08 1.00 5.77 4.77 1.10 1.27 4.06 23.74
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls pozitiv 0 80 3.99 1.88 0.21 1.66 10.11 8.45 3.30 2.46 1.30 4.05

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "pozitiv", By_ID = FALSE)

Repetat_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls pozitiv 0 80 5.79 0.91 0.10 4 9.00 5.00 6.00 5.00 1.04 4.18
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls pozitiv 9 71 5.42 2.22 0.26 1 9.00 8.00 5.00 4.00 -0.01 2.20
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls pozitiv 4 76 6.80 1.51 0.17 3 9.00 6.00 7.00 8.00 -0.38 2.46
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls pozitiv 0 80 1.32 0.36 0.04 1 3.15 2.15 1.21 1.00 2.30 10.94
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls pozitiv 0 80 2.20 1.71 0.19 1 9.33 8.33 1.48 1.00 1.98 7.01
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls pozitiv 0 80 2.01 1.08 0.12 1 5.61 4.61 1.61 2.25 1.57 5.19

descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "pozitiv", By_ID = TRUE)            # Positive - by id

Repetat_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls 4 76 6.91 1.31 0.15 5 9.00 4.00 7.00 6.00 0.46 2.02
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls 7 73 8.41 0.93 0.11 6 9.00 3.00 9.00 9.00 -1.11 2.63
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 1 79 5.42 2.25 0.25 1 9.00 8.00 5.00 5.00 -0.17 2.38
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 0 24 6.33 0.87 0.18 5 8.00 3.00 6.00 6.00 0.94 3.02
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls 0 80 1.29 0.32 0.04 1 2.72 1.72 1.19 2.09 2.16 8.54
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls 0 80 1.33 0.54 0.06 1 4.22 3.22 1.19 3.59 3.36 15.93
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 0 80 1.20 0.26 0.03 1 2.45 1.45 1.09 1.00 1.92 8.07
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 0 24 1.15 0.17 0.03 1 1.50 0.50 1.09 1.46 0.89 2.42

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "pozitiv", By_ID = TRUE)

Repetat_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls 5 75 6.44 1.35 0.16 5 9.00 4.00 6.00 6.00 0.73 2.34
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls 7 73 8.18 0.82 0.10 7 9.00 2.00 8.00 9.00 -0.34 1.58
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 5.29 1.32 0.15 2 9.00 7.00 5.00 5.00 0.38 3.69
SAM_RT O4c_Run1_ID14ecransolo repetat.xls 0 80 1.81 1.05 0.12 1 8.38 7.38 1.47 1.00 3.42 20.62
SAM_RT O4c_Run1_ID19ecransolo repetat.xls 0 80 1.65 0.96 0.11 1 6.06 5.05 1.25 2.94 2.25 8.56
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 1.22 0.24 0.03 1 2.12 1.12 1.14 2.12 1.55 5.27

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "pozitiv", By_ID = TRUE)

Repetat_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 6.05 1.68 0.19 3.00 9.00 6.00 5.50 5.00 0.21 1.67
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 1 79 5.77 2.22 0.25 1.00 9.00 8.00 6.00 4.00 -0.04 2.02
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls 13 67 6.67 1.46 0.18 3.00 9.00 6.00 7.00 7.00 -0.30 2.60
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 1.19 0.24 0.03 1.00 2.15 1.15 1.13 1.67 1.71 6.13
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 0 80 1.35 0.69 0.08 1.00 5.77 4.77 1.10 1.27 4.06 23.74
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls 0 80 3.99 1.88 0.21 1.66 10.11 8.45 3.30 2.46 1.30 4.05

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "pozitiv", By_ID = TRUE)

Repetat_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 5.79 0.91 0.10 4 9.00 5.00 6.00 5.00 1.04 4.18
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 9 71 5.42 2.22 0.26 1 9.00 8.00 5.00 4.00 -0.01 2.20
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls 4 76 6.80 1.51 0.17 3 9.00 6.00 7.00 8.00 -0.38 2.46
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 1.32 0.36 0.04 1 3.15 2.15 1.21 1.00 2.30 10.94
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 0 80 2.20 1.71 0.19 1 9.33 8.33 1.48 1.00 1.98 7.01
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls 0 80 2.01 1.08 0.12 1 5.61 4.61 1.61 2.25 1.57 5.19

descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "neutru", By_ID = FALSE)           # Neutral - General

Repetat_CTRL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls neutru 7 73 6.19 1.13 0.13 5 8.00 3.00 6.00 6.00 0.62 2.01
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls neutru 6 74 6.22 2.11 0.25 3 9.00 6.00 6.00 6.00 -0.15 2.05
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls neutru 0 80 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls neutru 1 23 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls neutru 0 80 1.33 0.40 0.05 1 2.63 1.63 1.19 2.45 1.73 5.38
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls neutru 0 80 1.33 0.45 0.05 1 3.68 2.68 1.15 3.68 2.47 11.35
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls neutru 0 80 1.19 0.20 0.02 1 1.73 0.73 1.11 1.00 0.94 2.73
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls neutru 0 24 1.20 0.31 0.06 1 2.42 1.42 1.14 1.04 2.79 11.45

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "neutru", By_ID = FALSE)

Repetat_CTRL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls neutru 6 74 5.97 1.13 0.13 5 8.00 3.00 6.00 5.00 0.73 2.06
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls neutru 8 72 6.54 2.35 0.28 2 9.00 7.00 7.00 9.00 -0.61 1.96
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls neutru 0 80 4.99 0.11 0.01 4 5.00 1.00 5.00 5.00 -8.78 78.01
SAM_RT O4c_Run1_ID14ecransolo repetat.xls neutru 0 80 1.67 0.87 0.10 1 5.23 4.23 1.35 1.12 2.05 7.54
SAM_RT O4c_Run1_ID19ecransolo repetat.xls neutru 0 80 1.77 0.99 0.11 1 5.73 4.73 1.37 1.09 1.85 6.72
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls neutru 0 80 1.15 0.16 0.02 1 1.79 0.79 1.11 1.00 1.34 5.09

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "neutru", By_ID = FALSE)

Repetat_OGL_Instr
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls neutru 0 80 5.05 0.22 0.02 5.00 6.00 1.00 5.00 5.00 4.13 18.05
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls neutru 1 79 4.99 1.03 0.12 1.00 7.00 6.00 5.00 5.00 -1.53 6.66
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls neutru 14 66 5.79 1.67 0.21 2.00 8.00 6.00 6.00 7.00 -0.78 2.82
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls neutru 0 80 1.19 0.18 0.02 1.00 1.78 0.78 1.14 1.78 1.05 3.51
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls neutru 0 80 1.34 0.76 0.09 1.00 6.47 5.47 1.12 1.37 4.59 28.22
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls neutru 0 80 4.19 2.49 0.28 1.63 12.75 11.12 3.25 2.31 1.72 5.70

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "neutru", By_ID = FALSE)

Repetat_OGL_Solo
var ID Stimulus_type missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls neutru 0 80 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls neutru 6 74 4.99 1.49 0.17 1 9.00 8.00 5.00 5.00 -0.63 4.75
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls neutru 2 78 6.36 1.74 0.20 2 9.00 7.00 7.00 7.00 -0.95 3.49
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls neutru 0 80 1.28 0.35 0.04 1 2.64 1.64 1.18 1.08 1.71 5.95
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls neutru 0 80 2.04 1.70 0.19 1 10.22 9.22 1.29 2.05 2.52 10.16
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls neutru 0 80 1.78 0.86 0.10 1 5.26 4.25 1.44 2.12 1.93 6.77

descriptive_func(df = Repetat_CTRL_Instr, Stim_type = "neutru", By_ID = TRUE)            # Neutral - by id

Repetat_CTRL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run2_ID14ecraninstructorrepetat.xls 7 73 6.19 1.13 0.13 5 8.00 3.00 6.00 6.00 0.62 2.01
SAM_Resp O4c_Run2_ID19ecraninstructorrepetat.xls 6 74 6.22 2.11 0.25 3 9.00 6.00 6.00 6.00 -0.15 2.05
SAM_Resp O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 0 80 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 1 23 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_RT O4c_Run2_ID14ecraninstructorrepetat.xls 0 80 1.33 0.40 0.05 1 2.63 1.63 1.19 2.45 1.73 5.38
SAM_RT O4c_Run2_ID19ecraninstructorrepetat.xls 0 80 1.33 0.45 0.05 1 3.68 2.68 1.15 3.68 2.47 11.35
SAM_RT O4c_RunN(modifica N!)_ID07ecraninstructorrepetatX.xls 0 80 1.19 0.20 0.02 1 1.73 0.73 1.11 1.00 0.94 2.73
SAM_RT O4c_RunN(modifica N!)_ID7ecraninstructorrepetat.xls 0 24 1.20 0.31 0.06 1 2.42 1.42 1.14 1.04 2.79 11.45

descriptive_func(df = Repetat_CTRL_Solo, Stim_type = "neutru", By_ID = TRUE)

Repetat_CTRL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_Run1_ID14ecransolo repetat.xls 6 74 5.97 1.13 0.13 5 8.00 3.00 6.00 5.00 0.73 2.06
SAM_Resp O4c_Run1_ID19ecransolo repetat.xls 8 72 6.54 2.35 0.28 2 9.00 7.00 7.00 9.00 -0.61 1.96
SAM_Resp O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 4.99 0.11 0.01 4 5.00 1.00 5.00 5.00 -8.78 78.01
SAM_RT O4c_Run1_ID14ecransolo repetat.xls 0 80 1.67 0.87 0.10 1 5.23 4.23 1.35 1.12 2.05 7.54
SAM_RT O4c_Run1_ID19ecransolo repetat.xls 0 80 1.77 0.99 0.11 1 5.73 4.73 1.37 1.09 1.85 6.72
SAM_RT O4c_RunN(modifica N!)_ID07ecransolo repetat.xls 0 80 1.15 0.16 0.02 1 1.79 0.79 1.11 1.00 1.34 5.09

descriptive_func(df = Repetat_OGL_Instr, Stim_type = "neutru", By_ID = TRUE)

Repetat_OGL_Instr
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 5.05 0.22 0.02 5.00 6.00 1.00 5.00 5.00 4.13 18.05
SAM_Resp O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 1 79 4.99 1.03 0.12 1.00 7.00 6.00 5.00 5.00 -1.53 6.66
SAM_Resp O4c_RunN_ID1818oglindainstructorrepetat.xls 14 66 5.79 1.67 0.21 2.00 8.00 6.00 6.00 7.00 -0.78 2.82
SAM_RT O4c_RunN(modifica N!)_ID0707oglindainstructorrepetat.xls 0 80 1.19 0.18 0.02 1.00 1.78 0.78 1.14 1.78 1.05 3.51
SAM_RT O4c_RunN(modifica N!)_ID11oglindainstructorrepetat.xls 0 80 1.34 0.76 0.09 1.00 6.47 5.47 1.12 1.37 4.59 28.22
SAM_RT O4c_RunN_ID1818oglindainstructorrepetat.xls 0 80 4.19 2.49 0.28 1.63 12.75 11.12 3.25 2.31 1.72 5.70

descriptive_func(df = Repetat_OGL_Solo, Stim_type = "neutru", By_ID = TRUE)
Repetat_OGL_Solo
var ID missing n M SD SE min max range median mode skew kurtosis
SAM_Resp O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 5.00 0.00 0.00 5 5.00 0.00 5.00 5.00 NaN NaN
SAM_Resp O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 6 74 4.99 1.49 0.17 1 9.00 8.00 5.00 5.00 -0.63 4.75
SAM_Resp O4c_RunN_ID18oglindasolo repetat.xls 2 78 6.36 1.74 0.20 2 9.00 7.00 7.00 7.00 -0.95 3.49
SAM_RT O4c_RunN(modifica N!)_ID07067oglindasolo repetat.xls 0 80 1.28 0.35 0.04 1 2.64 1.64 1.18 1.08 1.71 5.95
SAM_RT O4c_RunN(modifica N!)_ID11oglindasolo repetat.xls 0 80 2.04 1.70 0.19 1 10.22 9.22 1.29 2.05 2.52 10.16
SAM_RT O4c_RunN_ID18oglindasolo repetat.xls 0 80 1.78 0.86 0.10 1 5.26 4.25 1.44 2.12 1.93 6.77

3.2 Merge

############################## Merge condition dataset ############################################################
# Must first rename .id to ID in oder to have .id for df names
ID_rename <- function(df){
  if(".id" %in% colnames(df)) {
    df_modif <- 
      df %>%
      dplyr::rename("ID" = .id)
    df <- deparse(substitute(df))
    cat("Changed .id to ID for: ", as.name(df))
    assign(df, df_modif, envir = globalenv())
  }  
}
ID_rename(Repetat_CTRL_Instr)
Changed .id to ID for:  Repetat_CTRL_Instr
ID_rename(Repetat_CTRL_Solo)
Changed .id to ID for:  Repetat_CTRL_Solo
ID_rename(Repetat_OGL_Instr)
Changed .id to ID for:  Repetat_OGL_Instr
ID_rename(Repetat_OGL_Solo)
Changed .id to ID for:  Repetat_OGL_Solo
# Merge into one df
list_df_merge <- list(Repetat_CTRL_Instr, Repetat_CTRL_Solo, Repetat_OGL_Instr, Repetat_OGL_Solo)
names(list_df_merge) <- c("Repetat_CTRL_Instr", "Repetat_CTRL_Solo", "Repetat_OGL_Instr", "Repetat_OGL_Solo")
Repetat_merged <- plyr::ldply(list_df_merge, data.frame)                # also works for this job bind_rows(list_df_merge, .id = "column_label")

3.3 Analyses on merged (Anova & post-hoc)

############################## Analyses on Merged ################################################################
## Just a Test 
# Repetat_merged_spread_Neg <- 
#   Repetat_merged %>%
#   filter(!is.na(SAM_Resp)) %>%                                           # some files had only NA on SAM_Resp and SAM_RT
#   select(.id, ID, Subj_id, 
#          Stimuli.order, MarkerStimuli, Stimulus.type, 
#          SAM_Resp, SAM_RT) %>%
#   filter(Stimulus.type == "negativ") %>%                                 # dont forget to pick stymulus type
#   spread(.id, SAM_Resp)
# 
# t.test(Repetat_merged_spread_Neg$Repetat_CTRL_Instr, Repetat_merged_spread_Neg$Repetat_CTRL_Solo, na.rm = TRUE)
# t.test(Repetat_merged_spread_Neg$Repetat_OGL_Instr, Repetat_merged_spread_Neg$Repetat_OGL_Solo, na.rm = TRUE)
# t.test(Repetat_merged_spread_Neg$Repetat_OGL_Instr, Repetat_merged_spread_Neg$Repetat_CTRL_Instr, na.rm = TRUE)
# t.test(Repetat_merged_spread_Neg$Repetat_OGL_Solo, Repetat_merged_spread_Neg$Repetat_CTRL_Solo, na.rm = TRUE)

## Function prepair data for analyses
prepaire_merged_func <- function(Stim_type){
  Repetat_merged %>%
    filter(!is.na(SAM_Resp)) %>%                                           # some files had only NA on SAM_Resp and SAM_RT
    select(.id, ID, Subj_id, 
           Stimuli.order, MarkerStimuli, Stimulus.type, 
           SAM_Resp, SAM_RT) %>%
    dplyr::rename(Cond = .id) %>% 
    filter(Stimulus.type == Stim_type) %>%                                 # dont forget to pick stymulus type
    mutate(Cond = as.factor(Cond))                                         # tunr to factor for aov family functions
}

Repetat_merged_Neg <- prepaire_merged_func("negativ")
Repetat_merged_Neu <- prepaire_merged_func("neutru")
Repetat_merged_Poz <- prepaire_merged_func("pozitiv")

## Anova and Post-Hoc
# Normality 
Repetat_merged_Neg %>%
  select(SAM_Resp) %>%                                                     # must select variables outside function 
  tadaatoolbox::tadaa_normtest(method = "shapiro")                         # , print = "markdown"  for Notebook

# Levene Test (p>.05 = homogeneity of variances)
Repetat_merged_Neg %>%
  tadaatoolbox::tadaa_levene(data = ., SAM_Resp ~ Cond)                    # , print = "markdown"  for Notebook

# Anova
Repetat_merged_Neg %>%
  #do(broom::glance(aov(.$SAM_Resp ~ .$Cond)))                             # regular anova do(broom::tidy(aov(.$SAM_Resp ~ .$Cond)))
  tadaatoolbox::tadaa_aov(data = ., SAM_Resp ~ Cond, type = 1)             # , print = "markdown"  for Notebook

# Post-Hoc 
Repetat_merged_Neg %>%
  # Tukey for equal variance 
  tadaatoolbox::tadaa_pairwise_tukey(data = ., SAM_Resp, Cond)             # , print = "markdown"  for Notebook
# Games Howell does not assume equal variances
#tadaatoolbox::tadaa_pairwise_gh(data = ., SAM_Resp, Cond)                # , print = "markdown"  for Notebook

3.4 Plots with p values

## Plots
options(scipen = 999)                                 # positive values bias towards fixed and negative towards scientific notation
theme_set(papaja::theme_apa())                        # theme for plots          
# by dataset
ggplot(Repetat_merged, aes(x = Stimulus.type, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  facet_wrap(~.id) +
  ggpubr::stat_compare_means(method = "t.test", 
                             label = "p.signif",                                         # to avoid scientific notation of very small p-values
                             #paired = TRUE, 
                             comparisons = list(c("negativ", "neutru"),
                                                c("neutru", "pozitiv"),
                                                c("negativ", "pozitiv")))  

# by Stimulus type
ggplot(Repetat_merged, aes(x = .id, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
  facet_wrap(~Stimulus.type) +
  ggpubr::stat_compare_means(method = "t.test",
                             label = "p.format",                                         # formated p-values
                             #paired = TRUE, 
                             comparisons = list(c("Repetat_CTRL_Instr", "Repetat_CTRL_Solo"),
                                                c("Repetat_CTRL_Instr", "Repetat_OGL_Instr"),
                                                c("Repetat_CTRL_Solo", "Repetat_OGL_Instr"),
                                                c("Repetat_CTRL_Solo", "Repetat_OGL_Solo"),
                                                c("Repetat_OGL_Instr", "Repetat_OGL_Solo"),
                                                c("Repetat_CTRL_Instr", "Repetat_OGL_Solo"))) 

# drop to CTRL vs OGL - by Stimulus type
Repetat_merged %>%
  mutate(.id = case_when(.id %in% c("Repetat_CTRL_Instr", "Repetat_CTRL_Solo") ~ "Repetat_CTRL",
                         .id %in% c("Repetat_OGL_Instr", "Repetat_OGL_Solo") ~ "Repetat_OGL",
                         TRUE ~ as.character(.id))) %>%
  ggplot(aes(x = .id, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
  facet_wrap(~Stimulus.type) +
  ggpubr::stat_compare_means(method = "t.test",
                             label = "p.format",                                         # formated p-values
                             #paired = TRUE, 
                             comparisons = list(c("Repetat_CTRL", "Repetat_OGL")))          

# drop to Instr vs Solo - by Stimulus type
Repetat_merged %>%
  mutate(.id = case_when(.id %in% c("Repetat_CTRL_Instr", "Repetat_OGL_Instr") ~ "Repetat_Instr",
                         .id %in% c("Repetat_CTRL_Solo", "Repetat_OGL_Solo") ~ "Repetat_Solo",
                         TRUE ~ as.character(.id))) %>%
  ggplot(aes(x = .id, y = SAM_Resp)) +
  geom_boxplot() +
  stat_summary(fun.data = mean_se,  colour = "darkred") +
  xlab("") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
  facet_wrap(~Stimulus.type) +
  ggpubr::stat_compare_means(method = "t.test",
                             label = "p.format",                                         # formated p-values
                             #paired = TRUE, 
                             comparisons = list(c("Repetat_Instr", "Repetat_Solo"))) 


4 Session Info

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Romanian_Romania.1250  LC_CTYPE=Romanian_Romania.1250    LC_MONETARY=Romanian_Romania.1250 LC_NUMERIC=C                     
[5] LC_TIME=Romanian_Romania.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2     plyr_1.8.4         summarytools_0.8.8 DT_0.5             ggpubr_0.2         magrittr_1.5       broom_0.5.1       
 [8] papaja_0.1.0.9842  psych_1.8.10       forcats_0.3.0      stringr_1.3.1      dplyr_0.7.8        purrr_0.2.5        readr_1.3.0       
[15] tidyr_0.8.2        tibble_1.4.2       ggplot2_3.1.0      tidyverse_1.2.1    pacman_0.5.0      

loaded via a namespace (and not attached):
 [1] httr_1.4.0         jsonlite_1.6       modelr_0.1.2       shiny_1.2.0        assertthat_0.2.0   highr_0.7          pander_0.6.3      
 [8] cellranger_1.1.0   yaml_2.2.0         pillar_1.3.1       backports_1.1.3    lattice_0.20-38    glue_1.3.0         digest_0.6.18     
[15] ggsignif_0.4.0     promises_1.0.1     pryr_0.1.4         rvest_0.3.2        colorspace_1.3-2   htmltools_0.3.6    httpuv_1.4.5      
[22] pkgconfig_2.0.2    haven_2.1.0        xtable_1.8-3       scales_1.0.0       openxlsx_4.1.0     later_0.7.5        rio_0.5.16        
[29] generics_0.0.2     withr_2.1.2        lazyeval_0.2.1     cli_1.0.1          mnormt_1.5-5       crayon_1.3.4       readxl_1.1.0      
[36] mime_0.6           evaluate_0.12      nlme_3.1-137       xml2_1.2.0         foreign_0.8-71     rapportools_1.0    tools_3.5.2       
[43] data.table_1.12.2  hms_0.4.2          matrixStats_0.54.0 munsell_0.5.0      zip_1.0.0          compiler_3.5.2     rlang_0.3.1       
[50] grid_3.5.2         RCurl_1.95-4.11    rstudioapi_0.8     htmlwidgets_1.3    labeling_0.3       bitops_1.0-6       rmarkdown_1.11    
[57] gtable_0.2.0       codetools_0.2-15   curl_3.2           R6_2.3.0           tidystats_0.3      lubridate_1.7.4    knitr_1.21        
[64] bindr_0.1.1        stringi_1.2.4      parallel_3.5.2     Rcpp_1.0.0         tidyselect_0.2.5   xfun_0.4          
 

A work by Claudiu Papasteri

claudiu.papasteri@gmail.com

 

LS0tDQp0aXRsZTogIjxicj4gTy40IC0gVW5pY2UgYW5kIFJldGF0YXRlIiANCnN1YnRpdGxlOiAiUHJlbGltaW5hcnkgUmVwb3J0Ig0KYXV0aG9yOiAiPGJyPiBDbGF1ZGl1IFBhcGFzdGVyaSINCmRhdGU6ICJgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkICVtICVZJylgIg0Kb3V0cHV0OiANCiAgICBodG1sX25vdGVib29rOg0KICAgICAgICAgICAgY29kZV9mb2xkaW5nOiBoaWRlDQogICAgICAgICAgICB0b2M6IHRydWUNCiAgICAgICAgICAgIHRvY19kZXB0aDogMg0KICAgICAgICAgICAgbnVtYmVyX3NlY3Rpb25zOiB0cnVlDQogICAgICAgICAgICB0aGVtZTogc3BhY2VsYWINCiAgICAgICAgICAgIGhpZ2hsaWdodDogdGFuZ28NCiAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBBcmlhbA0KICAgICAgICAgICAgZmlnX3dpZHRoOiAxMA0KICAgICAgICAgICAgZmlnX2hlaWdodDogOQ0KICAgIHBkZl9kb2N1bWVudDogDQogICAgICAgICAgICB0b2M6IHRydWUNCiAgICAgICAgICAgIHRvY19kZXB0aDogMg0KICAgICAgICAgICAgbnVtYmVyX3NlY3Rpb25zOiB0cnVlDQogICAgICAgICAgICAjIGZvbnRzaXplOiAxMXB0DQogICAgICAgICAgICAjIGdlb21ldHJ5OiBtYXJnaW49MWluDQogICAgICAgICAgICAjIGZpZ193aWR0aDogNw0KICAgICAgICAgICAgIyBmaWdfaGVpZ2h0OiA2DQogICAgICAgICAgICAjIGZpZ19jYXB0aW9uOiB0cnVlDQogICAgIyBnaXRodWJfZG9jdW1lbnQ6IA0KICAgICAgICAgICAgIyB0b2M6IHRydWUNCiAgICAgICAgICAgICMgdG9jX2RlcHRoOiAyDQogICAgICAgICAgICAjIGh0bWxfcHJldmlldzogZmFsc2UNCiAgICAgICAgICAgICMgZmlnX3dpZHRoOiA1DQogICAgICAgICAgICAjIGZpZ19oZWlnaHQ6IDUNCiAgICAgICAgICAgICMgZGV2OiBqcGVnDQotLS0NCg0KDQo8IS0tIFNldHVw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xvdCgpICsNCiAgc3RhdF9zdW1tYXJ5KGZ1bi5kYXRhID0gbWVhbl9zZSwgIGNvbG91ciA9ICJkYXJrcmVkIikgKw0KICB4bGFiKCIiKSArDQogIGZhY2V0X3dyYXAofi5pZCkgKw0KICBnZ3B1YnI6OnN0YXRfY29tcGFyZV9tZWFucyhtZXRob2QgPSAidC50ZXN0IiwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsID0gInAuc2lnbmlmIiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgdG8gYXZvaWQgc2NpZW50aWZpYyBub3RhdGlvbiBvZiB2ZXJ5IHNtYWxsIHAtdmFsdWVzDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICNwYWlyZWQgPSBUUlVFLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGFyaXNvbnMgPSBsaXN0KGMoIm5lZ2F0aXYiLCAibmV1dHJ1IiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJuZXV0cnUiLCAicG96aXRpdiIpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYygibmVnYXRpdiIsICJwb3ppdGl2IikpKSAgDQoNCiMgYnkgU3RpbXVsdXMgdHlwZQ0KZ2dwbG90KFVuaWNfbWVyZ2VkLCBhZXMoeCA9IC5pZCwgeSA9IFNBTV9SZXNwKSkgKw0KICBnZW9tX2JveHBsb3QoKSArDQogIHN0YXRfc3VtbWFyeShmdW4uZGF0YSA9IG1lYW5fc2UsICBjb2xvdXIgPSAiZGFya3JlZCIpICsNCiAgeGxhYigiIikgKw0KICB0aGVtZShheGlzLnRleHQueCA9IGVsZW1lbnRfdGV4dChhbmdsZSA9IDkwLCBoanVzdCA9IDEpKSArDQogIGZhY2V0X3dyYXAoflN0aW11bHVzLnR5cGUpICsNCiAgZ2dwdWJyOjpzdGF0X2NvbXBhcmVfbWVhbnMobWV0aG9kID0gInQudGVzdCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsID0gInAuZm9ybWF0IiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgZm9ybWF0ZWQgcC12YWx1ZXMNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI3BhaXJlZCA9IFRSVUUsIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJpc29ucyA9IGxpc3QoYygiVW5pY19DVFJMX0luc3RyIiwgIlVuaWNfQ1RSTF9Tb2xvIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJVbmljX0NUUkxfSW5zdHIiLCAiVW5pY19PR0xfSW5zdHIiKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIlVuaWNfQ1RSTF9Tb2xvIiwgIlVuaWNfT0dMX0luc3RyIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJVbmljX0NUUkxfU29sbyIsICJVbmljX09HTF9Tb2xvIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJVbmljX09HTF9JbnN0ciIsICJVbmljX09HTF9Tb2xvIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJVbmljX0NUUkxfSW5zdHIiLCAiVW5pY19PR0xfU29sbyIpKSkgDQoNCg0KIyBkcm9wIHRvIENUUkwgdnMgT0dMIC0gYnkgU3RpbXVsdXMgdHlwZQ0KVW5pY19tZXJnZWQgJT4lDQogIG11dGF0ZSguaWQgPSBjYXNlX3doZW4oLmlkICVpbiUgYygiVW5pY19DVFJMX0luc3RyIiwgIlVuaWNfQ1RSTF9Tb2xvIikgfiAiVW5pY19DVFJMIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAuaWQgJWluJSBjKCJVbmljX09HTF9JbnN0ciIsICJVbmljX09HTF9Tb2xvIikgfiAiVW5pY19PR0wiLA0KICAgICAgICAgICAgICAgICAgICAgICAgIFRSVUUgfiBhcy5jaGFyYWN0ZXIoLmlkKSkpICU+JQ0KICAgIGdncGxvdChhZXMoeCA9IC5pZCwgeSA9IFNBTV9SZXNwKSkgKw0KICAgIGdlb21fYm94cGxvdCgpICsNCiAgICBzdGF0X3N1bW1hcnkoZnVuLmRhdGEgPSBtZWFuX3NlLCAgY29sb3VyID0gImRhcmtyZWQiKSArDQogICAgeGxhYigiIikgKw0KICAgIHRoZW1lKGF4aXMudGV4dC54ID0gZWxlbWVudF90ZXh0KGFuZ2xlID0gOTAsIGhqdXN0ID0gMSkpICsNCiAgICBmYWNldF93cmFwKH5TdGltdWx1cy50eXBlKSArDQogICAgZ2dwdWJyOjpzdGF0X2NvbXBhcmVfbWVhbnMobWV0aG9kID0gInQudGVzdCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWwgPSAicC5mb3JtYXQiLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBmb3JtYXRlZCBwLXZhbHVlcw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNwYWlyZWQgPSBUUlVFLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJpc29ucyA9IGxpc3QoYygiVW5pY19DVFJMIiwgIlVuaWNfT0dMIikpKSAgICAgICAgICANCg0KIyBkcm9wIHRvIEluc3RyIHZzIFNvbG8gLSBieSBTdGltdWx1cyB0eXBlDQpVbmljX21lcmdlZCAlPiUNCiAgbXV0YXRlKC5pZCA9IGNhc2Vfd2hlbiguaWQgJWluJSBjKCJVbmljX0NUUkxfSW5zdHIiLCAiVW5pY19PR0xfSW5zdHIiKSB+ICJVbmljX0luc3RyIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAuaWQgJWluJSBjKCJVbmljX0NUUkxfU29sbyIsICJV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ICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJpc29ucyA9IGxpc3QoYygibmVnYXRpdiIsICJuZXV0cnUiKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIm5ldXRydSIsICJwb3ppdGl2IiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJuZWdhdGl2IiwgInBveml0aXYiKSkpICANCg0KIyBieSBTdGltdWx1cyB0eXBlDQpnZ3Bsb3QoUmVwZXRhdF9tZXJnZWQsIGFlcyh4ID0gLmlkLCB5ID0gU0FNX1Jlc3ApKSArDQogIGdlb21fYm94cGxvdCgpICsNCiAgc3RhdF9zdW1tYXJ5KGZ1bi5kYXRhID0gbWVhbl9zZSwgIGNvbG91ciA9ICJkYXJrcmVkIikgKw0KICB4bGFiKCIiKSArDQogIHRoZW1lKGF4aXMudGV4dC54ID0gZWxlbWVudF90ZXh0KGFuZ2xlID0gOTAsIGhqdXN0ID0gMSkpICsNCiAgZmFjZXRfd3JhcCh+U3RpbXVsdXMudHlwZSkgKw0KICBnZ3B1YnI6OnN0YXRfY29tcGFyZV9tZWFucyhtZXRob2QgPSAidC50ZXN0IiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWwgPSAicC5mb3JtYXQiLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBmb3JtYXRlZCBwLXZhbHVlcw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjcGFpcmVkID0gVFJVRSwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBhcmlzb25zID0gbGlzdChjKCJSZXBldGF0X0NUUkxfSW5zdHIiLCAiUmVwZXRhdF9DVFJMX1NvbG8iKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIlJlcGV0YXRfQ1RSTF9JbnN0ciIsICJSZXBldGF0X09HTF9JbnN0ciIpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYygiUmVwZXRhdF9DVFJMX1NvbG8iLCAiUmVwZXRhdF9PR0xfSW5zdHIiKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIlJlcGV0YXRfQ1RSTF9Tb2xvIiwgIlJlcGV0YXRfT0dMX1NvbG8iKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIlJlcGV0YXRfT0dMX0luc3RyIiwgIlJlcGV0YXRfT0dMX1NvbG8iKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoIlJlcGV0YXRfQ1RSTF9JbnN0ciIsICJSZXBldGF0X09HTF9Tb2xvIikpKSANCg0KDQojIGRyb3AgdG8gQ1RSTCB2cyBPR0wgLSBieSBTdGltdWx1cyB0eXBlDQpSZXBldGF0X21lcmdlZCAlPiUNCiAgbXV0YXRlKC5pZCA9IGNhc2Vfd2hlbiguaWQgJWluJSBjKCJSZXBldGF0X0NUUkxfSW5zdHIiLCAiUmVwZXRhdF9DVFJMX1NvbG8iKSB+ICJSZXBldGF0X0NUUkwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgIC5pZCAlaW4lIGMoIlJlcGV0YXRfT0dMX0luc3RyIiwgIlJlcGV0YXRfT0dMX1NvbG8iKSB+ICJSZXBldGF0X09HTCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgVFJVRSB+IGFzLmNoYXJhY3RlciguaWQpKSkgJT4lDQogIGdncGxvdChhZXMoeCA9IC5pZCwgeSA9IFNBTV9SZXNwKSkgKw0KICBnZW9tX2JveHBsb3QoKSArDQogIHN0YXRfc3VtbWFyeShmdW4uZGF0YSA9IG1lYW5fc2UsICBjb2xvdXIgPSAiZGFya3JlZCIpICsNCiAgeGxhYigiIikgKw0KICB0aGVtZShheGlzLnRleH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