Data Cleaning
Before starting the lab, please install the following packages using the given code line.
dplyr
stringr
editrules
deducorrect
lubridate
install.packages(c("dplyr","stringr","editrules","deducorrect","lubridate"))
Data Cleaning
Data cleansing or data cleaning is the process of detecting and correcting (or removing) corrupt or inaccurate records from a record set, table, or database and refers to identifying incomplete, incorrect, inaccurate or irrelevant parts of the data and then replacing, modifying, or deleting the dirty or coarse data. Data cleansing may be performed interactively with data wrangling tools, or as batch processing through scripting. (Wikipedia, 2020)
It takes % 80 percentage of the data analysis process. If data is incorrect, outcomes and algorithms are unreliable, even though they may look correct. There is no one absolute way to prescribe the exact steps in the data cleaning process because the processes will vary from dataset to dataset. But it is crucial to establish a template for your data cleaning process so you know you are doing it the right way every time.
How do you clean data?
Step 1: Remove duplicate or irrelevant observations
Step 2: Fix structural errors
Step 3: Filter unwanted outliers
Step 4: Handle missing data
Components of quality data
Validity. The degree to which your data conforms to defined business rules or constraints.
Accuracy. Ensure your data is close to the true values.
Completeness. The degree to which all required data is known.
Consistency. Ensure your data is consistent within the same dataset and/or across multiple data sets.
Uniformity. The degree to which the data is specified using the same unit of measure.
R programming is a great tool for data cleaning, because it provides several packages used for several purposes.
Note: The most important issue in data cleaning is to detect the problems before starting to clean process called Inspection. In other words, you need to understand dirty data you have at first.
**Reference
stringr()
Package
It is a set of simple wrappers that makes string functions more consistent, simpler and easier to use. It does this by ensuring that: function and argument names (and positions) are consistent, all functions deal with NAs and zero length character appropriately, and the output data structures from each function matches the input data structures of other functions.
“stringr” provides functions for both
basic manipulations and
for regular expression operations.
Let us see how the package works.
Todays Guest
Load the package.
library(stringr)
## Warning: package 'stringr' was built under R version 3.6.3
In this package, all funciton starts with str_
and take a vector of strings as the first argument.
str_c()
: string concatenation
str_c("Radamel", "Falcao", "Garcia", "Zarate")
## [1] "RadamelFalcaoGarciaZarate"
str_length()
: number of characters
<-"Radamel Falcao Garcia Zarate"
strikerstr_length(striker) #evaluate the space between words
## [1] 28
str_detect(x, pattern)
:It tells you if there is any match to the pattern.
<-c("Radamel", "Falcao", "Garcia", "Zarate")
r str_detect(r,"F")
## [1] FALSE TRUE FALSE FALSE
str_count(x, pattern)
: counts the number of patterns.
str_count(r,"a")
## [1] 2 2 2 2
str_sub()
: extracts substrings
#str_sub(word,start,end)
<-str_sub(striker,start=1,end = 14)
name name
## [1] "Radamel Falcao"
str_subset(x, pattern)
: extracts the matching components.
str_subset(r,"F")
## [1] "Falcao"
str_locate(x, pattern)
: It gives the position of the match.
str_locate(r,"r")
## start end
## [1,] NA NA
## [2,] NA NA
## [3,] 3 3
## [4,] 3 3
str_replace(x, pattern, replacement)
: replaces the matches with new text.
str_replace(r,"a","A")
## [1] "RAdamel" "FAlcao" "GArcia" "ZArate"
str_replace_all(r,"a","A")
## [1] "RAdAmel" "FAlcAo" "GArciA" "ZArAte"
+str_remove(x,pattern)
: alias for str_replace
str_remove(r,"a")
## [1] "Rdamel" "Flcao" "Grcia" "Zrate"
str_remove_all(r,"a")
## [1] "Rdmel" "Flco" "Grci" "Zrte"
str_dup()
: duplicates characters
# default usage
str_dup(striker, 3)
## [1] "Radamel Falcao Garcia ZarateRadamel Falcao Garcia ZarateRadamel Falcao Garcia Zarate"
#use with different n times
str_dup(striker,1:4)
## [1] "Radamel Falcao Garcia Zarate"
## [2] "Radamel Falcao Garcia ZarateRadamel Falcao Garcia Zarate"
## [3] "Radamel Falcao Garcia ZarateRadamel Falcao Garcia ZarateRadamel Falcao Garcia Zarate"
## [4] "Radamel Falcao Garcia ZarateRadamel Falcao Garcia ZarateRadamel Falcao Garcia ZarateRadamel Falcao Garcia Zarate"
#use with a string vector
<-c("Radamel","Falcao","Garcia","Zarate")
striker_namestr_dup(striker_name,2)
## [1] "RadamelRadamel" "FalcaoFalcao" "GarciaGarcia" "ZarateZarate"
str_dup(striker_name,1:4)
## [1] "Radamel" "FalcaoFalcao"
## [3] "GarciaGarciaGarcia" "ZarateZarateZarateZarate"
str_trim()
: removes leading and trailing white space
<-" Radamel Falcao"
name name
## [1] " Radamel Falcao"
#we have whitespace at the beginning of the object.
To remove the white space, we need to prop word to left.
str_trim(name,side="left")
## [1] "Radamel Falcao"
#side="left","right","both"
str_pad()
: pads a string
The idea of str_pad() is to take a string and pad it with leading or trailing characters to a specified total width
#str_pad(string, width, side = "left", pad = " ")
<-"Radamel Falcao"
name name
## [1] "Radamel Falcao"
The length of the object is 14.
str_pad(name,width=16,side="both")
## [1] " Radamel Falcao "
Now, I add two white spaces, which are at the beginning and end, respectively.
str_wrap()
: wraps a string paragraph
<- c(
nazim "seni dusunmek guzel sey",
"seni dusunmek umitli sey",
"dunyanın en güzel sesinden",
"en güzel sarkıyı dinlemek gibi bir sey")
# some_quote in a single paragraph
<- paste(nazim, collapse = " ")
some_quote some_quote
## [1] "seni dusunmek guzel sey seni dusunmek umitli sey dunyanın en güzel sesinden en güzel sarkıyı dinlemek gibi bir sey"
# display paragraph with width=28
cat(str_wrap(some_quote, width =28))
## seni dusunmek guzel sey
## seni dusunmek umitli sey
## dunyanın en güzel sesinden
## en güzel sarkıyı dinlemek
## gibi bir sey
Case Transformation Functions
str_to_upper(string, locale = "en")
name
## [1] "Radamel Falcao"
str_to_upper(name)
## [1] "RADAMEL FALCAO"
str_to_lower(string, locale = "en")
str_to_lower(name)
## [1] "radamel falcao"
str_to_title(string, locale = "en")
<-"radamel falcao"
name1 name1
## [1] "radamel falcao"
str_to_title(name1)
## [1] "Radamel Falcao"
str_to_sentence(string, locale = "en")
str_to_sentence(name1)
## [1] "Radamel falcao"
You should look at the cheat sheet of the package if you like it. Click here
Please click here to download your exercise.
Application
Consider ornek1.csv
file.
Please open the excel file, and explain the problems that you see.
Lets clean the data, but first.
Install the packages!
library(dplyr)
library(stringr)
library(lubridate)
library(editrules)
library(deducorrect)
library(knitr)
library(gapminder)
Read the data, since it is a csv
file, we will use read.csv()
function.
=read.csv("ornek1.csv",sep=";")
ornek ornek
## Mobil.Oyun.Tercihleri.Anketi
## 1 Bu veri seti veri temizleme pratiği için bilinçli olarak dağınık dizayn edilmiştir
## 2
## 3 *?CinSiyet"
## 4 Erkek
## 5 Erkek
## 6 Erkek
## 7 Erkek
## 8 ERKEK
## 9 Erkek
## 10 Erkek
## 11 K
## 12 K
## 13 KADIN
## 14 Erkek
## 15 Erkek
## 16 Erkek
## 17 Erkek
## 18 Erkek
## 19 Erkek
## 20 Erkek
## 21 Erkek
## 22 Kadın
## 23 E
## 24 Erkek
## 25 Erkek
## 26 Erkek
## 27 Erkek
## 28 Erkek
## 29 E
## 30 Erkek
## 31 Erkek
## 32 Erkek
## 33 Erkek
## 34 Erkek
## 35 Erkek
## 36 Erkek
## 37 Erkek
## 38 Erkek
## 39 Erkek
## 40 Erkek
## 41 Erkek
## 42 Erkek
## 43 Erkek
## 44 E
## 45 E
## 46 E
## 47 E
## 48 E
## 49 Erkek
## 50 Erkek
## 51 Erkek
## 52 ERKEK
## 53 ERKEK
## 54 ERKEK
## 55 ERKEK
## 56 ERKEK
## 57 ERKEK
## 58 ERKEK
## 59 Erkek
## 60 Erkek
## 61 Erkek
## 62 Erkek
## 63 Erkek
## 64 Erkek
## 65 Erkek
## 66 Erkek
## 67 Erkek
## 68 Erkek
## 69 Erkek
## 70 Erkek
## 71 Erkek
## 72 Erkek
## 73 Erkek
## 74 Erkek
## 75 Erkek
## 76 Kadın
## 77 K
## 78 K
## 79 K
## 80 KADIN
## 81 KADIN
## 82 KADIN
## 83 KADIN
## 84 E
## 85 E
## 86 Erkek
## 87 Erkek
## 88 Erkek
## 89 Erkek
## 90 Erkek
## 91 Erkek
## 92 E
## 93 E
## 94 E
## 95 ERKEK
## 96 ERKEK
## 97 ERKEK
## 98 ERKEK
## 99 ERKEK
## 100 ERKEK
## 101 K
## 102 Kadın
## 103 Kadın
## 104 Kadın
## X X.1 X.2 X.3 X.4 X.5 X.6 X.7
## 1
## 2
## 3 Yaş-?/ "Sistem" ZAMAN BR SATIN_alma" HARCANAN Kazanilan NeT
## 4 35 - 50 IOS 2 saat Evet 13 1 -12
## 5 25 - 35 IOS 1 saat Hayır 16 3 -13
## 6 25 - 35 IOS 4 saat EVET 15 2 -11
## 7 18 - 25 IOS 2 saat EVET 20 6 -14
## 8 18 - 25 Ios 1,5 saat Hayır 18 7 -15
## 9 18 - 25 iphone 2 saat Hayır 11 9 -2
## 10 18 - 25 IOS 2 saat Hayır 15 10 -5
## 11 18 - 25 IOS 60 dakika Evet 11 5 -6
## 12 18 - 25 ıOS 1 saat Hayır 14 1 -13
## 13 18 - 25 IOS 3 saat Hayır 19 7 -12
## 14 35 - 50 Android 2 saat Evet 16 3 -13
## 15 35 - 50 Android 1 saat Hayır 20 4 -16
## 16 35 - 50 Android 3 saat Hayır 16 1 -15
## 17 35 - 50 ANDROID 1 saat Evet 18 4 -14
## 18 35 - 50 Android 2 saat Hayır 16 6 -10
## 19 35 - 50 Android 3 saat Hayır 19 10 -9
## 20 35 - 50 Android 120 dakika Hayır 18 2 -16
## 21 35 - 50 Android 1 saat Hayır 18 9 -9
## 22 35 - 50 Android 5 saat Evet 18 10 -8
## 23 25 - 35 Android 90 dakika Evet 12 4 -8
## 24 25 - 35 Android 2 saat Hayır 16 9 -7
## 25 25 - 35 Android 1 saat Evet 16 2 -14
## 26 25 - 35 Android 4 saat Hayır 17 5 -12
## 27 25 - 35 Android 2 saat Hayır 12 3 -9
## 28 25 - 35 Android 1,5 saat Hayır 11 9 -2
## 29 25 - 35 Android 2 saat Hayır 11 2 -9
## 30 25 - 35 Android 2 saat Hayır 19 5 -14
## 31 25 - 35 Android 1 saat Evet 12 8 -4
## 32 25 - 35 Android 1 saat Evet 19 4 -15
## 33 25 - 35 Android 3 saat Hayır 18 1 -17
## 34 25 - 35 Android 2 saat Hayır 14 1 -13
## 35 25 - 35 Android 60 dakika Evet 10 3 -7
## 36 25 - 35 Android 3 saat Evet 12 1 -11
## 37 25 - 35 Android 1 saat Evet 18 7 -11
## 38 25 - 35 Android 2 saat Evet 10 9 -1
## 39 25 - 35 Android 3 saat Hayır 17 1 -16
## 40 25 - 35 ANDROID 2 saat Hayır 18 1 -17
## 41 25 - 35 ANDROID 1 saat Evet 19 4 -15
## 42 25 - 35 ANDROID 5 saat Hayır 12 7 -5
## 43 25 - 35 ANDROID 3600 saniye Evet 16 10 -6
## 44 18 - 25 ANDROID 1,5 saat Hayır 18 1 -17
## 45 18 - 25 ANDROID 1,5 saat Hayır 16 8 -8
## 46 18 - 25 ANDROID 1,5 saat Hayır 18 8 -10
## 47 18 - 25 ANDROID 90 dakika Hayır 10 3 -7
## 48 18 - 25 ANDROID 1 saat Hayır 18 9 -9
## 49 18 - 25 ANDROID 1 saat Evet 11 8 -3
## 50 18 - 25 ANDROID 3 saat HAYIR 20 9 -11
## 51 18 - 25 ANDROID 120 dakika HAYIR 16 4 -12
## 52 18 - 25 ANDROID 1 saat HAYIR 17 7 -10
## 53 18 - 25 ANDROID 3 saat Evet 20 3 -17
## 54 18 - 25 ANDROID 1 saat Hayır 14 7 -7
## 55 18 - 25 Android 5 saat Evet 12 4 -8
## 56 18 - 25 Android 0 saat Evet 12 8 -4
## 57 18 - 25 Android 2 saat Evet 14 9 -5
## 58 18 - 25 Android 1 saat Evet 10 2 -8
## 59 18 - 25 Android 4 saat Hayır 11 5 -6
## 60 18 - 25 Android 2 saat Evet 10 2 -8
## 61 18 - 25 Android 1,5 saat Evet 16 4 -12
## 62 18 - 25 Android 2 saat Evet 11 1 -10
## 63 18 - 25 Android 7200 saniye Evet 16 10 -6
## 64 18 - 25 Android 1 saat Evet 16 4 -12
## 65 18 - 25 Android 1 saat Evet 15 4 -11
## 66 18 - 25 Android 3 saat Evet 14 5 -9
## 67 18 - 25 Android 2 saat Hayır 18 9 -9
## 68 18 - 25 Android 0 saat Hayır 10 8 -2
## 69 18 - 25 Android 3 saat Hayır 11 4 -7
## 70 18 - 25 Android 1 SAAT Hayır 16 8 -8
## 71 18 - 25 Android 2 saat Hayır 13 2 -11
## 72 18 - 25 Android 3 saat Hayır 20 5 -15
## 73 18 - 25 Android 2 saat Hayır 14 4 -10
## 74 18 - 25 Android 0 saat Hayır 18 6 -12
## 75 18 - 25 Android 5 saat Hayır 15 7 -8
## 76 18 - 25 Huawei 2 saat Hayır 13 2 -11
## 77 18 - 25 Android 1 saat Hayır 13 3 -10
## 78 18 - 25 Android 2 saat Hayır 18 5 -13
## 79 18 - 25 Android 2 saat Evet 14 3 -11
## 80 18 - 25 Sony 1 saat Hayır 19 3 -16
## 81 18 - 25 Android 4 saat Hayır 12 5 -7
## 82 18 - 25 Android 2 saat Hayır 13 3 -10
## 83 18- 25 Android 90 dakika Hayır 20 10 -10
## 84 25 - 35 Apple 2 saat Hayır 19 4 -15
## 85 25 - 35 Apple 2 saat Evet 20 3 -17
## 86 25 - 35 Apple 0 saat Evet 19 6 -13
## 87 25 - 35 Apple 1 saat Evet 14 5 -9
## 88 25 - 35 Apple 180 dakika Hayır 19 7 -12
## 89 25 - 35 Apple 2 saat Evet 10 5 -5
## 90 25 - 35 Apple 1 saat Evet 15 8 -7
## 91 25 - 35 Apple 3 saat Evet 11 7 -4
## 92 18 - 25 Apple 1 SAAT Hayır 13 9 -4
## 93 18 - 25 Apple 2 saat Hayır 10 8 -2
## 94 18 - 25 Apple 3 saat Hayır 12 3 -9
## 95 18 - 25 Apple 2 saat Hayır 13 3 -10
## 96 18 - 25 Apple 0 saat Hayır 13 8 -5
## 97 18 - 25 Apple 5 saat Evet 16 9 -7
## 98 18 - 25 Apple 1,5 saat Hayır 12 8 -4
## 99 35 - 50 Apple IOS 3 saat Hayır 10 1 -9
## 100 35 - 50 Apple IOS 2 SAAT Evet 18 5 -13
## 101 25 - 35 Apple IOS 2 saat Hayır 15 8 -7
## 102 25 - 35 Apple IOS 1 saat Evet 12 6 -6
## 103 18 - 25 Apple IOS 1 saat Hayır 16 10 -6
## 104 18 - 25 Apple IOS 0 saat Hayır 16 5 -11
## X.8
## 1
## 2
## 3 Dates
## 4 26.02.2019
## 5 26 Feb 2019
## 6 26.02.2019
## 7 26.02.2019
## 8 26.02.2019
## 9 26.02.2019
## 10 26.02.2019
## 11 26.02.2019
## 12 26.02.2019
## 13 26.02.2019
## 14 26.02.2019
## 15 26.02.2019
## 16 26.02.2019
## 17 26.02.2019
## 18 26.02.2019
## 19 26.02.2019
## 20 26.02.2019
## 21 26.02.2019
## 22 26.02.2019
## 23 26.02.2019
## 24 26.02.2019
## 25 26.02.2019
## 26 26 Feb 2019
## 27 26.02.2019
## 28 26.02.2019
## 29 26.02.2019
## 30 26.02.2019
## 31 26.02.2019
## 32 26.02.2019
## 33 26.02.2019
## 34 26.02.2019
## 35 26.02.2019
## 36 26.02.2019
## 37 26.02.2019
## 38 26.02.2019
## 39 26.02.2019
## 40 26.02.2019
## 41 26.02.2019
## 42 26.02.2019
## 43 26.02.2019
## 44 26 Feb 2019
## 45 26.02.2019
## 46 26.02.2019
## 47 26.02.2019
## 48 26.02.2019
## 49 26.02.2019
## 50 26.02.2019
## 51 26.02.2019
## 52 26 Feb 2019
## 53 26.02.2019
## 54 26.02.2019
## 55 26.02.2019
## 56 26.02.2019
## 57 26.02.2019
## 58 26.02.2019
## 59 26.02.2019
## 60 26.02.2019
## 61 26 Feb 2019
## 62 26.02.2019
## 63 26.02.2019
## 64 26.02.2019
## 65 26.02.2019
## 66 26.02.2019
## 67 26.02.2019
## 68 26.02.2019
## 69 26.02.2019
## 70 26.02.2019
## 71 26.02.2019
## 72 26 Feb 2019
## 73 26.02.2019
## 74 26.02.2019
## 75 26.02.2019
## 76 26.02.2019
## 77 26.02.2019
## 78 26.02.2019
## 79 26.02.2019
## 80 26 Feb 2019
## 81 26.02.2019
## 82 26.02.2019
## 83 26.02.2019
## 84 26.02.2019
## 85 26.02.2019
## 86 26.02.2019
## 87 26.02.2019
## 88 26.02.2019
## 89 26.02.2019
## 90 26.02.2019
## 91 26 Feb 2019
## 92 26.02.2019
## 93 26.02.2019
## 94 26.02.2019
## 95 26.02.2019
## 96 26.02.2019
## 97 26.02.2019
## 98 26.02.2019
## 99 26.02.2019
## 100 26.02.2019
## 101 26.02.2019
## 102 26.02.2019
## 103 26.02.2019
## 104 26 Feb 2019
As you see, the empty line and unnecessary information are in the object. We should remove them.
=read.csv("ornek1.csv",sep=";",skip=3)
ornek1#skip argument in read.csv function.
#we can ignore some part of the data with this argument.
head(ornek1)
## X..CinSiyet. Yaş... X.Sistem. ZAMAN BR SATIN_alma. HARCANAN Kazanilan NeT
## 1 Erkek 35 - 50 IOS 2 saat Evet 13 1 -12
## 2 Erkek 25 - 35 IOS 1 saat Hayır 16 3 -13
## 3 Erkek 25 - 35 IOS 4 saat EVET 15 2 -11
## 4 Erkek 18 - 25 IOS 2 saat EVET 20 6 -14
## 5 ERKEK 18 - 25 Ios 1,5 saat Hayır 18 7 -15
## 6 Erkek 18 - 25 iphone 2 saat Hayır 11 9 -2
## Dates
## 1 26.02.2019
## 2 26 Feb 2019
## 3 26.02.2019
## 4 26.02.2019
## 5 26.02.2019
## 6 26.02.2019
Firstly, we should arrange column names of the data. We have upper&lower case problem and have some unnecessary punctuation and letters.
colnames(ornek1)
## [1] "X..CinSiyet." "Yaş..." "X.Sistem." "ZAMAN" "BR"
## [6] "SATIN_alma." "HARCANAN" "Kazanilan" "NeT" "Dates"
<-str_remove(colnames(ornek1),"X.")
cn1 cn1
## [1] ".CinSiyet." "Yaş..." "Sistem." "ZAMAN" "BR"
## [6] "SATIN_alma." "HARCANAN" "Kazanilan" "NeT" "Dates"
<-str_remove_all(cn1,"\\.")
cn2 cn2
## [1] "CinSiyet" "Yaş" "Sistem" "ZAMAN" "BR"
## [6] "SATIN_alma" "HARCANAN" "Kazanilan" "NeT" "Dates"
<-str_to_sentence(cn2)
cn3 cn3
## [1] "Cinsiyet" "Yaş" "Sistem" "Zaman" "Br"
## [6] "Satin_alma" "Harcanan" "Kazanilan" "Net" "Dates"
colnames(ornek1) <- cn3
colnames(ornek1)[c(5,10)] <- c("Birim","Tarih")
head(ornek1)
## Cinsiyet Yaş Sistem Zaman Birim Satin_alma Harcanan Kazanilan Net
## 1 Erkek 35 - 50 IOS 2 saat Evet 13 1 -12
## 2 Erkek 25 - 35 IOS 1 saat Hayır 16 3 -13
## 3 Erkek 25 - 35 IOS 4 saat EVET 15 2 -11
## 4 Erkek 18 - 25 IOS 2 saat EVET 20 6 -14
## 5 ERKEK 18 - 25 Ios 1,5 saat Hayır 18 7 -15
## 6 Erkek 18 - 25 iphone 2 saat Hayır 11 9 -2
## Tarih
## 1 26.02.2019
## 2 26 Feb 2019
## 3 26.02.2019
## 4 26.02.2019
## 5 26.02.2019
## 6 26.02.2019
Check the dimension of the data.
dim(ornek1)
## [1] 101 10
No problem.
After this, change the class of objects in the data.
str(ornek1)
## 'data.frame': 101 obs. of 10 variables:
## $ Cinsiyet : Factor w/ 6 levels "E","Erkek","ERKEK",..: 2 2 2 2 3 2 2 4 4 5 ...
## $ Yaş : Factor w/ 4 levels "18- 25","18 - 25",..: 4 3 3 2 2 2 2 2 2 2 ...
## $ Sistem : Factor w/ 11 levels " IOS"," Ios",..: 1 1 3 3 2 10 3 3 9 3 ...
## $ Zaman : Factor w/ 13 levels "0","1","1,5",..: 6 2 9 6 3 6 6 11 2 7 ...
## $ Birim : Factor w/ 4 levels "dakika","saat",..: 2 2 2 2 2 2 2 1 2 2 ...
## $ Satin_alma: Factor w/ 7 levels " Hayır"," EVET",..: 4 7 2 5 7 1 7 4 7 7 ...
## $ Harcanan : int 13 16 15 20 18 11 15 11 14 19 ...
## $ Kazanilan : int 1 3 2 6 7 9 10 5 1 7 ...
## $ Net : int -12 -13 -11 -14 -15 -2 -5 -6 -13 -12 ...
## $ Tarih : Factor w/ 2 levels "26 Feb 2019",..: 2 1 2 2 2 2 2 2 2 2 ...
When we look at the output, Zaman variable should have been numeric, but it is considered as factor.
Be Careful, we cannot use as.numeric()
directly. Lets see what happens if we use.
as.numeric(ornek1$Zaman)
## [1] 6 2 9 6 3 6 6 11 2 7 6 2 7 2 6 7 4 2 10 13 6 2 9 6 3
## [26] 6 6 2 2 7 6 11 7 2 6 7 6 2 10 8 3 3 3 13 2 2 7 4 2 7
## [51] 2 10 1 6 2 9 6 3 6 12 2 2 7 6 1 7 2 6 7 6 1 10 6 2 6
## [76] 6 2 9 6 13 6 6 1 2 5 6 2 7 2 6 7 6 1 10 3 7 6 6 2 2
## [101] 1
Because some numbers have (Comma) sign, we cannot apply the function directly.
Also, the categorical variables like Cinsiyet, yas_grubu etc has more level than we want to have.
In this case, although we detected the mark of the dirty data when the dataset was shown. In order to see them in details, I will use count
function from dplyr package.
count()
: Used to know how many observations you have for a specific variable.
%>%count(Cinsiyet) ornek1
## Cinsiyet n
## 1 E 12
## 2 Erkek 59
## 3 ERKEK 14
## 4 K 6
## 5 KADIN 5
## 6 Kadın 5
In this output, n represents the number of observation for the corresponding level.
%>%count(Sistem) ornek1
## Sistem n
## 1 IOS 2
## 2 Ios 1
## 3 IOS 5
## 4 Android 52
## 5 ANDROID 16
## 6 Apple 15
## 7 Apple IOS 6
## 8 Huawei 1
## 9 ıOS 1
## 10 iphone 1
## 11 Sony 1
%>%count(Satin_alma) ornek1
## Satin_alma n
## 1 Hayır 2
## 2 EVET 1
## 3 Hayır 2
## 4 Evet 38
## 5 EVET 1
## 6 HAYIR 3
## 7 Hayır 54
%>%count(Birim) ornek1
## Birim n
## 1 dakika 8
## 2 saat 88
## 3 SAAT 3
## 4 saniye 2
All levels suffer capital and small letter problem. Also, sistem and satin_alma variables have empty space problems.
Thus, we can say that almost all categorical variables suffer capital and small letter problem. Also, sistem and satin_alma variables have white space problems.
To remove the whitespace,
%>%count(Sistem) ornek1
## Sistem n
## 1 IOS 2
## 2 Ios 1
## 3 IOS 5
## 4 Android 52
## 5 ANDROID 16
## 6 Apple 15
## 7 Apple IOS 6
## 8 Huawei 1
## 9 ıOS 1
## 10 iphone 1
## 11 Sony 1
$Sistem=str_trim(ornek1$Sistem,side="left")
ornek1%>%count(Sistem) ornek1
## Sistem n
## 1 Android 52
## 2 ANDROID 16
## 3 Apple 15
## 4 Apple IOS 6
## 5 Huawei 1
## 6 Ios 1
## 7 IOS 7
## 8 ıOS 1
## 9 iphone 1
## 10 Sony 1
As you see, IOS objects are evaluated together.
%>%count(Satin_alma) ornek1
## Satin_alma n
## 1 Hayır 2
## 2 EVET 1
## 3 Hayır 2
## 4 Evet 38
## 5 EVET 1
## 6 HAYIR 3
## 7 Hayır 54
$Satin_alma=str_trim(ornek1$Satin_alma,side="left")
ornek1%>%count(Satin_alma) ornek1
## Satin_alma n
## 1 Evet 38
## 2 EVET 2
## 3 HAYIR 3
## 4 Hayır 58
As you see, EVET-HAYIR problem because of whitespace is solved.
After this, I would like to change the comma
signs with dots
in the sure column using gsub
function.
gsub()
function replaces all matches of a string, if the parameter is a string vector, returns a string vector of the same length and with the same attributes.
You can use str_replace
for the same purpose.
#gsub(old,new,object)
$Zaman=gsub("\\.", "", ornek1$Zaman)
ornek1$Zaman ornek1
## [1] "2" "1" "4" "2" "1,5" "2" "2" "60" "1" "3"
## [11] "2" "1" "3" "1" "2" "3" "120" "1" "5" "90"
## [21] "2" "1" "4" "2" "1,5" "2" "2" "1" "1" "3"
## [31] "2" "60" "3" "1" "2" "3" "2" "1" "5" "3600"
## [41] "1,5" "1,5" "1,5" "90" "1" "1" "3" "120" "1" "3"
## [51] "1" "5" "0" "2" "1" "4" "2" "1,5" "2" "7200"
## [61] "1" "1" "3" "2" "0" "3" "1" "2" "3" "2"
## [71] "0" "5" "2" "1" "2" "2" "1" "4" "2" "90"
## [81] "2" "2" "0" "1" "180" "2" "1" "3" "1" "2"
## [91] "3" "2" "0" "5" "1,5" "3" "2" "2" "1" "1"
## [101] "0"
$Zaman<-gsub(",", ".",ornek1$Zaman)
ornek1$Zaman ornek1
## [1] "2" "1" "4" "2" "1.5" "2" "2" "60" "1" "3"
## [11] "2" "1" "3" "1" "2" "3" "120" "1" "5" "90"
## [21] "2" "1" "4" "2" "1.5" "2" "2" "1" "1" "3"
## [31] "2" "60" "3" "1" "2" "3" "2" "1" "5" "3600"
## [41] "1.5" "1.5" "1.5" "90" "1" "1" "3" "120" "1" "3"
## [51] "1" "5" "0" "2" "1" "4" "2" "1.5" "2" "7200"
## [61] "1" "1" "3" "2" "0" "3" "1" "2" "3" "2"
## [71] "0" "5" "2" "1" "2" "2" "1" "4" "2" "90"
## [81] "2" "2" "0" "1" "180" "2" "1" "3" "1" "2"
## [91] "3" "2" "0" "5" "1.5" "3" "2" "2" "1" "1"
## [101] "0"
After this replacement, as.numeric
function works well.
as.numeric(ornek1$Zaman)
## [1] 2.0 1.0 4.0 2.0 1.5 2.0 2.0 60.0 1.0 3.0
## [11] 2.0 1.0 3.0 1.0 2.0 3.0 120.0 1.0 5.0 90.0
## [21] 2.0 1.0 4.0 2.0 1.5 2.0 2.0 1.0 1.0 3.0
## [31] 2.0 60.0 3.0 1.0 2.0 3.0 2.0 1.0 5.0 3600.0
## [41] 1.5 1.5 1.5 90.0 1.0 1.0 3.0 120.0 1.0 3.0
## [51] 1.0 5.0 0.0 2.0 1.0 4.0 2.0 1.5 2.0 7200.0
## [61] 1.0 1.0 3.0 2.0 0.0 3.0 1.0 2.0 3.0 2.0
## [71] 0.0 5.0 2.0 1.0 2.0 2.0 1.0 4.0 2.0 90.0
## [81] 2.0 2.0 0.0 1.0 180.0 2.0 1.0 3.0 1.0 2.0
## [91] 3.0 2.0 0.0 5.0 1.5 3.0 2.0 2.0 1.0 1.0
## [101] 0.0
As you see, class problem of Zaman variable is solved. Now, consider capital letter-small letter problems in the variables.
Remember that Cinsiyet, sistem, satin_alma, and Birim suffer from this problem. I would like to transform all inputs into small letter version. Then, I would like to create my new dataset.
<- ornek1 %>% mutate(Zaman = as.numeric(Zaman),
ornek_kucuk1 Cinsiyet = str_to_lower(Cinsiyet),
Sistem = str_to_lower(Sistem),
Satin_alma = str_to_lower(Satin_alma),Birim=str_to_lower(Birim))
In the mutate
function used for creating a new column, if you write an existing column name as new one, you will replace the column observations with the new ones.
kable(head(ornek_kucuk1))
Cinsiyet | Yaş | Sistem | Zaman | Birim | Satin_alma | Harcanan | Kazanilan | Net | Tarih |
---|---|---|---|---|---|---|---|---|---|
erkek | 35 - 50 | ios | 2.0 | saat | evet | 13 | 1 | -12 | 26.02.2019 |
erkek | 25 - 35 | ios | 1.0 | saat | hayır | 16 | 3 | -13 | 26 Feb 2019 |
erkek | 25 - 35 | ios | 4.0 | saat | evet | 15 | 2 | -11 | 26.02.2019 |
erkek | 18 - 25 | ios | 2.0 | saat | evet | 20 | 6 | -14 | 26.02.2019 |
erkek | 18 - 25 | ios | 1.5 | saat | hayır | 18 | 7 | -15 | 26.02.2019 |
erkek | 18 - 25 | iphone | 2.0 | saat | hayır | 11 | 9 | -2 | 26.02.2019 |
Now, lets see the distribution of the levels for categorical variable.
%>%count(Cinsiyet) ornek_kucuk1
## Cinsiyet n
## 1 e 12
## 2 erkek 73
## 3 k 6
## 4 kadin 5
## 5 kadın 5
%>%count(Sistem) ornek_kucuk1
## Sistem n
## 1 android 68
## 2 apple 15
## 3 apple ios 6
## 4 huawei 1
## 5 ios 8
## 6 ıos 1
## 7 iphone 1
## 8 sony 1
%>%count(Satin_alma) ornek_kucuk1
## Satin_alma n
## 1 evet 40
## 2 hayir 3
## 3 hayır 58
%>%count(Birim) ornek_kucuk1
## Birim n
## 1 dakika 8
## 2 saat 91
## 3 saniye 2
The outputs above show that we have character problem such as kadin-kadin for Cinsiyet, satin_alma and sistem variable. Also, we have coding problem for sistem variable. In other words, for example, sony is supposed to be android. Lastly, we have unit problem for the Birim variable. In other words, the time unit should be in common for all observations.
We have problems, but we have solutions!
Character Problem
$Cinsiyet=str_replace(ornek_kucuk1$Cinsiyet,"i", "ı")
ornek_kucuk1%>%count(Cinsiyet) ornek_kucuk1
## Cinsiyet n
## 1 e 12
## 2 erkek 73
## 3 k 6
## 4 kadın 5
## 5 kadın 5
$Satin_alma=str_replace(ornek_kucuk1$Satin_alma,"i", "ı")
ornek_kucuk1%>%count(Satin_alma) ornek_kucuk1
## Satin_alma n
## 1 evet 40
## 2 hayır 3
## 3 hayır 58
They are solved. :)
Now, we consider coding problem. We need to recode some inputs. For example, e is erkek, k is kadin. To do so, consider recode
function from dplyr package.
recode() : You can replace numeric values based on their position or their name, and character or factor values only by their name.
<-ornek_kucuk1 %>% mutate(Sistem = recode(Sistem, "iphone"="ios", "apple" = "ios","apple ios"="ios","ıos" ="ios","huawei"="android","sony"="android"),Cinsiyet = recode(Cinsiyet, "e"="erkek","k"="kadın")) ornek_kucuk1
%>%count(Cinsiyet) ornek_kucuk1
## Cinsiyet n
## 1 erkek 85
## 2 kadın 11
## 3 kadın 5
%>%count(Sistem) ornek_kucuk1
## Sistem n
## 1 android 70
## 2 ios 30
## 3 ıos 1
They were solved, too.
Now, we have date problem, time problem and calculation of net value problem. Lets consider date problem at first. To change the date structure, consider lubridate package. According to its definition, the lubridate package has a consistent and memorable syntax that makes working with dates easy and fun.
The dates in R should be in Date or POSIXct class. However, it is factor in our dataset. To transform tarih object, we will consider dmy
function which transforms dates stored in character and numeric vectors to Date or POSIXct objects.
Why should I prefer dmy?
d<-day
m<-month
y<-year
Because the date was recorded as day.month.year (26.02.2020)
The function has several versions such as ymd,myd etc.
library(lubridate)
<-ornek_kucuk1 %>% mutate(Tarih=dmy(Tarih))
ornek_kucuk1kable(head(ornek_kucuk1))
Cinsiyet | Yaş | Sistem | Zaman | Birim | Satin_alma | Harcanan | Kazanilan | Net | Tarih |
---|---|---|---|---|---|---|---|---|---|
erkek | 35 - 50 | ios | 2.0 | saat | evet | 13 | 1 | -12 | 2019-02-26 |
erkek | 25 - 35 | ios | 1.0 | saat | hayır | 16 | 3 | -13 | 2019-02-26 |
erkek | 25 - 35 | ios | 4.0 | saat | evet | 15 | 2 | -11 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | evet | 20 | 6 | -14 | 2019-02-26 |
erkek | 18 - 25 | ios | 1.5 | saat | hayır | 18 | 7 | -15 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | hayır | 11 | 9 | -2 | 2019-02-26 |
class(ornek_kucuk1$Tarih)
## [1] "Date"
After the transformation, tarih is a date object.
Now, consider time problem.
%>%count(Birim) ornek_kucuk1
## Birim n
## 1 dakika 8
## 2 saat 91
## 3 saniye 2
The table shows that the usage duration of the game was recorded in dakika, saat and saniye. I would like to have a duration in one unit which is hour.
To make such a correction, we will consider deducorrect package. It is a package including a collection of methods for automated data cleaning where all actions are logged.
In order to apply a transformation, you need to create a transformaion file as txt file. Please open convert.txt file.
#convert dakika
if (Birim=="dakika"){
Zaman<-Zaman/60
}
#convert saniye
if (Birim=="saniye"){
Zaman<-Zaman/3600
}
if (Birim=="saat"){
Zaman<-Zaman
}
Birim="saat"
Then, read this file with correctionRules
function.
correctionRules: Rules for deterministic correction.
<-correctionRules("convert.txt")
rule rule
## Object of class 'correctionRules'
## ## 1-------
## if (Birim == "dakika") {
## Zaman <- Zaman/60
## }
## ## 2-------
## if (Birim == "saniye") {
## Zaman <- Zaman/3600
## }
## ## 3-------
## if (Birim == "saat") {
## Zaman <- Zaman
## }
## ## 4-------
## Birim = "saat"
Then, apply the rule with correctWithRules
.
correctWithRules: Applies the deterministic correciton defined by correctionRules.
#correctWithRules(rule,data)
<-correctWithRules(rule,ornek_kucuk1)
correction$corrections #check whether there is correction correction
## row variable old new how
## 1 8 Zaman 60 1 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 2 8 Birim dakika saat Birim = "saat"
## 3 17 Zaman 120 2 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 4 17 Birim dakika saat Birim = "saat"
## 5 20 Zaman 90 1.5 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 6 20 Birim dakika saat Birim = "saat"
## 7 32 Zaman 60 1 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 8 32 Birim dakika saat Birim = "saat"
## 9 40 Zaman 3600 1 if (Birim == "saniye") { Zaman <- Zaman/3600 }
## 10 40 Birim saniye saat Birim = "saat"
## 11 44 Zaman 90 1.5 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 12 44 Birim dakika saat Birim = "saat"
## 13 48 Zaman 120 2 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 14 48 Birim dakika saat Birim = "saat"
## 15 60 Zaman 7200 2 if (Birim == "saniye") { Zaman <- Zaman/3600 }
## 16 60 Birim saniye saat Birim = "saat"
## 17 80 Zaman 90 1.5 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 18 80 Birim dakika saat Birim = "saat"
## 19 85 Zaman 180 3 if (Birim == "dakika") { Zaman <- Zaman/60 }
## 20 85 Birim dakika saat Birim = "saat"
See the corrected data.
$corrected correction
## Cinsiyet Yaş Sistem Zaman Birim Satin_alma Harcanan Kazanilan Net
## 1 erkek 35 - 50 ios 2.0 saat evet 13 1 -12
## 2 erkek 25 - 35 ios 1.0 saat hayır 16 3 -13
## 3 erkek 25 - 35 ios 4.0 saat evet 15 2 -11
## 4 erkek 18 - 25 ios 2.0 saat evet 20 6 -14
## 5 erkek 18 - 25 ios 1.5 saat hayır 18 7 -15
## 6 erkek 18 - 25 ios 2.0 saat hayır 11 9 -2
## 7 erkek 18 - 25 ios 2.0 saat hayır 15 10 -5
## 8 kadın 18 - 25 ios 1.0 saat evet 11 5 -6
## 9 kadın 18 - 25 ıos 1.0 saat hayır 14 1 -13
## 10 kadın 18 - 25 ios 3.0 saat hayır 19 7 -12
## 11 erkek 35 - 50 android 2.0 saat evet 16 3 -13
## 12 erkek 35 - 50 android 1.0 saat hayır 20 4 -16
## 13 erkek 35 - 50 android 3.0 saat hayır 16 1 -15
## 14 erkek 35 - 50 android 1.0 saat evet 18 4 -14
## 15 erkek 35 - 50 android 2.0 saat hayır 16 6 -10
## 16 erkek 35 - 50 android 3.0 saat hayır 19 10 -9
## 17 erkek 35 - 50 android 2.0 saat hayır 18 2 -16
## 18 erkek 35 - 50 android 1.0 saat hayır 18 9 -9
## 19 kadın 35 - 50 android 5.0 saat evet 18 10 -8
## 20 erkek 25 - 35 android 1.5 saat evet 12 4 -8
## 21 erkek 25 - 35 android 2.0 saat hayır 16 9 -7
## 22 erkek 25 - 35 android 1.0 saat evet 16 2 -14
## 23 erkek 25 - 35 android 4.0 saat hayır 17 5 -12
## 24 erkek 25 - 35 android 2.0 saat hayır 12 3 -9
## 25 erkek 25 - 35 android 1.5 saat hayır 11 9 -2
## 26 erkek 25 - 35 android 2.0 saat hayır 11 2 -9
## 27 erkek 25 - 35 android 2.0 saat hayır 19 5 -14
## 28 erkek 25 - 35 android 1.0 saat evet 12 8 -4
## 29 erkek 25 - 35 android 1.0 saat evet 19 4 -15
## 30 erkek 25 - 35 android 3.0 saat hayır 18 1 -17
## 31 erkek 25 - 35 android 2.0 saat hayır 14 1 -13
## 32 erkek 25 - 35 android 1.0 saat evet 10 3 -7
## 33 erkek 25 - 35 android 3.0 saat evet 12 1 -11
## 34 erkek 25 - 35 android 1.0 saat evet 18 7 -11
## 35 erkek 25 - 35 android 2.0 saat evet 10 9 -1
## 36 erkek 25 - 35 android 3.0 saat hayır 17 1 -16
## 37 erkek 25 - 35 android 2.0 saat hayır 18 1 -17
## 38 erkek 25 - 35 android 1.0 saat evet 19 4 -15
## 39 erkek 25 - 35 android 5.0 saat hayır 12 7 -5
## 40 erkek 25 - 35 android 1.0 saat evet 16 10 -6
## 41 erkek 18 - 25 android 1.5 saat hayır 18 1 -17
## 42 erkek 18 - 25 android 1.5 saat hayır 16 8 -8
## 43 erkek 18 - 25 android 1.5 saat hayır 18 8 -10
## 44 erkek 18 - 25 android 1.5 saat hayır 10 3 -7
## 45 erkek 18 - 25 android 1.0 saat hayır 18 9 -9
## 46 erkek 18 - 25 android 1.0 saat evet 11 8 -3
## 47 erkek 18 - 25 android 3.0 saat hayır 20 9 -11
## 48 erkek 18 - 25 android 2.0 saat hayır 16 4 -12
## 49 erkek 18 - 25 android 1.0 saat hayır 17 7 -10
## 50 erkek 18 - 25 android 3.0 saat evet 20 3 -17
## 51 erkek 18 - 25 android 1.0 saat hayır 14 7 -7
## 52 erkek 18 - 25 android 5.0 saat evet 12 4 -8
## 53 erkek 18 - 25 android 0.0 saat evet 12 8 -4
## 54 erkek 18 - 25 android 2.0 saat evet 14 9 -5
## 55 erkek 18 - 25 android 1.0 saat evet 10 2 -8
## 56 erkek 18 - 25 android 4.0 saat hayır 11 5 -6
## 57 erkek 18 - 25 android 2.0 saat evet 10 2 -8
## 58 erkek 18 - 25 android 1.5 saat evet 16 4 -12
## 59 erkek 18 - 25 android 2.0 saat evet 11 1 -10
## 60 erkek 18 - 25 android 2.0 saat evet 16 10 -6
## 61 erkek 18 - 25 android 1.0 saat evet 16 4 -12
## 62 erkek 18 - 25 android 1.0 saat evet 15 4 -11
## 63 erkek 18 - 25 android 3.0 saat evet 14 5 -9
## 64 erkek 18 - 25 android 2.0 saat hayır 18 9 -9
## 65 erkek 18 - 25 android 0.0 saat hayır 10 8 -2
## 66 erkek 18 - 25 android 3.0 saat hayır 11 4 -7
## 67 erkek 18 - 25 android 1.0 saat hayır 16 8 -8
## 68 erkek 18 - 25 android 2.0 saat hayır 13 2 -11
## 69 erkek 18 - 25 android 3.0 saat hayır 20 5 -15
## 70 erkek 18 - 25 android 2.0 saat hayır 14 4 -10
## 71 erkek 18 - 25 android 0.0 saat hayır 18 6 -12
## 72 erkek 18 - 25 android 5.0 saat hayır 15 7 -8
## 73 kadın 18 - 25 android 2.0 saat hayır 13 2 -11
## 74 kadın 18 - 25 android 1.0 saat hayır 13 3 -10
## 75 kadın 18 - 25 android 2.0 saat hayır 18 5 -13
## 76 kadın 18 - 25 android 2.0 saat evet 14 3 -11
## 77 kadın 18 - 25 android 1.0 saat hayır 19 3 -16
## 78 kadın 18 - 25 android 4.0 saat hayır 12 5 -7
## 79 kadın 18 - 25 android 2.0 saat hayır 13 3 -10
## 80 kadın 18- 25 android 1.5 saat hayır 20 10 -10
## 81 erkek 25 - 35 ios 2.0 saat hayır 19 4 -15
## 82 erkek 25 - 35 ios 2.0 saat evet 20 3 -17
## 83 erkek 25 - 35 ios 0.0 saat evet 19 6 -13
## 84 erkek 25 - 35 ios 1.0 saat evet 14 5 -9
## 85 erkek 25 - 35 ios 3.0 saat hayır 19 7 -12
## 86 erkek 25 - 35 ios 2.0 saat evet 10 5 -5
## 87 erkek 25 - 35 ios 1.0 saat evet 15 8 -7
## 88 erkek 25 - 35 ios 3.0 saat evet 11 7 -4
## 89 erkek 18 - 25 ios 1.0 saat hayır 13 9 -4
## 90 erkek 18 - 25 ios 2.0 saat hayır 10 8 -2
## 91 erkek 18 - 25 ios 3.0 saat hayır 12 3 -9
## 92 erkek 18 - 25 ios 2.0 saat hayır 13 3 -10
## 93 erkek 18 - 25 ios 0.0 saat hayır 13 8 -5
## 94 erkek 18 - 25 ios 5.0 saat evet 16 9 -7
## 95 erkek 18 - 25 ios 1.5 saat hayır 12 8 -4
## 96 erkek 35 - 50 ios 3.0 saat hayır 10 1 -9
## 97 erkek 35 - 50 ios 2.0 saat evet 18 5 -13
## 98 kadın 25 - 35 ios 2.0 saat hayır 15 8 -7
## 99 kadın 25 - 35 ios 1.0 saat evet 12 6 -6
## 100 kadın 18 - 25 ios 1.0 saat hayır 16 10 -6
## 101 kadın 18 - 25 ios 0.0 saat hayır 16 5 -11
## Tarih
## 1 2019-02-26
## 2 2019-02-26
## 3 2019-02-26
## 4 2019-02-26
## 5 2019-02-26
## 6 2019-02-26
## 7 2019-02-26
## 8 2019-02-26
## 9 2019-02-26
## 10 2019-02-26
## 11 2019-02-26
## 12 2019-02-26
## 13 2019-02-26
## 14 2019-02-26
## 15 2019-02-26
## 16 2019-02-26
## 17 2019-02-26
## 18 2019-02-26
## 19 2019-02-26
## 20 2019-02-26
## 21 2019-02-26
## 22 2019-02-26
## 23 2019-02-26
## 24 2019-02-26
## 25 2019-02-26
## 26 2019-02-26
## 27 2019-02-26
## 28 2019-02-26
## 29 2019-02-26
## 30 2019-02-26
## 31 2019-02-26
## 32 2019-02-26
## 33 2019-02-26
## 34 2019-02-26
## 35 2019-02-26
## 36 2019-02-26
## 37 2019-02-26
## 38 2019-02-26
## 39 2019-02-26
## 40 2019-02-26
## 41 2019-02-26
## 42 2019-02-26
## 43 2019-02-26
## 44 2019-02-26
## 45 2019-02-26
## 46 2019-02-26
## 47 2019-02-26
## 48 2019-02-26
## 49 2019-02-26
## 50 2019-02-26
## 51 2019-02-26
## 52 2019-02-26
## 53 2019-02-26
## 54 2019-02-26
## 55 2019-02-26
## 56 2019-02-26
## 57 2019-02-26
## 58 2019-02-26
## 59 2019-02-26
## 60 2019-02-26
## 61 2019-02-26
## 62 2019-02-26
## 63 2019-02-26
## 64 2019-02-26
## 65 2019-02-26
## 66 2019-02-26
## 67 2019-02-26
## 68 2019-02-26
## 69 2019-02-26
## 70 2019-02-26
## 71 2019-02-26
## 72 2019-02-26
## 73 2019-02-26
## 74 2019-02-26
## 75 2019-02-26
## 76 2019-02-26
## 77 2019-02-26
## 78 2019-02-26
## 79 2019-02-26
## 80 2019-02-26
## 81 2019-02-26
## 82 2019-02-26
## 83 2019-02-26
## 84 2019-02-26
## 85 2019-02-26
## 86 2019-02-26
## 87 2019-02-26
## 88 2019-02-26
## 89 2019-02-26
## 90 2019-02-26
## 91 2019-02-26
## 92 2019-02-26
## 93 2019-02-26
## 94 2019-02-26
## 95 2019-02-26
## 96 2019-02-26
## 97 2019-02-26
## 98 2019-02-26
## 99 2019-02-26
## 100 2019-02-26
## 101 2019-02-26
Replace the data with the corrected one.
<-correction$corrected ornek_kucuk1
Lets consider calculation problem. For fixing the problem, we will consider editrules package. The package allows us to define on categorical, numerical or mixed-type data sets which each record must obey.
library(editrules)
<-editmatrix(expression( Kazanilan - Harcanan == Net)) rule1
Since we define a linear rule, we can apply this rule with correctRounding
function that corrects records under linear restrictions for rounding errors.
#correctRounding(rule,data)
<-correctRounding(rule1,ornek_kucuk1)
correction2$corrections #check whether there is correction correction2
## row variable old new
## 1 3 Harcanan 15 13
$corrected correction2
## Cinsiyet Yaş Sistem Zaman Birim Satin_alma Harcanan Kazanilan Net
## 1 erkek 35 - 50 ios 2.0 saat evet 13 1 -12
## 2 erkek 25 - 35 ios 1.0 saat hayır 16 3 -13
## 3 erkek 25 - 35 ios 4.0 saat evet 13 2 -11
## 4 erkek 18 - 25 ios 2.0 saat evet 20 6 -14
## 5 erkek 18 - 25 ios 1.5 saat hayır 18 7 -15
## 6 erkek 18 - 25 ios 2.0 saat hayır 11 9 -2
## 7 erkek 18 - 25 ios 2.0 saat hayır 15 10 -5
## 8 kadın 18 - 25 ios 1.0 saat evet 11 5 -6
## 9 kadın 18 - 25 ıos 1.0 saat hayır 14 1 -13
## 10 kadın 18 - 25 ios 3.0 saat hayır 19 7 -12
## 11 erkek 35 - 50 android 2.0 saat evet 16 3 -13
## 12 erkek 35 - 50 android 1.0 saat hayır 20 4 -16
## 13 erkek 35 - 50 android 3.0 saat hayır 16 1 -15
## 14 erkek 35 - 50 android 1.0 saat evet 18 4 -14
## 15 erkek 35 - 50 android 2.0 saat hayır 16 6 -10
## 16 erkek 35 - 50 android 3.0 saat hayır 19 10 -9
## 17 erkek 35 - 50 android 2.0 saat hayır 18 2 -16
## 18 erkek 35 - 50 android 1.0 saat hayır 18 9 -9
## 19 kadın 35 - 50 android 5.0 saat evet 18 10 -8
## 20 erkek 25 - 35 android 1.5 saat evet 12 4 -8
## 21 erkek 25 - 35 android 2.0 saat hayır 16 9 -7
## 22 erkek 25 - 35 android 1.0 saat evet 16 2 -14
## 23 erkek 25 - 35 android 4.0 saat hayır 17 5 -12
## 24 erkek 25 - 35 android 2.0 saat hayır 12 3 -9
## 25 erkek 25 - 35 android 1.5 saat hayır 11 9 -2
## 26 erkek 25 - 35 android 2.0 saat hayır 11 2 -9
## 27 erkek 25 - 35 android 2.0 saat hayır 19 5 -14
## 28 erkek 25 - 35 android 1.0 saat evet 12 8 -4
## 29 erkek 25 - 35 android 1.0 saat evet 19 4 -15
## 30 erkek 25 - 35 android 3.0 saat hayır 18 1 -17
## 31 erkek 25 - 35 android 2.0 saat hayır 14 1 -13
## 32 erkek 25 - 35 android 1.0 saat evet 10 3 -7
## 33 erkek 25 - 35 android 3.0 saat evet 12 1 -11
## 34 erkek 25 - 35 android 1.0 saat evet 18 7 -11
## 35 erkek 25 - 35 android 2.0 saat evet 10 9 -1
## 36 erkek 25 - 35 android 3.0 saat hayır 17 1 -16
## 37 erkek 25 - 35 android 2.0 saat hayır 18 1 -17
## 38 erkek 25 - 35 android 1.0 saat evet 19 4 -15
## 39 erkek 25 - 35 android 5.0 saat hayır 12 7 -5
## 40 erkek 25 - 35 android 1.0 saat evet 16 10 -6
## 41 erkek 18 - 25 android 1.5 saat hayır 18 1 -17
## 42 erkek 18 - 25 android 1.5 saat hayır 16 8 -8
## 43 erkek 18 - 25 android 1.5 saat hayır 18 8 -10
## 44 erkek 18 - 25 android 1.5 saat hayır 10 3 -7
## 45 erkek 18 - 25 android 1.0 saat hayır 18 9 -9
## 46 erkek 18 - 25 android 1.0 saat evet 11 8 -3
## 47 erkek 18 - 25 android 3.0 saat hayır 20 9 -11
## 48 erkek 18 - 25 android 2.0 saat hayır 16 4 -12
## 49 erkek 18 - 25 android 1.0 saat hayır 17 7 -10
## 50 erkek 18 - 25 android 3.0 saat evet 20 3 -17
## 51 erkek 18 - 25 android 1.0 saat hayır 14 7 -7
## 52 erkek 18 - 25 android 5.0 saat evet 12 4 -8
## 53 erkek 18 - 25 android 0.0 saat evet 12 8 -4
## 54 erkek 18 - 25 android 2.0 saat evet 14 9 -5
## 55 erkek 18 - 25 android 1.0 saat evet 10 2 -8
## 56 erkek 18 - 25 android 4.0 saat hayır 11 5 -6
## 57 erkek 18 - 25 android 2.0 saat evet 10 2 -8
## 58 erkek 18 - 25 android 1.5 saat evet 16 4 -12
## 59 erkek 18 - 25 android 2.0 saat evet 11 1 -10
## 60 erkek 18 - 25 android 2.0 saat evet 16 10 -6
## 61 erkek 18 - 25 android 1.0 saat evet 16 4 -12
## 62 erkek 18 - 25 android 1.0 saat evet 15 4 -11
## 63 erkek 18 - 25 android 3.0 saat evet 14 5 -9
## 64 erkek 18 - 25 android 2.0 saat hayır 18 9 -9
## 65 erkek 18 - 25 android 0.0 saat hayır 10 8 -2
## 66 erkek 18 - 25 android 3.0 saat hayır 11 4 -7
## 67 erkek 18 - 25 android 1.0 saat hayır 16 8 -8
## 68 erkek 18 - 25 android 2.0 saat hayır 13 2 -11
## 69 erkek 18 - 25 android 3.0 saat hayır 20 5 -15
## 70 erkek 18 - 25 android 2.0 saat hayır 14 4 -10
## 71 erkek 18 - 25 android 0.0 saat hayır 18 6 -12
## 72 erkek 18 - 25 android 5.0 saat hayır 15 7 -8
## 73 kadın 18 - 25 android 2.0 saat hayır 13 2 -11
## 74 kadın 18 - 25 android 1.0 saat hayır 13 3 -10
## 75 kadın 18 - 25 android 2.0 saat hayır 18 5 -13
## 76 kadın 18 - 25 android 2.0 saat evet 14 3 -11
## 77 kadın 18 - 25 android 1.0 saat hayır 19 3 -16
## 78 kadın 18 - 25 android 4.0 saat hayır 12 5 -7
## 79 kadın 18 - 25 android 2.0 saat hayır 13 3 -10
## 80 kadın 18- 25 android 1.5 saat hayır 20 10 -10
## 81 erkek 25 - 35 ios 2.0 saat hayır 19 4 -15
## 82 erkek 25 - 35 ios 2.0 saat evet 20 3 -17
## 83 erkek 25 - 35 ios 0.0 saat evet 19 6 -13
## 84 erkek 25 - 35 ios 1.0 saat evet 14 5 -9
## 85 erkek 25 - 35 ios 3.0 saat hayır 19 7 -12
## 86 erkek 25 - 35 ios 2.0 saat evet 10 5 -5
## 87 erkek 25 - 35 ios 1.0 saat evet 15 8 -7
## 88 erkek 25 - 35 ios 3.0 saat evet 11 7 -4
## 89 erkek 18 - 25 ios 1.0 saat hayır 13 9 -4
## 90 erkek 18 - 25 ios 2.0 saat hayır 10 8 -2
## 91 erkek 18 - 25 ios 3.0 saat hayır 12 3 -9
## 92 erkek 18 - 25 ios 2.0 saat hayır 13 3 -10
## 93 erkek 18 - 25 ios 0.0 saat hayır 13 8 -5
## 94 erkek 18 - 25 ios 5.0 saat evet 16 9 -7
## 95 erkek 18 - 25 ios 1.5 saat hayır 12 8 -4
## 96 erkek 35 - 50 ios 3.0 saat hayır 10 1 -9
## 97 erkek 35 - 50 ios 2.0 saat evet 18 5 -13
## 98 kadın 25 - 35 ios 2.0 saat hayır 15 8 -7
## 99 kadın 25 - 35 ios 1.0 saat evet 12 6 -6
## 100 kadın 18 - 25 ios 1.0 saat hayır 16 10 -6
## 101 kadın 18 - 25 ios 0.0 saat hayır 16 5 -11
## Tarih
## 1 2019-02-26
## 2 2019-02-26
## 3 2019-02-26
## 4 2019-02-26
## 5 2019-02-26
## 6 2019-02-26
## 7 2019-02-26
## 8 2019-02-26
## 9 2019-02-26
## 10 2019-02-26
## 11 2019-02-26
## 12 2019-02-26
## 13 2019-02-26
## 14 2019-02-26
## 15 2019-02-26
## 16 2019-02-26
## 17 2019-02-26
## 18 2019-02-26
## 19 2019-02-26
## 20 2019-02-26
## 21 2019-02-26
## 22 2019-02-26
## 23 2019-02-26
## 24 2019-02-26
## 25 2019-02-26
## 26 2019-02-26
## 27 2019-02-26
## 28 2019-02-26
## 29 2019-02-26
## 30 2019-02-26
## 31 2019-02-26
## 32 2019-02-26
## 33 2019-02-26
## 34 2019-02-26
## 35 2019-02-26
## 36 2019-02-26
## 37 2019-02-26
## 38 2019-02-26
## 39 2019-02-26
## 40 2019-02-26
## 41 2019-02-26
## 42 2019-02-26
## 43 2019-02-26
## 44 2019-02-26
## 45 2019-02-26
## 46 2019-02-26
## 47 2019-02-26
## 48 2019-02-26
## 49 2019-02-26
## 50 2019-02-26
## 51 2019-02-26
## 52 2019-02-26
## 53 2019-02-26
## 54 2019-02-26
## 55 2019-02-26
## 56 2019-02-26
## 57 2019-02-26
## 58 2019-02-26
## 59 2019-02-26
## 60 2019-02-26
## 61 2019-02-26
## 62 2019-02-26
## 63 2019-02-26
## 64 2019-02-26
## 65 2019-02-26
## 66 2019-02-26
## 67 2019-02-26
## 68 2019-02-26
## 69 2019-02-26
## 70 2019-02-26
## 71 2019-02-26
## 72 2019-02-26
## 73 2019-02-26
## 74 2019-02-26
## 75 2019-02-26
## 76 2019-02-26
## 77 2019-02-26
## 78 2019-02-26
## 79 2019-02-26
## 80 2019-02-26
## 81 2019-02-26
## 82 2019-02-26
## 83 2019-02-26
## 84 2019-02-26
## 85 2019-02-26
## 86 2019-02-26
## 87 2019-02-26
## 88 2019-02-26
## 89 2019-02-26
## 90 2019-02-26
## 91 2019-02-26
## 92 2019-02-26
## 93 2019-02-26
## 94 2019-02-26
## 95 2019-02-26
## 96 2019-02-26
## 97 2019-02-26
## 98 2019-02-26
## 99 2019-02-26
## 100 2019-02-26
## 101 2019-02-26
After solving this problem, I have still some problems, unfortunately. I would like to be sure that all time values should be greater than 0. If one of them is zero, it should be replaced with 1.
library(editrules)
<-editset("Zaman>0")
E<-violatedEdits(E,ornek_kucuk1)
violation#violatedEdits shows the index of the observations which violates the rule.
summary(violation)
## Edit violations, 101 observations, 0 completely missing (0%):
##
## editname freq rel
## num1 6 5.9%
##
## Edit violations per record:
##
## errors freq rel
## 0 95 94.1%
## 1 6 5.9%
plot(violation)
As you see, there are 6 observations being equal to 0.
which(ornek_kucuk1$Zaman==0)
## [1] 53 65 71 83 93 101
$Zaman[which(ornek_kucuk1$Zaman==0)]=1 ornek_kucuk1
Check it again!
<-violatedEdits(E,ornek_kucuk1)
violation1summary(violation1)
## No violations detected, 0 checks evaluated to NA
## NULL
The problem is solved. The data is ready to analyze.
kable(ornek_kucuk1)
Cinsiyet | Yaş | Sistem | Zaman | Birim | Satin_alma | Harcanan | Kazanilan | Net | Tarih |
---|---|---|---|---|---|---|---|---|---|
erkek | 35 - 50 | ios | 2.0 | saat | evet | 13 | 1 | -12 | 2019-02-26 |
erkek | 25 - 35 | ios | 1.0 | saat | hayır | 16 | 3 | -13 | 2019-02-26 |
erkek | 25 - 35 | ios | 4.0 | saat | evet | 15 | 2 | -11 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | evet | 20 | 6 | -14 | 2019-02-26 |
erkek | 18 - 25 | ios | 1.5 | saat | hayır | 18 | 7 | -15 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | hayır | 11 | 9 | -2 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | hayır | 15 | 10 | -5 | 2019-02-26 |
kadın | 18 - 25 | ios | 1.0 | saat | evet | 11 | 5 | -6 | 2019-02-26 |
kadın | 18 - 25 | ıos | 1.0 | saat | hayır | 14 | 1 | -13 | 2019-02-26 |
kadın | 18 - 25 | ios | 3.0 | saat | hayır | 19 | 7 | -12 | 2019-02-26 |
erkek | 35 - 50 | android | 2.0 | saat | evet | 16 | 3 | -13 | 2019-02-26 |
erkek | 35 - 50 | android | 1.0 | saat | hayır | 20 | 4 | -16 | 2019-02-26 |
erkek | 35 - 50 | android | 3.0 | saat | hayır | 16 | 1 | -15 | 2019-02-26 |
erkek | 35 - 50 | android | 1.0 | saat | evet | 18 | 4 | -14 | 2019-02-26 |
erkek | 35 - 50 | android | 2.0 | saat | hayır | 16 | 6 | -10 | 2019-02-26 |
erkek | 35 - 50 | android | 3.0 | saat | hayır | 19 | 10 | -9 | 2019-02-26 |
erkek | 35 - 50 | android | 2.0 | saat | hayır | 18 | 2 | -16 | 2019-02-26 |
erkek | 35 - 50 | android | 1.0 | saat | hayır | 18 | 9 | -9 | 2019-02-26 |
kadın | 35 - 50 | android | 5.0 | saat | evet | 18 | 10 | -8 | 2019-02-26 |
erkek | 25 - 35 | android | 1.5 | saat | evet | 12 | 4 | -8 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 16 | 9 | -7 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 16 | 2 | -14 | 2019-02-26 |
erkek | 25 - 35 | android | 4.0 | saat | hayır | 17 | 5 | -12 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 12 | 3 | -9 | 2019-02-26 |
erkek | 25 - 35 | android | 1.5 | saat | hayır | 11 | 9 | -2 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 11 | 2 | -9 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 19 | 5 | -14 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 12 | 8 | -4 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 19 | 4 | -15 | 2019-02-26 |
erkek | 25 - 35 | android | 3.0 | saat | hayır | 18 | 1 | -17 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 14 | 1 | -13 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 10 | 3 | -7 | 2019-02-26 |
erkek | 25 - 35 | android | 3.0 | saat | evet | 12 | 1 | -11 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 18 | 7 | -11 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | evet | 10 | 9 | -1 | 2019-02-26 |
erkek | 25 - 35 | android | 3.0 | saat | hayır | 17 | 1 | -16 | 2019-02-26 |
erkek | 25 - 35 | android | 2.0 | saat | hayır | 18 | 1 | -17 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 19 | 4 | -15 | 2019-02-26 |
erkek | 25 - 35 | android | 5.0 | saat | hayır | 12 | 7 | -5 | 2019-02-26 |
erkek | 25 - 35 | android | 1.0 | saat | evet | 16 | 10 | -6 | 2019-02-26 |
erkek | 18 - 25 | android | 1.5 | saat | hayır | 18 | 1 | -17 | 2019-02-26 |
erkek | 18 - 25 | android | 1.5 | saat | hayır | 16 | 8 | -8 | 2019-02-26 |
erkek | 18 - 25 | android | 1.5 | saat | hayır | 18 | 8 | -10 | 2019-02-26 |
erkek | 18 - 25 | android | 1.5 | saat | hayır | 10 | 3 | -7 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 18 | 9 | -9 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | evet | 11 | 8 | -3 | 2019-02-26 |
erkek | 18 - 25 | android | 3.0 | saat | hayır | 20 | 9 | -11 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | hayır | 16 | 4 | -12 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 17 | 7 | -10 | 2019-02-26 |
erkek | 18 - 25 | android | 3.0 | saat | evet | 20 | 3 | -17 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 14 | 7 | -7 | 2019-02-26 |
erkek | 18 - 25 | android | 5.0 | saat | evet | 12 | 4 | -8 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | evet | 12 | 8 | -4 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | evet | 14 | 9 | -5 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | evet | 10 | 2 | -8 | 2019-02-26 |
erkek | 18 - 25 | android | 4.0 | saat | hayır | 11 | 5 | -6 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | evet | 10 | 2 | -8 | 2019-02-26 |
erkek | 18 - 25 | android | 1.5 | saat | evet | 16 | 4 | -12 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | evet | 11 | 1 | -10 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | evet | 16 | 10 | -6 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | evet | 16 | 4 | -12 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | evet | 15 | 4 | -11 | 2019-02-26 |
erkek | 18 - 25 | android | 3.0 | saat | evet | 14 | 5 | -9 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | hayır | 18 | 9 | -9 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 10 | 8 | -2 | 2019-02-26 |
erkek | 18 - 25 | android | 3.0 | saat | hayır | 11 | 4 | -7 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 16 | 8 | -8 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | hayır | 13 | 2 | -11 | 2019-02-26 |
erkek | 18 - 25 | android | 3.0 | saat | hayır | 20 | 5 | -15 | 2019-02-26 |
erkek | 18 - 25 | android | 2.0 | saat | hayır | 14 | 4 | -10 | 2019-02-26 |
erkek | 18 - 25 | android | 1.0 | saat | hayır | 18 | 6 | -12 | 2019-02-26 |
erkek | 18 - 25 | android | 5.0 | saat | hayır | 15 | 7 | -8 | 2019-02-26 |
kadın | 18 - 25 | android | 2.0 | saat | hayır | 13 | 2 | -11 | 2019-02-26 |
kadın | 18 - 25 | android | 1.0 | saat | hayır | 13 | 3 | -10 | 2019-02-26 |
kadın | 18 - 25 | android | 2.0 | saat | hayır | 18 | 5 | -13 | 2019-02-26 |
kadın | 18 - 25 | android | 2.0 | saat | evet | 14 | 3 | -11 | 2019-02-26 |
kadın | 18 - 25 | android | 1.0 | saat | hayır | 19 | 3 | -16 | 2019-02-26 |
kadın | 18 - 25 | android | 4.0 | saat | hayır | 12 | 5 | -7 | 2019-02-26 |
kadın | 18 - 25 | android | 2.0 | saat | hayır | 13 | 3 | -10 | 2019-02-26 |
kadın | 18- 25 | android | 1.5 | saat | hayır | 20 | 10 | -10 | 2019-02-26 |
erkek | 25 - 35 | ios | 2.0 | saat | hayır | 19 | 4 | -15 | 2019-02-26 |
erkek | 25 - 35 | ios | 2.0 | saat | evet | 20 | 3 | -17 | 2019-02-26 |
erkek | 25 - 35 | ios | 1.0 | saat | evet | 19 | 6 | -13 | 2019-02-26 |
erkek | 25 - 35 | ios | 1.0 | saat | evet | 14 | 5 | -9 | 2019-02-26 |
erkek | 25 - 35 | ios | 3.0 | saat | hayır | 19 | 7 | -12 | 2019-02-26 |
erkek | 25 - 35 | ios | 2.0 | saat | evet | 10 | 5 | -5 | 2019-02-26 |
erkek | 25 - 35 | ios | 1.0 | saat | evet | 15 | 8 | -7 | 2019-02-26 |
erkek | 25 - 35 | ios | 3.0 | saat | evet | 11 | 7 | -4 | 2019-02-26 |
erkek | 18 - 25 | ios | 1.0 | saat | hayır | 13 | 9 | -4 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | hayır | 10 | 8 | -2 | 2019-02-26 |
erkek | 18 - 25 | ios | 3.0 | saat | hayır | 12 | 3 | -9 | 2019-02-26 |
erkek | 18 - 25 | ios | 2.0 | saat | hayır | 13 | 3 | -10 | 2019-02-26 |
erkek | 18 - 25 | ios | 1.0 | saat | hayır | 13 | 8 | -5 | 2019-02-26 |
erkek | 18 - 25 | ios | 5.0 | saat | evet | 16 | 9 | -7 | 2019-02-26 |
erkek | 18 - 25 | ios | 1.5 | saat | hayır | 12 | 8 | -4 | 2019-02-26 |
erkek | 35 - 50 | ios | 3.0 | saat | hayır | 10 | 1 | -9 | 2019-02-26 |
erkek | 35 - 50 | ios | 2.0 | saat | evet | 18 | 5 | -13 | 2019-02-26 |
kadın | 25 - 35 | ios | 2.0 | saat | hayır | 15 | 8 | -7 | 2019-02-26 |
kadın | 25 - 35 | ios | 1.0 | saat | evet | 12 | 6 | -6 | 2019-02-26 |
kadın | 18 - 25 | ios | 1.0 | saat | hayır | 16 | 10 | -6 | 2019-02-26 |
kadın | 18 - 25 | ios | 1.0 | saat | hayır | 16 | 5 | -11 | 2019-02-26 |