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
Ensure that *Asus File Manager* is installed. | |
https://asus-file-manager.en.uptodown.com/android | |
Open Asus File Manager and navigate to the Internal Storage Folder | |
Hold down the odk folder until a tick appears to the left of it, indicating that it has been selected | |
Press the Hamburger button (three dots in the top right corner of the screen) | |
Select 'Compress' | |
A box will appear with the message "Enter the Archive Name" |
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
speakr <- function(message="hello, world") | |
{ | |
if(.Platform$OS.type == "unix"){system(paste("say ",message,sep=""))} | |
else {system(paste("echo ",message,"|ptts",sep=""))} | |
} | |
# usage examples | |
speakr("Beepr is cool") |
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
https://csl.mendeley.com/codeEditor/ | |
This is a useful thing for editing mendeley styles when they are wrong. | |
Find the installed file on Mac at Library/Application Support/Mendeley Desktop/citationStyles-1.0 | |
Make a copy in the same place, then rename | |
Change the Titles so that it shows up as a different style. then fiddle around until you have the correct style. | |
Save it and restart Mendeley and it will show up as a style |
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
Before start open R and | |
.libPaths() | |
to get the old path to libraries | |
Install new versions of R and Rstudio | |
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
#install sshpass | |
wget http://sourceforge.net/projects/sshpass/files/latest/download -O sshpass.tar.gz | |
tar -xvf sshpass.tar.gz | |
cd sshpass-1.06 | |
./configure | |
sudo make install | |
#R command | |
system("sshpass -f pass.sh scp chrissyhroberts@10.23.0.82:/Users/chrissyhroberts/tasks/EDK0004_Downloader/data/EDK* .") |
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
############################################### | |
# Using Administrative dara from DIVA-GIS, | |
# this script will convert the geographical | |
# administrative data (levels 0-3) | |
# for one or more country | |
# and output an itemsets.csv file | |
# that works with ODK and preserves accented | |
# characters (tested only on roman characters) | |
# Also removes accents from internal variables | |
# like 'name'. Accents will appear on screen but |
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
removeAccents<-function(x) | |
{ | |
a <- c('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ' |
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(rgdal) | |
#get schema name from KML file | |
a<-readOGR("chrissy-nk3_planet_osm_point_points.kml","SELECT") | |
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
#Time machine backups on macs are throttled as a low priority for CPU and bandwidth. If you are only backing up once a week or so, you may find that speed is very very slow. | |
#Possible to speed up by turning off throttling, but remember to put it back on or could impact on system performance. | |
#off | |
sudo sysctl debug.lowpri_throttle_enabled=0 | |
#on | |
sudo sysctl debug.lowpri_throttle_enabled=1 |
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
# Function to render a list in R as a markdown file that is then rendered in chosen format. | |
# Useful for printing a line or lines of a table to individual PDF files (i.e. for reconstruction of participant data sheets) | |
# Has some really basic headers and titles and an automatic system for building output file names including timestamps. | |
# Prints variable names in bold and data in plain text. Renders using rmarkdown package but sinking data in to vanilla markdown for maximum interoperability rather than using RMD. | |
# Requires rmarkdown package and dependencies | |
# md files currently autodelete after render but easily modified as option | |
# only renders when file doesn't already exist | |
csv2pdf<-function(data,title,id=NULL,form.id=NULL,author,date=format(Sys.time(), "%Y_%m_%d__%X",tz = "Universal"),report.format="pdf_document",output_dir="./pdf") |