loading packages
library(dplyr)
## Warning: package 'dplyr' was built under R version 3.5.1
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
f0ur <- 2+2
f0ur
## [1] 4
Testing out some stuff here
question <- c("who is the best lab?")
answer <- c("YouthFirst Lab")
question
## [1] "who is the best lab?"
answer
## [1] "YouthFirst Lab"
data1 <- as.data.frame(cbind(sample(1:1000, 100, replace=TRUE), c(1:100), c(1,3,5)))
data2 <- as.data.frame(cbind(sample(0:100, 100, replace=TRUE), c(1:100)))
names(data1) <- c("x","ID", "group")
names(data2) <- c("y","ID")
data <- merge(data1, data2, by="ID")
data <- dplyr::select(data, x, y, group)
data$group <- factor(data$group, levels = c(1,3,5), labels = c("Help Seeking Control", "CHR", "Psychosis"))
head(data)
## x y group
## 1 414 12 Help Seeking Control
## 2 869 80 CHR
## 3 757 75 Psychosis
## 4 947 45 Help Seeking Control
## 5 187 87 CHR
## 6 131 77 Psychosis
plot <- ggplot(data, aes(x=x, y=y, color=group)) + geom_point(aes(shape=group, fill = group))
plot