{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)

R MARKDOWN

Rmarkdown dosyaları genellikle bir metin gibi girintiler, onun tablo biçimlendirme, yazı ve başlıkları olarak biçimlendirilir. Paged_table komutunu çalıştırabilmek için Rmarkdown kullanıyoruz.

library ve require komutları paketleri programda aktifleştirmek için kullanılır.

{r} library(rmarkdown) library(wooldridge) data("discrim")

##PAKET ÖRNEKLERİMİZ

janitor

tablolar ve veri temizleme ## gtsummary tanımlayıcı ve istatistiksel tablolar hazırlama ##rstatix istatistiksel testleri ve özetleri hızla çalıştırma ## broom regresyonlardan elde edilen sonuçları düzenleme ## lmtest likelihood-ratio testleri

-https://data.worldbank.org/indicator/IC.TAX.TOTL.CP.ZS

-https://data.worldbank.org/indicator/IC.TAX.TOTL.CP.ZS?locations=GR-TR

-https://data.worldbank.org/indicator/IC.TAX.TOTL.CP.ZS?locations=TR-AT

{r} library(WDI)

{r} df <- WDI(country = "all", indicator = c("NY.GDP.MKTP.CD" , "IC.TAX.TOTL.CP.ZS"))

{r} library(WDI) privatesector= WDI(indicator = 'IC.TAX.TOTL.CP.ZS', country = c('TR','AT'), start=2005, end=2019)

{r} str(df)

{r} library(dplyr)

{r} library(tidyr)

{r} library(explore)

{r} df %>% describe_all()

```{r} countries <- unique(df$country)



```{r}
knitr::kable(countries)

{r} WDI_extra <- as.data.frame(WDI_data$country)

{r} df_TR_GR <- df %>% filter(country %in% c("TR", "AT"))

{r} df <- df %>% filter(country != "tax")

{r} df %>% describe_all()

{r} missing_data_count <- df %>%

{r} df_TR_GR <- df %>% filter(country %in% c("TR", "AT"))

```{r} WDI_extra_TR_GR <- WDI_extra %>% filter(country %in% c(“TR”, “AT”))




```{r}

df_merged <- left_join(df_TR_AT, WDI_extra_TR_AT, by = "country")

{r} df <- left_join(df, WDI_extra)

```{r} df <- df %>% filter(region != “Aggregates”)




```{r}
for(col in names(df)) {
  print(summary(df[[col]]))}

{r} df %>% describe_all()

{r} missing_data_count <- df %>%

{r} countries_with_all_missing <- missing_data_count %>%

{r} filter(missing_count == 66)

{r} countries_with_more_than_20_missing <- missing_data_count %>%

{r} filter(missing_count > 5)

{r} print(countries_with_all_missing)

# A tibble: 0 × 2

# ℹ 2 variables: country , missing_count

{r} print(countries_with_more_than_20_missing)

{r} df <- df %>%

{r} filter(!(country %in% c("türkiye ve avusturalya")))

{r} df %>% describe_all()

{r} dff <- df %>% filter(year>=2000)

{r} dff %>% describe_all()