nruns <- 1000000 # one million runs
minIV <- 0
maxIV <- 15
perfects <- 0
for(i in 1:nruns){
pokemon <- sample(x = minIV:maxIV, size = 3, replace = TRUE)
David Bapst
Texas A&M University
In programming, we often "borrow, reuse or steal" other people's code. This can make the line between what is plagiarized work and what is original work unclear. So, let's dive in a little to how code is reused, and what proper reuse and attribution look like.
First, all programming depends on previous programming: the code you will be write in this class (and pretty much any other data science class) relies on a language (R, Python, Java, etc) with a wide number of commands, and the commands available in the languages are what make the language useful. (In R, and many other languages, we refer to 'functions', not commands.) Those 'functions' themselves are pre-packaged segments of code that we can call upon by simply uttering the necessary command -- and they were written by previous developers. So, anyone who develops using such programming languages automatically relies on other people's work
# persistent_rb_eng_via_nohup.R | |
# to initiate rb: | |
mkfifo in_revbayes | |
# nohup rb <in_revbayes >out.txt & | |
# to run a sample of code (here 'x = 3+111') | |
# (echo -e "x = 3+111\n" && cat) > in_revbayes & |
# Pokemon GO nest migration table - oddish removed, with gen 5 and no Eevee - 10-03-19 | |
# taxa in full nesting list not in NEW nesting list | |
removeTaxaNew <- c("Oddish", "Eevee") | |
# taxa in full nesting list not in OLD nesting list | |
# this is often an empty set because | |
# the nesting list was fully utilized before an event | |
# if full list before migration, just do `""` |
I Gotta Feeling | The Black Eyed Peas | THE E.N.D. (THE ENERGY NEVER DIES) | 4:49 | |
---|---|---|---|---|
Party Rock Anthem | LMFAO, Lauren Bennett, GoonRock | Sorry For Party Rocking | 4:22 | |
On The Floor - Radio Edit | Jennifer Lopez, Pitbull | On The Floor | 3:50 | |
Good Feeling | Flo Rida | Wild Ones | 4:08 | |
Just Dance | Lady Gaga, Colby O'Donis | The Fame Monster (Deluxe) | 4:01 | |
TiK ToK | Kesha | Animal (Expanded Edition) | 3:19 | |
Hey Ya! | OutKast | Speakerboxxx/The Love Below | 3:55 | |
Dancing On My Own - Radio Edit | Robyn | Body Talk | 4:38 | |
Call Your Girlfriend | Robyn | Body Talk | 3:47 | |
Run the World (Girls) | Beyoncé | 4 | 3:56 |
## To install the latest version from Github: | |
# install.packages("devtools") | |
# devtools::install_github("tylermorganwall/rayshader") | |
## also marmap | |
# install.packages("marmap") | |
## load these libraries (?) | |
# library(rayshader) | |
# library(marmap) | |
## now just imported... |
filename <- "remove_pika_aipom" | |
# remove taxa | |
removeTaxa <- c("Pikachu", "Aipom") | |
#################################### | |
################################### |
library(paleotree) | |
#Simulate some fossil ranges with simFossilRecord | |
set.seed(444) | |
record<-simFossilRecord(p=0.1, q=0.1, nruns=1, | |
nTotalTaxa=c(30,40), nExtant=0) | |
taxa<-fossilRecord2fossilTaxa(record) | |
#simulate a fossil record with imperfect sampling with sampleRanges | |
rangesCont <- sampleRanges(taxa,r=0.5) |
devtools::install_github("dwbapst/paleotree", ref="dev_refinedphylopicfun") | |
library(paleotree) | |
taxaSeventyEight <- c( | |
"Archaeopteryx", "Pinus", "Procoptodon", "Olenellus", "Eldredgeops", | |
"Quetzalcoatlus", "Homo", "Tyrannosaurus", "Triceratops", "Giraffa", | |
"Bolivina", "Cancer", "Dicellograptus", "Dunkleosteus", "Solanum", | |
"Anomalocaris", "Climacograptus", "Halysites", "Cyrtograptus", | |
"Procoptodon", "Megacerops", "Moropus", "Dimetrodon", "Lingula", |