Skip to content

Instantly share code, notes, and snippets.

View aurielfournier's full-sized avatar
💭
Crunching numbers about birds and how we value them

Auriel M.V. Fournier aurielfournier

💭
Crunching numbers about birds and how we value them
View GitHub Profile
> head(amelt)
jdate year variable value
1 227 2013 pred_short 7.737878
2 247 2013 pred_short 38.029255
3 269 2013 pred_short 114.233338
4 237 2013 pred_short 64.805227
5 257 2013 pred_short 154.760291
6 284 2013 pred_short 88.092093
I want to have this
dataframe <- data.frame(silly1 = NA, silly2=NA)
# silly1 silly2
#1 NA NA
sepdf <- data.frame(old=c("a","b"), new=c("d","e")
# old new
#1 a d
@aurielfournier
aurielfournier / credential.error.md
Created February 1, 2016 22:35
git credential.helper error

avand@DESKTOP-DDMCUN6 MINGW64 ~/Documents $ git config --global credential.helper wincred error: could not lock config file /.gitconfig: Permission denied

#' A Rails Function
#'
#' This function allows you to express your love of rails.
#' @param love Do you love rails? Defaults to TRUE.
#' @keywords rails
#' @export
#' @examples
#' rails_function()
# density.modelsP is a list of models
# mod_names is an object storing names(density.modelsP)
# new_dat is a dataframe containing columns, one for each of the covariates used in the model set, in the property class type
mavg_pred <- modavgPred(density.modelsP, modnames=mod_names,newdata=new_dat, parm.type="lambda", type="response", uncond.se="old")
# Error: ncol(coefficients) == length(obj@estimates) is not TRUE
Call:
glm(formula = shr ~ for_per1 + ow_per1 + ag_per1 + wet_per1,
data = datdat)
Deviance Residuals:
Min 1Q Median 3Q Max
-7.859 -3.820 -1.474 2.036 24.141
Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
@aurielfournier
aurielfournier / gist:fc3aa7887ec00d86c433
Last active December 9, 2015 16:02
grouping in geom_path
ggplot()+geom_path(data=dd, aes(x=lon,y=lat, group=bandnumber))

Gravy is my dad's recipe

Biscuits is my mom's

this makes enough for feed a family of 7 with leftovers.

1 lb ground sausage (Aldi's, Bob Evans or Jimmy Deans in good. Krogers is too fatty and cooks down to nothing.) 1 small onion - chopped fine 3-4 cloves garlic 1 c flour 6 c milk

Sweet Potatoe Thai Curry

this makes....a lot

Two Cans of Coconut Milk
3 Table Spoons of green curry paste (I get it at walmart)
2 cloves garlic, diced
1 tsp salt
three medium (hand sized) sweet potatoes, diced into ~1 inch cubes (I leave the skins on)
one bunch of rainbow chard, chopped coarsley into two inch pieces

dat <- data.frame(a=seq(1,100, by=2), b=rnorm(50,0,1))
ggplot()+geom_line(data=dat, aes(x=a, y=b), color="white")+theme(panel.background=element_rect(fill="black"),
plot.background=element_rect(fill="black"),
text=element_text(color="white"),
panel.grid=element_blank(), # removes the gridelines, comment this out to have gridlines
axis.line=element_line(color="white")) # gives you an x and y axis line since we removed the gridlines
# This code will make this graph -> http://i.imgur.com/4RT5GQ1.png