V10 Flashcards
(Not) Another R package) & Block design(s)
1
Q
preparation before creating a package
A
- on Windows: download R compiler (Rtools)
- have R installed and check that R and R are compatible
- might need miktex(for creating pdf)
2
Q
first steps in creating a package
A
- create folder on your desktop
- will hold entire package
- structure of folders inside here needs to match to the official guidelines
3
Q
description
A
- create a new empty file called DESCRIPTION
- > no .txt at the end
- > inside the file add the following:
Package Version Date Title Author Maintainer Depends ( what R version) Description License
4
Q
Namespace
A
load: dynamic libraries
- names of the functions available to users
- create a new empty file called NAMESPACE
- Note: No .txt at the end
- inside the file add the following:
export(MyFirstPackageFunction)
5
Q
man
A
- MyFirstPackage-package.Rd
- > global package description
- more or less an index
- MyFirstPackage-internal.Rd
- > all functions need documentation, small internal functions (not used by the user) can be stored here
- using the alias field
-> this can be checked via the help function of R