Using R studio how would you code this problem? *You can find data describing va
ID: 3205194 • Letter: U
Question
Using R studio how would you code this problem? *You can find data describing various statistics on 2012 Olympic participating nations such as population and medal counts in the comma-separated value file located here: http://introcs.cs.princeton.edu/java/data/olympic-medals2012.csv` Load this dataset into R in a data frame and do the following:* 1. *Create a new data frame containing only the country's ISO code (a three-letter code for the country; USA is the United States of America, and DZA Algeria), name, population, and counts for gold, silver, and bronze. This data frame should be called `olympic2012`.*
Explanation / Answer
Importing CSV Files
df <- read.csv("olumpic-medals2012.csv" , header = TRUE)
To create a new data frame with the given constraints =
olympic2012 <- olympic-medals2012[,c ("ISO ", "Country.name", "pop.2010 ", "Gold " , "Silver ", "Bronze ") ]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.