Skip to content

Instantly share code, notes, and snippets.

View joaovissoci's full-sized avatar

Joao Ricardo N Vissoci joaovissoci

View GitHub Profile
@joaovissoci
joaovissoci / vim.md
Created December 2, 2016 05:51 — forked from joelbyler/vim.md
Vim cheat sheet

#Cursor movement

h - move left
j - move down
k - move up
l - move right
ctrl-b - page up
ctrl-f - page down
% - jump to matching brace

w - jump by start of words (punctuation considered words)

# bootstrapped standard errors and confidence intervals for sem
# original sem code from sem:::bootSem.sem
# original post: http://r.789695.n4.nabble.com/Bootstrap-bootSem-causes-R-to-crash-tp4661900p4677999.html
# commented out lines referencing tcltk
bootSem2 <- function (model, R = 100, Cov = cov, data = model$data, max.failures = 10,
...)
{
# script stolen and adapted from http://goo.gl/kUzaov
if (!require('sem')) install.packages('sem')
if (!require('lavaan')) install.packages('lavaan')
if (!require('Rcmdr')) install.packages('Rcmdr')
# creating a dataset for g + 3 factors, all orthogonal
#
# Functions to make ggplot KM survivor curves made with survfit() in library(survival)
#
# code written by Ramon Saccilotto
# and included in his ggplot2 tutorial
# 2010-12-08
# define custom function to create a survival data.frame
createSurvivalFrame <- function(f.survfit){
# initialise frame variable
doInstall <- TRUE
toInstall <- c("ggplot2", "poLCA", "reshape2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents,
head(ANES) # remove some non-helpful variables
# Adjust so that 1 is the minimum value for each variable:
ANES <- data.frame(apply(ANES, 2, function(cc){ cc - min(cc, na.rm = T) + 1 }))

R: A Language and Environment for Statistical Computing, R Core Team, R Foundation for Statistical Computing, Vienna, Austria, 2013, http://www.R-project.org/

Titulo

Abstract

Introduction

Relevancia

*Prevelência de lesoes e deficiencias *Custo em reabilitação

Item generation

Bibliographic sources

General sources

Quora Stack exchange

Situations & multimedia

Reproducible research protocol

As partially described in previous sections, we followed a reproducible research protocol along the lines previously described by our group (Vissoci, 2013). Briefly, all data sets, scripts, templates, software and workflows generated under this project were deposited under the public repositories Github and figshare. For access to the specific data for this project please refer to

---
title :
subtitle :
author :
job :
framework : io2012 # {deckjs, shower, dzslides, landslide, html5slides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
widgets : [] # {mathjax, quiz, bootstrap}
mode : standalone # {, draft, selfcontained}