Skip to content

Commit

Permalink
Including datasets to use on Denne´s example
Browse files Browse the repository at this point in the history
Now you can load example dataset directly from data() function.
  • Loading branch information
antoanne committed Jun 24, 2021
1 parent 27e8d94 commit 0a1564b
Show file tree
Hide file tree
Showing 31 changed files with 79 additions and 41 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^data-raw$
7 changes: 6 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Package: ifm
Type: Package
Title: Financial evaluation of Projects
Version: 0.1.0
Version: 0.2.0
Author: Antoanne Christopher Pontes Wanderley
Authors@R: c(
person("Antoanne", "Pontes", email = "[email protected]", role = c("aut", "ctb", "cre")),
person("Elton", "Marinho", email = "[email protected]", role = c("ctb")),
person("Monica", "Silva", email = "[email protected]", role = c("ctb")),
person("Sergio", "Serra", email = "[email protected]", role = c("ctb")),
person("Eber", "Schmitz", email = "[email protected]", role = c("ctb")),
person("Alexandre", "Costa", email = "[email protected]", role = "ctb"),
person("Anderson", "Nepomuceno", email = "[email protected]", role = "ctb"),
Expand All @@ -25,3 +28,5 @@ NeedsCompilation: no
RoxygenNote: 7.1.1
Imports: igraph, XLConnect, openxlsx, RUnit
Date: 2018-07-31
Depends: R (>= 2.10)
LazyData: true
7 changes: 7 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' Sample dataset following Denne sample.
#'
#' TODO
#'
#' @format A data frame with 6 variables:
#'
"ex.sheet.data"
2 changes: 1 addition & 1 deletion R/excel.list.to.xls.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
8 changes: 3 additions & 5 deletions R/excel.xls.to.list.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
#'
#' @import XLConnect
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#'
#'

# ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")

excel.xls.to.list <- excel_xls_to_list <- excelXlsToList <-
function(xls.spreadsheet.path){

Expand Down
2 changes: 1 addition & 1 deletion R/mmf.df.1r.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @export
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
2 changes: 1 addition & 1 deletion R/mmf.df.infr.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @export
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
2 changes: 1 addition & 1 deletion R/mmf.get.breakeven.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @family scheduling
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
2 changes: 1 addition & 1 deletion R/mmf.get.selffunding.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @family scheduling
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
2 changes: 1 addition & 1 deletion R/mmf.max.npv.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @export
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
3 changes: 1 addition & 2 deletions R/mmf.npv.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#'
#' @examples
#'
#' # Loading data from XLS
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
#' ex.sheet.data.activities <- ex.sheet.data[[2]]
#' ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
2 changes: 1 addition & 1 deletion R/predecessors.to.edges.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' ex.edges <- predecessors.to.edges(ex.sheet.data$predecessors)
#'
predecessors.to.edges <- predecessors_to_edges <- predecessorsToEdges <-
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' act.pred <- utils.suc2pred(ex.sheet.data$predecessors)
#'
utils.suc2pred <- function(activities.successors) {
Expand Down Expand Up @@ -58,7 +58,7 @@ utils.suc2pred <- function(activities.successors) {
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' act.suc <- utils.pred2suc(ex.sheet.data$predecessors)
#'
utils.pred2suc <- function(activities.predecessors) {
Expand Down Expand Up @@ -100,7 +100,7 @@ utils.pred2suc <- function(activities.predecessors) {
#'
#' @examples
#'
#' ex.sheet.data <- excel.xls.to.list("../ifm/demo/resources/spreadsheet.xls")
#' data("ex.sheet.data")
#' g <- utils.pred2graph(ex.sheet.data$predecessors)
#' plot(g)
#'
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ This is part of the research project that aims to understand how we can enhance

To use this package please do the following steps:

1 - install / download (git clone) R ifm package;
Install on R

2 - fill the spreadsheet and validate the named ranges: interestrate, activities, etc...
Use this command: devtools::install_github("antoanne/ifmFramework", INSTALL_opts=c("--no-multiarch"))

3 - put the spreadsheet on the /resources directory;

4 - run the function xpto.
Execute sample following this steps

1. Import IFM package
library(ifm)

2. Load demo
demo(sampledenne)






References
Denne, M., & Cleland-Huang, J. (2003). Software by numbers: Low-risk, high-return development. Prentice Hall Professional.
File renamed without changes.
6 changes: 6 additions & 0 deletions data-raw/workbook.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
library(XLConnect)
library(ifm)

ex.sheet.data <- excel.xls.to.list('data-raw/spreadsheet.xls')

usethis::use_data(ex.sheet.data, overwrite = TRUE)
Binary file added data/ex.sheet.data.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/sampledenne.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library(ifm)
library(igraph)
library(XLConnect)

ex.sheet.data <- excel.xls.to.list('demo/resources/spreadsheet.xls')
data("ex.sheet.data")
ex.sheet.data.interest.rate <- ex.sheet.data[[1]]
ex.sheet.data.activities <- ex.sheet.data[[2]]
ex.sheet.data.durations <- ex.sheet.data[[3]]
Expand Down
16 changes: 16 additions & 0 deletions man/ex.sheet.data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/excel.list.to.xls.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/excel.xls.to.list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mmf.df.1r.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mmf.df.infr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mmf.get.breakeven.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mmf.get.selffunding.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mmf.max.npv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/mmf.npv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predecessors.to.edges.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/utils.pred2graph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/utils.pred2suc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/utils.suc2pred.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0a1564b

Please sign in to comment.