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
}
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
}
In RStudio, click Project > New Project
ThenclickonNewDirectory
ThenclickonRPackage
Givethepackageaname.Itcannotcontainspacesnor-
inadditiontootherrules.
Rstudiowillopenastandardprojectwiththefollowingfiles:
EnterthefolderRandcreateasmany.R
filesasyouwantwithyourfunctions.
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 .