Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

### Problem 5 The dataset AllCountries includes information on the percent of pe

ID: 3597568 • Letter: #

Question

### Problem 5
The dataset AllCountries includes information on the percent of people in each country with access to internet, energy consumption and more.

The dataset AllCountries (http://www.lock5stat.com/datasets1e/AllCountries.csv) includes information on the percent of people in each country with access to internet, energy consumption and more.

a) Upload the dataset AllCountries from the textbook's website. Analyze the content of the dataset by using the command head and print the size (number of countries included) of the dataset.

```{r}
# Insert R code below this line
datafile=read.csv("C:/Users/desktop/AllCountries.csv")

```

```{r}

```

b) Find the developed country with the largest percent access to Internet

```{r}

```

c) Determine the countries with the largest and smallest land areas

```{r}

```

Explanation / Answer

datafile=read.csv("C://Users/CHANDRA/Desktop/AllCountries.csv", TRUE, sep = ",") #Reading data

print ("Total number countries: ")
print ( nrow(datafile))

#Changing NA values to zeros
datafile$Developed[which(is.na(datafile$Developed))] <- 0
datafile$Internet[which(is.na(datafile$Internet))] <- 0


#print Max developed country with largest internet access
print(datafile[ datafile$Developed == max(datafile$Developed, na.rm=TRUE) & datafile$Internet == max(datafile$Internet, na.rm=TRUE) ,])

print(" ")

#Printing countries with maximum and minimum land area
print(datafile[ datafile$LandArea == max(datafile$LandArea, na.rm=TRUE),])
print(datafile[ datafile$LandArea == min(datafile$LandArea, na.rm=TRUE),])