Below are the solutions to these exercises on data cleansing. ## Error in contrib.url(repos, type): trying to use CRAN without setting a mirror #################### # # # Exercise 1 # # # #################### grep("Merc", rownames(mtcars), value = TRUE) ## [1] "Merc 240D" "Merc 230" "Merc 280" "Merc 280C" "Merc 450SE" ## [6] "Merc 450SL" "Merc […]

## Data wrangling : Cleansing – Regular expressions (3/3)

Data wrangling is the process of importing, cleaning, and transforming raw data into actionable information for analysis. It is a time-consuming process that is estimated to take about 60-80% of analysts’ time. In this series, we will go through this process. It will be a brief series with the goal of crafting the reader’s skills […]

## Data wrangling : Cleansing – Regular expressions (2/3) Solutions

Below are the solutions to these exercises on data cleansing. #################### # # # Exercise 1 # # # #################### grep(pattern = ‘[3-6]’, bio, value = TRUE) ## [1] "24 year old" "R version 3.4.0 (2017-04-21)" #################### # # # Exercise 2 # # # #################### grep(pattern = ‘[Ay]’, bio, value = TRUE) ## [1] […]

## Data wrangling : Cleansing – Regular expressions (2/3)

Data wrangling, is the process of importing, cleaning and transforming raw data into actionable information for analysis. It is a time-consuming process which is estimated to take about 60-80% of analyst’s time. In this series we will go through this process. It will be a brief series with goal to craft the reader’s skills on […]

## Data wrangling : Cleansing – Regular expressions (1/3) Solutions

Below are the solutions to these exercises on data cleansing. #################### # # # Exercise 1 # # # #################### text <- sub(pattern = "\\.", "\\!", textmeta); text ## [1] "R|is|cool,|so|are|you|that|you|are|for|__|your|skills|by|solving|this|exercise! Moreover parenthesis symbol is []! Finally once you are done with this set go for a coffee, you deserve it!" #################### # # # […]

## Data wrangling : Cleansing – Regular expressions (1/3)

Data wrangling, is the process of importing, cleaning and transforming raw data into actionable information for analysis. It is a time-consuming process which is estimated to take about 60-80% of analyst’s time. In this series we will go through this process. It will be a brief series with goal to craft the reader’s skills on […]

## Data wrangling : Transforming (3/3)

Data wrangling is a task of great importance in data analysis. Data wrangling, is the process of importing, cleaning and transforming raw data into actionable information for analysis. It is a time-consuming process which is estimated to take about 60-80% of analyst’s time. In this series we will go through this process. It will be […]

## Data wrangling : Transforming (3/3) Solutions

Below are the solutions to these exercises on data transformation. #################### # # # Exercise 1 # # # #################### cars_inner <- inner_join(mtcars, cars_table, by = ‘ID’) ; cars_inner ## mpg cyl disp hp drat wt qsec vs am gear carb ID ## 1 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 […]

## Data wrangling : Transforming (2/3) Solution

Below are the solutions to these exercises on data transformation. #################### # # # Exercise 1 # # # #################### mtcars$cyl <- as.factor(mtcars$cyl) cars_cyl <- mtcars %>% group_by(cyl) #################### # # # Exercise 2 # # # #################### ungroup(cars_cyl) ## # A tibble: 32 x 11 ## mpg cyl disp hp drat wt qsec vs […]

## Data wrangling : Transforming (2/3)

Data wrangling is a task of great importance in data analysis. Data wrangling, is the process of importing, cleaning and transforming raw data into actionable information for analysis. It is a time-consuming process which is estimated to take about 60-80% of analyst’s time. In this series we will go through this process. It will be […]