#### Open https://cran.r-project.org/web/packages/data.table/index.html # Open RStudio - New Project, R package # Delete R/hello.R, man/hello.md # Show .Rbuildignore, .gitignore # Make git commit # Create `polypack` on github # RStudio: Git tab -> Gear -> New termainl -> paste commands # Copy over files # Modify description # - Author -> Authors@R, `help(person)` library(devtools) use_gpl_license() # GPL says can be used in other open source software only # other options: MIT (extremely permissive, eg can be used for # CC0 (no license at all) document() # 1. RoxygenNote # 2. SHow man files # - Show multiple functions in one document # 3. Fix bugs # 4. NAMESPACE needs to be deleted, document() re-run # 5. Show namespace ################# COMMIT! # (Add .DS_Store to gitignore) use_testthat() # Show modifications to DESCRIPTION # Move over testing code, generate at least two files # Click test button, fix issue with `expect_is` # COMMIT! ### Adding a data-set # Make a file in data-raw/polydat.R polydat <- mtcars # put "real" data here! use_data(polydat, overwrite = TRUE) # Show data/ folder, loading # Create R/data.R #' @title Polynomial data #' @format Some dataset #' \describe{ #' \item{x}{First column} #' \item{y}{Second column} #' } "polydat" # Re-run document, COMMIT use_vignette("polypack", "Using Polypack") # Do some editing build_rmd("vignettes/polypack.Rmd") # Do this instead of manual, to use developer version rather than installed. # Check!