diff --git a/docs/04_debugging_files/figure-html/first-case-study-plot-1.png b/docs/04_debugging_files/figure-html/first-case-study-plot-1.png index 01aebd3..8bba6e2 100644 Binary files a/docs/04_debugging_files/figure-html/first-case-study-plot-1.png and b/docs/04_debugging_files/figure-html/first-case-study-plot-1.png differ diff --git a/docs/04_debugging_files/figure-html/fixed-resample-1.png b/docs/04_debugging_files/figure-html/fixed-resample-1.png index cb22642..78b7b04 100644 Binary files a/docs/04_debugging_files/figure-html/fixed-resample-1.png and b/docs/04_debugging_files/figure-html/fixed-resample-1.png differ diff --git a/docs/04_debugging_files/figure-html/sex-and-species-1.png b/docs/04_debugging_files/figure-html/sex-and-species-1.png index 2a19bdc..ae94023 100644 Binary files a/docs/04_debugging_files/figure-html/sex-and-species-1.png and b/docs/04_debugging_files/figure-html/sex-and-species-1.png differ diff --git a/docs/05_visualization_files/figure-html/example-genotype-1.png b/docs/05_visualization_files/figure-html/example-genotype-1.png index a84cc42..b856030 100644 Binary files a/docs/05_visualization_files/figure-html/example-genotype-1.png and b/docs/05_visualization_files/figure-html/example-genotype-1.png differ diff --git a/docs/language-fundamentals.html b/docs/language-fundamentals.html index 0fa65a2..4ece49e 100644 --- a/docs/language-fundamentals.html +++ b/docs/language-fundamentals.html @@ -386,10 +386,10 @@
new.env
function to create a new environment:
-## <environment: 0x7fe9410e3ec8>
+## <environment: 0x7f7ae2b6cec8>
Unlike most objects, printing an environment doesn’t print its contents.
Instead, R prints its type (which is environment
) and a unique identifier
-(0x7fe9410e3ec8
in this case).
0x7f7ae2b6cec8
in this case).
The unique identifier is actually the memory address of the environment. Every object you use in R is stored as a series of bytes in your computer’s random-access memory (RAM). Each byte in memory has a unique address, @@ -565,7 +565,7 @@
e = my_hello()
e
-## <environment: 0x7fe93cbe28d0>
+## <environment: 0x7f7aebc538d0>
And the variable hello
exists in the call environment, but not in the global
environment:
e2 = my_hello()
e
-## <environment: 0x7fe93cbe28d0>
+## <environment: 0x7f7aebc538d0>
-## <environment: 0x7fe9445c1730>
+## <environment: 0x7f7aebf5ef30>
By creating a new environment for every call, R isolates code in the function body from code outside of the body. As a result, most R functions have no side effects. This is a good thing, since it means you generally don’t have @@ -832,7 +832,7 @@
## function (.data, ..., .by = NULL, .preserve = FALSE)
@@ -844,14 +844,14 @@ 6.1.7.1 The Colon Operators
## function (data = NULL, mapping = aes(), ..., environment = parent.frame())
## {
## UseMethod("ggplot")
## }
-## <bytecode: 0x7fe93fe57e38>
+## <bytecode: 0x7f7ae9f6a638>
## <environment: namespace:ggplot2>
The related triple-colon operator :::
gets a private variable in a
package. Generally these are private for a reason! Only use :::
if you’re
@@ -1096,13 +1096,13 @@
split
## function (x, f, drop = FALSE, ...)
## UseMethod("split")
-## <bytecode: 0x7fe941aa3fe0>
+## <bytecode: 0x7f7ae65f07e0>
## <environment: namespace:base>
Another is the plot
function, which creates a plot:
## function (x, y, ...)
## UseMethod("plot")
-## <bytecode: 0x7fe941d360f8>
+## <bytecode: 0x7f7ae9bc8ef8>
## <environment: namespace:base>
The UseMethod
function requires the name of the generic (as a string) as its
first argument. The second argument is optional and specifies the object to use
@@ -1131,7 +1131,7 @@
resample = function(data, B) {
N = length(data)
result = numeric(B)
@@ -1050,8 +1050,8 @@ 4.5.2 Benchmarkingmicrobenchmark(A = runif(1e5), B = rnorm(1e5))
## Unit: milliseconds
## expr min lq mean median uq max neval cld
-## A 1.222137 1.551553 1.918578 1.897681 2.134616 5.410240 100 a
-## B 3.911026 4.473120 5.264633 5.162160 6.039717 9.846878 100 b
+## A 1.289372 1.561523 1.844360 1.761270 2.012996 5.612642 100 a
+## B 4.102926 4.568713 5.246599 5.189999 5.751217 9.335760 100 b
The microbenchmark
has parameters to control the number of times each
expression runs, the units for the timings, and more. You can find the details
in ?microbenchmark
.