This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# T.room # Temperature of the room | |
# T.coffee # Initial temperature of the coffee | |
# T.cream # Temperature of the cream | |
# k # Cooling rate constant | |
# T.d # Desired coffee temperature | |
temp <- function(T.init, T.room, k, x){ | |
# Newton's cooling law temperature function | |
return(T.room + (T.init - T.room)*exp(-k*x)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getCiteCounts <- function(citekeys, bibtex){ | |
## This function takes a list of citation keys, for ex. from lit review notes | |
## and a master bibtex file with citekeys and DOIs | |
## Returns a vector of number of times each article was cited from CrossRef | |
# Check for and load/install required packages | |
# --> stringr, rcrossref | |
if (!'stringr' %in% installed.packages()) install.packages('stringr') | |
require(stringr, quietly=TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% University of South Florida College of Engineering Beamer Template | |
% Garrick Aden-Buie | |
% Send comments/beers to: gadenbuie@mail.usf.edu | |
% Example presentation: | |
% http://garrickadenbuie.com/wp-content/uploads/2013/09/usf-beamer-example.pdf | |
% IMPORTANT: | |
% If you want to use the USF logo, make sure you | |
% download the USF College of Engineering logo from: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
# s(k) = s(0) + b*p(k-1) | |
# d(k) = d(0) - a*p(k) | |
# p(k) = -b/a*p(k-1) + (d0-s0)/a | |
cobweb = function(params){ | |
# Create data frame of prices, and supply and demand stocks | |
s0 = params[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reprex::reprex({ | |
library(purrr) | |
l1 <- list(a = list(a1 = 1:10)) | |
l2 <- list(a = list(a2 = 10:20)) | |
list_merge(l1, l2) | |
#' But both `l1` and `l2` are named... so arguments should be named? | |
list_merge(x = l1, y = l2) | |
#' Oh, l2 is implicitly unnamed because it's in dots | |
list_merge(l1, y = l2) | |
#' But what I *really* wanted was this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reprex::reprex({ | |
library(purrr) | |
l1 <- list(a = list(a1 = 1:10)) | |
l2 <- list(a = list(a2 = 10:20)) | |
list_merge(l1, l2) | |
#' But both `l1` and `l2` are named... so arguments should be named? | |
list_merge(x = l1, y = l2) | |
#' Oh, l2 is implicitly unnamed because it's in dots | |
list_merge(l1, y = l2) | |
#' But what I *really* wanted was this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(purrr) | |
l1 <- list(a = list(a1 = 1:10)) | |
l2 <- list(a = list(a2 = 10:20)) | |
list_merge(l1, l2) | |
#' But both `l1` and `l2` are named... so arguments should be named? | |
list_merge(x = l1, y = l2) | |
#' Oh, l2 is implicitly unnamed because it's in dots | |
list_merge(l1, y = l2) | |
#' But what I *really* wanted was this | |
list_modify(l1, rlang::splice(l2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
output: github_document | |
--- | |
# magick  | |
##### *Advanced Image-Processing in R* | |
[](https://travis-ci.org/ropensci/magick) | |
[](https://ci.appveyor.com/project/jeroen/magick) |
OlderNewer