This file contains 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
<?xml version="1.0"?><h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:odk="http://www.opendatakit.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><h:head><h:title>media_file_consent</h:title><model><submission base64RsaPublicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1DXk7dbAI89DscB5M+aBlbvtIUcelkwdYX+CBV9uHdvkCm6g0CJM0nrzjRrhKyty0hSgIRfhIBozIfEJYSwRusz/ClGeNiL8Fz3JGYfnFWLw4ZmNKQwAz2CS/zoI4Mu7QRjmeWPIBohdjHo1hJNIjogme0Iip4GDn+3DgsuvFYXxjkWlXN7opEkxAeBQukQzAxCiWbwdhKWKQzwgzmSu5HqCldkkQQ1Q5Zd/KsdmejWQa/5xDd/gOJ0ql+AVzZC1Z9fE0+2HLEEQca8pgWUPXAnPEK2BdNI/ltfPhgKOCE1inXAZxIrDSybePUIyYbIj14aQ30osMpp4EMFFU1rYbQIDAQAB" method="form-data-post"/><instance><Media_File_Consent_LSHTM id="media_file_consent"><add_file/><add_link/><resource_and_attribution><subject/><attribution_name/><attribution_entity/><attribution_date>today()</attribution_dat |
This file contains 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
data(cars) | |
#make some missing values | |
cars[sample(1:50,size = 10),1]<-NA | |
cars[sample(1:50,size = 10),2]<-NA | |
require(mice) | |
#impute a bunch of data sets | |
cars.mice<-mice(cars,m=5,maxit=50,meth='pmm',seed=500) |
This file contains 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
oddsratioWald.proc <- function(n00, n01, n10, n11, alpha = 0.05) | |
{ | |
# Compute the odds ratio between two binary variables, x and y, | |
# as defined by the four numbers nij: | |
# | |
alpha<-0.05 | |
# n00 = number of cases where x = 0 and y = 0 | |
n00<-14 |
This file contains 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
#R script to make a KML file of GPS data points collected in ODK | |
library(sp) | |
library(rgdal) | |
#make some dummy data | |
lon<-c(-123.736597,6.263428,147.263399,83.263430,169.263481,7.736540,0.0) | |
lat<-c(21.04847,-66.04859,42.04850,66.04854,44.04862,50.04865,52.00000) | |
status<-c(1,1,1,1,2,2,2) | |
names<-c("Mid_Pacific_Off_Mexico","North_Of_Antarctica","East_Of_Hokkaido","North_Central_Russia","Suiko_Seamount","Bacharach_Germany","Barkaway_UK") | |
df<-data.frame(lon,lat,status,names) |
This file contains 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
###################################################### | |
# SETTINGS | |
# | |
# You need to install a version of Java that has the Java Cryptography Extensions - see instructions here https://github.com/chrissyhroberts/ODK_TRAINING/blob/master/User_Guide.md | |
# URL of aggregate server [must include top level directory] | |
# This script requires one package dependency from package "getPass". This will be installed automatically if you don't have it. | |
# i.e. "https://test.odk.lshtm.ac.uk/test" | |
# USER NAME | |
# i.e. "chrissy" | |
# DECRYPTION PEM LOCATION : Please enter the full path to the decryption key |
This file contains 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
Setting up ODK collect for use with offline maps | |
https://export.hotosm.org/ | |
Sign up for an account | |
Describe the data set in tab 1. | |
In tab 2 select only “MBTiles” | |
In tab 3 choose the source “OpenStreetMap” and set zoom range to 1-14 | |
In the map viewer, navigate to your region of interest. |
This file contains 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
library(rworldmap) | |
theCountries<-read.table("Countries.txt",header=T,sep="\t") | |
# These are the ISO3 names of the countries you'd like to plot in red | |
malMap <- joinCountryData2Map(theCountries, joinCode = "ISO3", | |
nameJoinColumn = "ISO.ALPHA.3.Code") | |
# This will join your malDF data.frame to the country map data |
This file contains 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
library(reshape2) | |
library(ggplot2) | |
#make csv file as below | |
#name,start.date,end.date,WP | |
#Task 1,1,10,1 | |
#Task 2,2,8,1 | |
#Task 3,12,16,2 | |
#Task 4,22,32,2 | |
#Task 5,18,22,3 |
This file contains 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
#find overlap between some SNP locations and a list of gene locations | |
#test SNPs | |
#df = snps | |
#chr start stop | |
#1 1232 1232 | |
#2 12444 12444 | |
#gene positions |
This file contains 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
#power calculations for genetic case control study | |
#using gap package and pbsize2 command | |
#citation Jing Hua Zhao (2013). gap: Genetic Analysis Package. R package version 1.1-10. | |
#define study characteristics | |
require(gap) | |
prevalence=0.1 | |
alpha=0.05 |