-
Notifications
You must be signed in to change notification settings - Fork 0
/
creating-a-package.R
36 lines (34 loc) · 963 Bytes
/
creating-a-package.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
#
#
#
# In RStudio, click new project, new directory, R package
# Name package, enter location
# Put R files in the R folder
# Click Build package (may require devtools package)
# Check package
# Add to github and commit
# On destination computer, click install_github("username/repository") , which may require devtools
# you will have to use library("pkgname") to run functions
# package can be removed with remove.packages("packagename")
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Ctrl + Shift + B'
# Check Package: 'Ctrl + Shift + E'
# Test Package: 'Ctrl + Shift + T'
#
# #these are required to create packages
#
# #install packages
# install.packages("devtools")
# devtools::install_github("klutometis/roxygen")
#
#
# #include packages
# library("devtools")
# library("roxygen2")