#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)
#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)
################################################################# | |
#IHD GEO EPI - BRAZIL | |
################################################################# | |
# | |
# | |
# | |
# | |
# | |
################################################################# | |
#SETTING ENVIRONMENT |
############################################################## | |
#PCA Score comparisons | |
############################################################# | |
# # Define the amout of factor to retain | |
#Group of functinos to determine the number os items to be extracted | |
#par(mfrow=c(2,2)) #Command to configure the plot area for the scree plot graph | |
#ev <- eigen(cor_data) # get eigenvalues - insert the data you want to calculate the scree plot for | |
#ev # Show eigend values | |
#ap <- parallel(subject=nrow(cor_data),var=ncol(cor_data),rep=100,cent=.05) #Calculate the acceleration factor | |
#summary(ap) |
####################################################### | |
#MERGING TWO DATASETS IN R | |
####################################################### | |
data <- read.csv("") | |
data2 <- repmis::source_DropboxData(".csv","",sep = ",",header = TRUE) | |
total <- merge(data,data2,by=c("record_id"),all.x=TRUE) | |
write.csv(total,"/home/joao/Desktop/hotspot_epi_rwanda_data.csv") |
convert_latalong<-function(data$Surg_GPS_Lat2){ | |
data$Surg_GPS_Lat2<-car::recode(data$Surg_GPS_Lat2,"''='NA.NA.NA.NA.NA'") | |
z <- sapply((strsplit(as.character(data$Surg_GPS_Lat2), "[°\\.]")), as.character) | |
z<-t(z) | |
z<-as.data.frame(z) | |
z[,1:4]<-sapply(z[,1:4], as.character) | |
z[,1:4]<-sapply(z[,1:4], as.numeric) | |
z[,5]<-car::recode(z[,5],"' N'='N';'N '='N';' S'='S';'S '='S'") | |
z[,6]<-as.numeric(as.character(paste(z[,3],z[,4],sep="."))) | |
lat<-z[,1] + z[,2]/60 + z[,6]/3600 |
######################################################### | |
#TEMPLATE - MAPDIST | |
######################################################### | |
#Function in the ggmap package | |
library(ggmap) | |
#organizing data set | |
#it works with addresses, city names and numeric lat and long indicator | |
# wherw x = a data.frame with lat and long in columns | |
from <- c('houston', 'houston', 'dallas') |
```{r} | |
summary(cars$dist) | |
summary(cars$speed) | |
``` | |
```{r, echo=FALSE} | |
summary(cars) | |
``` | |
```{r, eval=FALSE} |
#Install all most used packages | |
install.packages("car") | |
install.packages("gdata") | |
install.packages("Hmisc") | |
install.packages("metafor") | |
install.packages("plyr") | |
install.packages("ggplot2") | |
install.packages("gridExtra") | |
install.packages("psych") |
1. Instale o GIMP | |
2. Abra a Imagem nele | |
3, Va no Menu Imagem | |
4. Escolha a opcao Escalar Imagem | |
5. Em resolucao coloque 600 x 600 | |
6. Vá em Layer e selecione Traansparency | |
7. Escolha Remove Alpha Chanel | |
8. Va no menu arquivo | |
9. Selecione Exportar | |
10. Na Janela que aparece clique em Escolha Tipo de Ficheiro (Por Extensáo) |
# AC1 statistic for 2 raters special case | |
# table = k x k table which represents table(rater1,rater2), must have equal number of rows and columns | |
# N = population size which will be stick in standard error correction, N=Inf is no correction. | |
# conflev = Confidence Level associated with the confidence interval (0.95 is the default value) | |
AC1 <- function(table,conflev=0.95,N=Inf,print=TRUE){ | |
if(dim(table)[1] != dim(table)[2]){ | |
stop('The table should have the same number of rows and columns!') | |
} | |
n <- sum(table) |