Directions: Write your R codes, in addition to your answer, to the following pro

Directions: Write your R codes, in addition to your answer, to the following problems (Dont forget to refer to the R reference card to find helpful commands). Data: The data set GoldSilver, a .csv file, contains gold and silver prices over the course of several years. See https://vincentarelbundock.github.io/Rdatasets/doc/AER/GoldSilver.html for more information. Load the data into R by going through the following steps.Download the GoldSilver file and place it somewhere you can easily access it, like your Desktop.Define a data frame in R called gs using the code: gs <- read.csv(file.choose(), header = TRUE)The function read.csv needs a .csv file and the command file.choose() will prompt you to locate the correct file. The command header is where we decide to include the names of the variables or not.What are the dimensions of the data frame?What are the variable names? What are the variable types?What command would you use to extract just the silver prices?What is the minimum gold price? On which date did this occur?On which date was the difference between gold and silver prices the largest?Data: The data set Sunspot, a .csv file, contains sunspot data dating back to 1700. See https://vincentarelbundock.github.io/Rdatasets/doc/datasets/sunspot.year.html for more information.Create a line graph to visualize the number of sunspots over the years. Paste your graph here. Is there an apparent trend?

Leave a Reply

Your email address will not be published. Required fields are marked *