This file contains hidden or 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
\documentclass[]{article} | |
\usepackage{tikz} | |
\usetikzlibrary{positioning} | |
\begin{document} | |
%Graph 1 | |
\begin{figure} | |
\caption{Graph 1} | |
\large{\begin{tikzpicture}[% |
This file contains hidden or 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
######################### | |
# Print methods in R # | |
######################### | |
#Create my silly function | |
myfunc <- function(mu){ | |
x <- rnorm(1, mean=mu, sd=3) | |
class(x) <- "myfunc" | |
return(x) | |
} |
This file contains hidden or 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
#Function to extract the cluster ID variable from a formula | |
get_id <- function(formula){ | |
#Extract the thing between the | and the ) in the last part of formula | |
#This is the clustering variable | |
idvar <- gsub('.*[|](.*?)).*','\\1',formula[-c(1:2)]) | |
#Remove white space | |
idvar <- gsub("^\\s+|\\s+$", "", idvar) | |