load required libraries

library(quarto) library(tidyverse)

Load the data into a data frame

df <- data.frame( Country = c(“USA”, “China”, “Japan”, “Germany”, “France”), Debt_GDP_Ratio = c(105.6, 66.2, 237.6, 65.4, 98.5), Debt_Per_Capita = c(62000, 54000, 76000, 47000, 69000), Debt_to_Income_Ratio = c(3.2, 2.5, 4.1, 2.8, 3.6) )

Remove rows with missing values

df_clean <- df %>% drop_na()

Convert Debt_GDP_Ratio to percentage

df_clean\(Debt_GDP_Ratio <- df_clean\)Debt_GDP_Ratio / 100

Round Debt_GDP_Ratio and Debt_to_Income_Ratio to 2 decimal places

df_clean\(Debt_GDP_Ratio <- round(df_clean\)Debt_GDP_Ratio, 2) df_clean\(Debt_to_Income_Ratio <- round(df_clean\)Debt_to_Income_Ratio, 2)

Convert Debt_Per_Capita to integer

df_clean\(Debt_Per_Capita <- as.integer(df_clean\)Debt_Per_Capita)

Add code annotations to explain the steps performed

Load Libraries

library(quarto) # Load quarto package for creating quarto documents library(tidyverse) # Load tidyverse package for data manipulation

Load Data

df <- data.frame(…) # Load data into a data frame

Clean Data

df_clean <- df %>% drop_na() # Remove rows with missing values

df_clean\(Debt_GDP_Ratio <- df_clean\)Debt_GDP_Ratio / 100 # Convert Debt_GDP_Ratio to percentage df_clean\(Debt_GDP_Ratio <- round(df_clean\)Debt_GDP_Ratio, 2) # Round Debt_GDP_Ratio to 2 decimal places df_clean\(Debt_to_Income_Ratio <- round(df_clean\)Debt_to_Income_Ratio, 2) # Round Debt_to_Income_Ratio to 2 decimal places

df_clean\(Debt_Per_Capita <- as.integer(df_clean\)Debt_Per_Capita) # Convert Debt_Per_Capita to integer

df_clean # Print cleaned data

Define the username and document name

username <- ” haliyeva ” # Replace with your R Pubs username document <- “third_part” # Replace with your quarto document name

Create the URL

url <- paste0(“https://rpubs.com/”, username, “/”, document)