Last updated: 2024-02-06
Checks: 7 0
Knit directory: LocksofLineage/
This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20231117)
was run prior to running
the code in the R Markdown file. Setting a seed ensures that any results
that rely on randomness, e.g. subsampling or permutations, are
reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 0e0ca22. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish
or
wflow_git_commit
). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: data/.DS_Store
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown (analysis/trait_matrix.Rmd
) and HTML
(docs/trait_matrix.html
) files. If you’ve configured a
remote Git repository (see ?wflow_git_remote
), click on the
hyperlinks in the table below to view the files as they were in that
past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | 0e0ca22 | Sarah E Taylor | 2024-02-06 | Updated where my data file is, added the trait matrix. |
# Define the size of the matrix
n <- 9
# Create the matrix with sequence of numbers
my_matrix <- matrix(1:(n*n), nrow=n, ncol=n)
# Define the labels for rows and columns
labels <- c("Sexual_dimorphism", "Location", "Direction", "Natal_coat", "Natal_Coat_Type", "Sexual_dichromatism", "Sexual_dichromatism_type", "Where", "Darker")
# Set the same labels for both rows and columns
dimnames(my_matrix) <- list(labels, labels)
# Set the diagonal elements to NA (blank them)
diag(my_matrix) <- NA
# Print the matrix
print(my_matrix)
Sexual_dimorphism Location Direction Natal_coat
Sexual_dimorphism NA 10 19 28
Location 2 NA 20 29
Direction 3 12 NA 30
Natal_coat 4 13 22 NA
Natal_Coat_Type 5 14 23 32
Sexual_dichromatism 6 15 24 33
Sexual_dichromatism_type 7 16 25 34
Where 8 17 26 35
Darker 9 18 27 36
Natal_Coat_Type Sexual_dichromatism
Sexual_dimorphism 37 46
Location 38 47
Direction 39 48
Natal_coat 40 49
Natal_Coat_Type NA 50
Sexual_dichromatism 42 NA
Sexual_dichromatism_type 43 52
Where 44 53
Darker 45 54
Sexual_dichromatism_type Where Darker
Sexual_dimorphism 55 64 73
Location 56 65 74
Direction 57 66 75
Natal_coat 58 67 76
Natal_Coat_Type 59 68 77
Sexual_dichromatism 60 69 78
Sexual_dichromatism_type NA 70 79
Where 62 NA 80
Darker 63 72 NA
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] workflowr_1.7.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.11 compiler_4.2.1 pillar_1.8.1 bslib_0.4.2
[5] later_1.3.1 git2r_0.32.0 jquerylib_0.1.4 tools_4.2.1
[9] getPass_0.2-2 digest_0.6.30 jsonlite_1.8.4 evaluate_0.20
[13] lifecycle_1.0.3 tibble_3.1.8 pkgconfig_2.0.3 rlang_1.0.6
[17] cli_3.6.0 rstudioapi_0.14 yaml_2.3.7 xfun_0.41
[21] fastmap_1.1.0 httr_1.4.4 stringr_1.5.0 knitr_1.42
[25] fs_1.6.1 vctrs_0.5.2 sass_0.4.5 rprojroot_2.0.4
[29] glue_1.6.2 R6_2.5.1 processx_3.8.0 fansi_1.0.3
[33] rmarkdown_2.20 callr_3.7.3 magrittr_2.0.3 whisker_0.4.1
[37] ps_1.7.2 promises_1.2.1 htmltools_0.5.4 httpuv_1.6.11
[41] utf8_1.2.2 stringi_1.7.8 cachem_1.0.6