https://gist.github.com/search?q=user%3A%40me&ref=searchresults
Uses @me to refer to itself in the gist search query.
Type this into Github Gist Search (https://gist.github.com/)
user:BoQsc your search query
https://gist.github.com/search?q=user%3A%40me&ref=searchresults
Uses @me to refer to itself in the gist search query.
Type this into Github Gist Search (https://gist.github.com/)
user:BoQsc your search query
| `simulate.gamm` <- function(object, nsim = 1, seed = NULL, newdata, | |
| freq = FALSE, unconditional = FALSE, ...) { | |
| if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE)) | |
| runif(1) | |
| if (is.null(seed)) | |
| RNGstate <- get(".Random.seed", envir = .GlobalEnv) | |
| else { | |
| R.seed <- get(".Random.seed", envir = .GlobalEnv) | |
| set.seed(seed) | |
| RNGstate <- structure(seed, kind = as.list(RNGkind())) |
| # Source: http://www.cookbook-r.com/Manipulating_data/Converting_between_data_frames_and_contingency_tables/#countstocases-function | |
| # Convert from data frame of counts to data frame of cases. | |
| # `countcol` is the name of the column containing the counts | |
| countsToCases <- function(x, countcol = "Freq") { | |
| # Get the row indices to pull from x | |
| idx <- rep.int(seq_len(nrow(x)), x[[countcol]]) | |
| # Drop count column | |
| x[[countcol]] <- NULL |