Skip to content

Instantly share code, notes, and snippets.

View brunaw's full-sized avatar
💜
working on ML & bayesian stats

Bruna Wundervald brunaw

💜
working on ML & bayesian stats
View GitHub Profile
base <- read.csv("comm.csv", encoding = "UTF-8", header = TRUE,
sep = ",", row.names = NULL,
quote = "\"'",
dec = ".",
stringsAsFactors=FALSE)
x <- read.table("comm.csv", header = TRUE, sep=",",
quote="\"'", stringsAsFactors=FALSE,
fill = TRUE,
encoding = "UTF-8",
out.extra = 'style = "margin:0 -200px"'
@brunaw
brunaw / gist:b7930dc0752d3e3b6c6eac586f50fd3f
Created November 3, 2017 16:04
Lattice group labelling
# Example
express <- c(expression(sigma^2 == 1),
expression(sigma^2 == 2),
expression(sigma^2 == 5),
expression(sigma^2 == 10))
# And in the chart code
strip = strip.custom(factor.levels = express)
guides(fill=FALSE)
\begin{cases}
\end{cases}
\Big|_{0}^{x}
ggplot(data.frame(x = c(0, 1)), aes(x)) +
stat_function(fun=function(x){
dgunit(y = x, mu = mu, phi = phi)
}, color = "red2", size = 1.3) +
guides(fill = FALSE) +
theme_minimal() +
ylab(expression("f(y)")) +
xlab(expression(y)) +
theme(
'%!in%' <- function(x,y)!('%in%'(x,y))
temp = list.files(pattern="*.txt")
myfiles = lapply(temp, read.table, sep = ",")
save(vanessa_da_mata , file = "vanessa_da_mata.rda")