I'm using Homebrew to stop the service
brew services stop mysql
| require(raster) | |
| require(ggplot2) | |
| pulsar = function(n){ | |
| x = seq(0,100, length=n) | |
| norms = dnorm(x, mean=40, sd=6)*100 + dnorm(x, mean=60, sd=6)*50 | |
| noise1 = approx(sample(c(rep(0:8,2),18:19)), n = n, y=NULL)$y | |
| noise2 = approx(sample(0:50), n = n, y=NULL)$y | |
| noise3 = rnorm(n) | |
| abs(norms + norms * noise1 + norms * noise2 * .1 + noise3) |
If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?
I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:
| # check.packages function: install and load multiple R packages. | |
| # Check to see if packages are installed. Install them if they are not, then load them into the R session. | |
| check.packages <- function(pkg){ | |
| new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
| if (length(new.pkg)) | |
| install.packages(new.pkg, dependencies = TRUE) | |
| sapply(pkg, require, character.only = TRUE) | |
| } | |
| # Usage example |
| # Find your R home | |
| $ echo "R.home()" | Rscript /dev/stdin | |
| Loading required package: stats | |
| Loading required package: methods | |
| [1] "/usr/local/Cellar/r/3.0.1/R.framework/Resources" | |
| # Make sure that you have the MySQL home var in your Renviron |