How do you install a package that’s sitting on GitHub?
- Install the devtools package. From R install as normal.
install.packages("devtools")
- Attach the devtools package.
library(devtools)
- Try install_github("author/package"). For this package, which exists at github.com/jouterleys/v3dR, you’d type
install_github("jouterleys/v3dR")
- Don't forget to attach the package before use!
library(v3dR)
full_filepath = file.path("C:/ASCII.txt")
df <- v3dR(full_filepath)
full_filepath = file.path("C:/ASCII.txt")
df <- v3dR(full_filepath)
df %>%
group_by(c3d_name,signal_names,signal_types,signal_folder,signal_components,item,instance) %>%
ggplot(aes(x = item, y = value, color = signal_names)) +
geom_hline(yintercept=0,color = "black", size=0.25)+
stat_summary(fun = mean, geom = "line") +
stat_summary(fun.data="mean_sdl", fun.args = list(mult = 1), mapping = aes(color = signal_names, fill = signal_names), geom = "ribbon",alpha = 0.25,colour = NA)+
facet_wrap(signal_components ~ signal_names, scales = "free") +
theme_minimal()+
theme(axis.line = element_line(size=1, colour = "black"),legend.position = "bottom")+
scale_x_continuous(expand = c(0, 0))
ggsave(file.path(dirname(full_filepath),paste(basename(full_filepath),'.tiff',sep = "")),
device = "tiff",
width = 8, height = 8,dpi=300)
-
Open R or Rstudio (best to close all R or Rstudio sessions first)
-
Use remove.packages()
remove.packages("v3dR")
- Then follow steps 2. and 3. from the Install
# attach devtools library
library(devtools)
# install v3dR from github
install_github("jouterleys/v3dR")