TODO (20 June 18):
Goals for the paper:
Aim for September 2018 to submit this.
TODO: Write more about the examples. Why is this cool / interesting? Can we explain it in a conversational way? Even before writing code.
Organizational: We can split these up into sub directories for each task. Use plain text.
Possible Running Examples: 1. Matt's yield gap analysis project 1. Scott's code (data not available)
Improve the general well being of the R session, and may improve clarity.
c(1:2, 4:6)
. Example using this information for another part
of analysis.Vectorize()
recognize when everything in it is vectorized and
then don't change it into mapply. Related- identify calls to vectorized
functions in calls to apply family.R/readFaster.R
.
Also colClasses and type inference.x[, , drop = TRUE]
will produce result of different type
than x.f = function(x) x + y
# becomes:
f = function(x, .y = y) x + .y
function(x = length(y), y = sum(x))
and strict/lazy eval 1. Identify recursive functions so can change name throughout if change name of top-level function.
fns = getFunctionDefs("R") # CodeAnalysis package
isRecursive = sapply(names(fns), function(id) id %in% getGlobals(fns[[id]])$functions)
table(isRecursive)
foo
is the name of a function and a parameter. Very difficult
with regex.snake_case
and CamelCase
.
This requires some care to avoid writing over existing variable names.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.