stefanoallesina / bsd-qbio4 Goto Github PK
View Code? Open in Web Editor NEWFourth BSD Quantitative Biology Bootcamp @ MBL
License: GNU General Public License v3.0
Fourth BSD Quantitative Biology Bootcamp @ MBL
License: GNU General Public License v3.0
Describe the bug
The my_factorial example function in Basic Computing 2 returns incorrect answers if the input is 0 or 1
To Reproduce
my_factorial <- function(a = 6){
if (as.integer(a) != a) {
print("Please enter an integer!")
} else {
tmp <- 1
for (i in 2:a){
tmp <- tmp * i
}
print(paste(a, "! = ", tmp, sep = ""))
}
}
my_factorial(1)
[1] "1! = 2"
my_factorial(0)
[1] "0! = 0"
FIX:
explicitly code in behavior in edge cases
Some changes that would make the reproducibility tutorial flow better:
dpois
Use this issue to think about new t-shirt ideas for the next qbio:
Students seem frustrated with the pagination of the workbook.
Let's add some master page numbers throughout, perhaps in addition to the sub-section numbering.
We could alternatively add colored paper or tabs between the sections, but that might be prohibitively expensive to print.
Describe the bug
On keyboards set to a non-English setting, e.g. for Mandarin speaking users, files will be encoded with ASCII, which throws errors unless explicitly stated on some R commands.
To Reproduce
papers <- read.csv("~/BSD-QBio4/tutorials/basic_computing_2/data/citations/nature_neuroscience.csv", stringsAsFactors = FALSE)
papers$TitleLength <- nchar(papers$Title)
Error at [something]:
invalid multibyte string at [something]
FIX:
read csv with explicit file encoding, e.g.
papers <- read.csv("~/BSD-QBio4/tutorials/basic_computing_2/data/citations/nature_neuroscience.csv", stringsAsFactors = FALSE,fileEncoding='ASCII')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.