Create package in Windows

3

Given a set of functions, how to create a package in Windows OS?

For example for the two functions below:

soma = function(x, y){
res = x + y
res
}

multiplica = function(x,y){
res = x*y
res
}
    
asked by anonymous 03.06.2016 / 01:15

1 answer

2

In RStudio, click Project > New Project

ThenclickonNewDirectory

ThenclickonRPackage

Givethepackageaname.Itcannotcontainspacesnor-inadditiontootherrules.

Rstudiowillopenastandardprojectwiththefollowingfiles:

  • DESCRIPTION
  • man/
  • NAMESPACE
  • R/

EnterthefolderRandcreateasmany.Rfilesasyouwantwithyourfunctions.

Click%with%.Readythepackagewascreated.

Ofcoursepackagescanbealotmorecomplicatedthanthat.Irecommendreading from this link which is a brief introduction. But the best reference is the Hadley book . @JulioTrecenti made a presentation about creating packages also at youtube .

    
03.06.2016 / 16:47