Publications by Luke Karelas
Quiz 5
Description of the data, data_quiz5 country continent lifeExp life expectancy in year pop total population gdpPercap GDP per capita in U.S. dollar options(scipen=999) Q1 Import data Hint: The data is posted in Moodle. Look for data_quiz5.csv under the Data Files section. myRegressionData <- read.csv("data_quiz5.csv") Q2 Review data Hint: Use ...
1978 sym R (2379 sym/6 pcs) 1 img
My First RMarkdown with Code
Use the given code below to answer the questions. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # for financial analysis ## Import data stocks <- tq_get("AAPL", get = "stock.prices", from = "2016-01-01") stocks ## # A tibble: 1,023 x 7 ## date open high low close volume adjusted ## <date> ...
1687 sym R (3917 sym/13 pcs) 3 img
Mock Quiz 1
Use the given code below to answer the questions. Q1 Get Walmart stock prices, instead of Apple. Hint: Insert a new code chunk below and type in the code, using the tq_get() function above. Replace the ticker symbol for Walmart. You may find the ticker symbol for Microsoft from Yahoo Finance. ## # A tibble: 1,025 x 7 ## date open high...
2017 sym R (1372 sym/2 pcs) 2 img
Bivariate Graphs
In this exercise you will learn to plot data using the ggplot2 package. To answer the questions below, use Chapter 4.3 Categorical vs. Quantitative Data Visualization with R. # Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("AAPL", "MSFT"), get = "stock.prices", from = "2020-01-01") Q1 Selec...
1134 sym R (1190 sym/8 pcs) 6 img
Quiz 5
Q1 Import stock prices of NASDAQ Compsite Index, Microsoft and Walmart for the last 30 years. Hint: Add group_by(symbol) at the end of the code so that calculations below will be done per stock. ## # A tibble: 22,677 x 8 ## # Groups: symbol [3] ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl...
3281 sym R (2884 sym/6 pcs)