In your command-line run the following commands:
brew doctorbrew update
In your command-line run the following commands:
brew doctorbrew update| ### Source: https://stackoverflow.com/questions/4090169/elegant-way-to-check-for-missing-packages-and-install-them | |
| list.of.packages <- c( | |
| "tidyverse", # Packages included: ggplot2, purr, tibble, dplyr, tidyr, stringr, readr, forcats | |
| "readxl", # read_excel() | |
| "writexl", # write_xlsx() | |
| "stargazer", | |
| "ggthemes", | |
| "usethis" | |
| ) | 
| ## Requires HTTR package | |
| if (!require('httr')) install.packages('httr'); library('httr') | |
| ## Replace following variables: DEFAULT_CHAT_ID, DEFAULT_BOT_TOKEN | |
| sendMessage <- function( | |
| text=stop("Text parameter is required!"), | |
| chat_id=DEFAULT_CHAT_ID, | |
| bot_token=DEFAULT_BOT_TOKEN, | |
| ... | 
| sysctl -n machdep.cpu.brand_string | |
| # Source: https://www.tekrevue.com/tip/find-mac-cpu-model/ | 
| <<external-code, cache=FALSE>>= | |
| read_chunk('foo-bar.R') | |
| @ | 
| php artisan config:clear | |
| php artisan cache:clear | 
| DB::listen(function($query) { | |
| var_dump($query->sql); | |
| }); | |
| // Retrieves all notes in card first | |
| $card->notes->first(); | |
| $card->notes()->first(); // Build query first then retrieve with Limit 1 | |
| //Note that Laravel caches the query result, so first case may be better sometimes. | 
| # Logistic Function | |
| logistic <- function(x, L=1, k=1, sigmoidMid=0) { | |
| return(L / (1 + exp(-k*(x-sigmoidMid)))) | |
| } | |
| # Testing the function | |
| x = seq(from=-10, to=10, by=1) | |
| plot(x=x, y=logistic(x)) | |
| lines(x=x, y=logistic(x)) | 
| defaults write org.R-project.R force.LANG en_US.UTF-8 | 
| editor: | |
| softWrap: true |