View the step-by-step solution to:

Question

# (1). Compute the log_den=log(Pop/Area) in d1. Compute factor object Landmass from d1\$Landmass using the built-in

function factor() and labels c('N.Amer.','S.Amer.','Europe','Africa','Asia','Oceania').

(2). Produce parallel boxplots of log_den with the factor Landmass in (1). Compare and describe briefly the mean and standard deviation of each Landmass in this boxplot. Compute the standard deviation of log_den in each Landmass as well.

(3) Now let's find out the total population using a particular language. Write R commands to compute the total population in d1 that use English (i.e. Lang=1) and save them in p1. Similarly compute the total population for Lang=2, 3, ...10 and save them in p2, p3, ..., p10 respectively.

(4) Compute vector p which contains p1,...,, p10 in (3) and make a character vector v contains "ENG","SPA","FRN","GRM","SLV","IND","CHI","ARB","JTF","OTH".

I got number (1) as Landmass <- factor(d1\$Landmass, c('N.Amer.','S.Amer.','Europe','Africa','Asia','Oceania'))

but I'm not sure, and for (2) I got boxplots with boxplot(log_den ~ d1\$Landmass, data=Landmass) but it keeps on making error.

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents