Publications by Viriya Taecharungroj
MI - Starbucks Two Way ANOVA
1 Preparing the packages and the data library(pacman) options(scipen = 7, digits = 3) pacman::p_load(pacman, dplyr, ggplot2, ggthemes, lubridate, plotly, rio, stringr, stringr, forcats) # Import the data ---- starbucks <- read.csv("https://www.dropbox.com/s/nd65b9kyq4ro1ck/starbucks.csv?dl=1") 2 Effects of content type on the n...
374 sym R (3886 sym/14 pcs) 3 img
MI - iPhone Logistic Regression
1 Preparing the packages and the data library(dplyr) library(ggplot2) library(broom) library(magrittr) # read the data ---- iphonex <- read.csv("https://www.dropbox.com/s/5vgzu02i4sgiecx/iphonex_purchase.csv?dl=1") %>% mutate(likely_purchase = factor(likely_purchase,levels = c(0,1), labels = c("not likely","likely"))) %>% dplyr::...
722 sym R (3416 sym/26 pcs) 6 img
MI - Bangkok IPA
1 Preparing the packages and the data library(pacman) pacman::p_load(dplyr, ggplot2, ggthemes, rio, stringr, tidyr, broom, viridisLite, ggrepel) bangkok_raw <- import("https://www.dropbox.com/s/07t8mlxpyhp9cku/Resident_finish.xlsx?dl=1") 2 Transforming the data bangkok <- bangkok_raw %>% # mutate gender using ifelse and factor m...
426 sym R (3436 sym/8 pcs) 1 img
MI - Workplace Cluster-Crosstab Analyses
1 Preparing the packages and the data library(pacman) pacman::p_load(pacman, dplyr, ggplot2, ggthemes, factoextra, broom, cluster, viridisLite, tidyr) # Import the data workplace <- read.csv("https://www.dropbox.com/s/prm6eurlq3yhemw/workplace.csv?dl=1") # Configure options options(scipen = 7, digits = 3) # Only select the columns we want to ...
1253 sym R (4690 sym/28 pcs) 3 img
MI - Tourist Satisfaction Descriptive Statistics
1 Preparing the packages and the data library(pacman) pacman::p_load(lubridate, dplyr, rio, ggplot2) options(digits = 3) ## Import the data - input your file directory in the parentheses after read_sav tourists_raw <- read.csv("https://www.dropbox.com/s/6q60ewpi8ohwjn8/tourists.csv?dl=1") Create a standard error function using function() calcul...
839 sym R (2451 sym/21 pcs) 2 img
MI - City-Neighbourhood Difference Analysis
1 Preparing the packages and the data library(pacman) pacman::p_load(dplyr, ggplot2, ggthemes, tidyr, readr, stringr) # Import the data - input your file directory in the parentheses after read_sav city_hood <- read.csv("https://www.dropbox.com/s/q3azd2swhj9xgwg/city_hood.csv?dl=1") 2 T-test We will test the difference of city loyalty/involvem...
1514 sym R (4865 sym/26 pcs) 3 img
MI - Introduction to Marketing Intelligence in R
1 Here’s a very brief introduction to R and RStudio! First thing first, please download R at http://mirrors.psu.ac.th/pub/cran/ Then, download RStudio at https://www.rstudio.com/products/rstudio/download/ A bit about coding in R, everything that comes after the pound/sharp/hashtag “#” sign does not count, only FYI or comments The top left c...
3045 sym R (2741 sym/59 pcs)
MI - Lake Bled Experiementation
1 Preparing the packages and the data First, we load the packages using pacman. You can use library() as usual library(pacman) pacman::p_load(pacman, dplyr, ggplot2, ggthemes, rio) # Load the packages Then, download the data from my dropbox. You can use your own path in your computer # Import the data lake_bled <- as_tibble(import("http://dl.drop...
890 sym R (1873 sym/12 pcs) 2 img
MI - University Students Multiple Regression
1 Preparing the packages and the data library(pacman) pacman::p_load(pacman, dplyr, ggplot2, ggthemes, rio, readr, tidyr, broom, stringr, corrplot, psych, gridExtra, tibble, caret, moderndive, purrr) options(scipen = 7, digits = 3) # adjust to show scientific number, try 20 and check summary again #Import the data university_stu...
719 sym R (3161 sym/15 pcs) 6 img