devR is an R package which provides an R6class Workspace.R with methods to easy create and update an R package.
Therefore implements functions for working with archives: files, folders, git, Rd2pdf and bash.
Install package from this repository
```R
install.packages('devtools') library('devtools') devtools::install_github('JoanViana/devR')
```
or download and install from source:
```R
install.packages(path_to_file, repos = NULL, type="source")
``
Where
path_to_filecould be:
* On Windows it will look something like this:
C:\Users\user\Downloads\devR_0.0.0.9000.tar.gz.
* On UNIX it will look like this:
/home/user/download/devR_0.0.0.9000.tar.gz`.
@ECHO OFF
REM.-- Unblock PowerShell Security defaults: run signed scripts
Powershell -command Set-ExecutionPolicy RemoteSigned -Force
REM.-- Install PSget: http://psget.net/
Powershell -command "(new-object Net.WebClient).DownloadString(\"http://psget.net/GetPsGet.ps1\") | iex"
REM.-- Install poshgit: https://github.com/dahlbyk/posh-git
Powershell -command Install-Module posh-git
REM.-- Add PATH to System
SETX /M path "%path%;C:\Program Files\Git\cmd\"
PAUSE
Check the Controller Demo and the Documentation
Workflow example: Create a hosted git repository and an R project (myProject.Rproj) in your workspace from RStudio and type from your Controller script:
# Load devR package
library(devR)
# Create an instance of R6Class in root directory
w = Workspace$new(getwd())
# Name new library
lib = 'myLibrary'
# Create new library in root directory and git init, config user and add remote
w$libraryCreate(Xlibrary = lib, Xname = 'Your Name and Surname', Xemail = 'your email', Xhttps = 'https of git repository')
# Now it is time to develop the package ...
# Example: copy files from workspace to the new library directory
w$fileCopy(c('LICENSE', 'README.md'), file.path(lib))
w$fileCopy(c('Workspace.R'), file.path(lib, 'R'))
w$fileCopy(c('devControlleR.R'), file.path(lib, 'demo'))
w$setDescription(lib, Xtext = "License: MIT + file LICENSE", Xlines = 7)
# Create documentation, manual pdf, build, install and git add, commit & push
w$libraryUpdate(Xlibrary = lib, Xmessage = 'commit message', Xuser = 'git user', Xpassword = 'git password', Xrepository = 'repository name', Xbranch = 'master', Xhost = 'git host')
# Example creating a new branch, checkout & push
w$libraryUpdate(Xlibrary = lib, Xmessage = 'version 0.0.0.9002', Xuser = 'JoanViana', Xpassword = 'my_password', Xrepository = 'devR', Xbranch = 'new_branch', Xhost = 'github.com')
Workspace$libraryCreate()
. Debug and test.git config --global user.name "..."
devtools::install_github()
. Take into account public and private repositories.Workspace$libraryUpdate()
&& modify paths of README.md.git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Joan DÃdac Viana Fons - joanvianafons@gmail.com
MIT - Please, read LICENSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.