The analysis in got-1.R was a great success! Every human should have the right to read it!
Here it is:
# With library() the computer loads the named packages in the brackets that we need for computing. These packages include different pre-coded functions.library("tinytex")library("readr")library("ggplot2")library("dplyr")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library("ggrepel")# with read.csv, we load the .csv datafile and with the arrow we save it in a variable named "screentimes"screentimes <-read_csv("GOT_screentimes_1.csv")
Rows: 191 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): name, imdb_url, portrayed_by_name, portrayed_by_imdb_url
dbl (2): screentime, episodes
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# top_n() selects the top n rows based on a specified column. Here, the top 10 screentime is selected.screentimes_high <-top_n(screentimes, 10, screentime)# ggplot enables different plots with the data. Here, we plot a scatterplot with the screentime, the top 10 screentimes being named inside the plotggplot(screentimes, aes(screentime, episodes)) +geom_point() +geom_text_repel(data = screentimes_high,aes(label = name),min.segment.length =0)
Warning: Removed 15 rows containing missing values or values outside the scale range
(`geom_point()`).
Introduction
In the following sections, the Quarto exercises will be portrayed.
Quarto Exercise 1
Isert a figure from directory:
Figure 1: House Baratheon
Quarto Exercise 2
Cross referencing to a figure:
See Figure Figure 1 for the banner of House Baratheon.